mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Fix PR3353, infinitely jump threading an infinite loop make from switches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62529 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -419,6 +419,11 @@ bool JumpThreading::ProcessBranchOnDuplicateCond(BasicBlock *PredBB,
|
||||
/// switches out of repeated 'if' conditions.
|
||||
bool JumpThreading::ProcessSwitchOnDuplicateCond(BasicBlock *PredBB,
|
||||
BasicBlock *DestBB) {
|
||||
// Can't thread edge to self.
|
||||
if (PredBB == DestBB)
|
||||
return false;
|
||||
|
||||
|
||||
SwitchInst *PredSI = cast<SwitchInst>(PredBB->getTerminator());
|
||||
SwitchInst *DestSI = cast<SwitchInst>(DestBB->getTerminator());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user