mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-15 09:33:39 +00:00
Fix bug: InstCombine/2003-06-05-BranchInvertInfLoop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6630 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d8c1d7619c
commit
9b5fd22bd9
@ -1072,7 +1072,7 @@ Instruction *InstCombiner::visitAllocationInst(AllocationInst &AI) {
|
||||
|
||||
Instruction *InstCombiner::visitBranchInst(BranchInst &BI) {
|
||||
// Change br (not X), label True, label False to: br X, label False, True
|
||||
if (BI.isConditional())
|
||||
if (BI.isConditional() && !isa<Constant>(BI.getCondition()))
|
||||
if (Value *V = dyn_castNotVal(BI.getCondition())) {
|
||||
BasicBlock *TrueDest = BI.getSuccessor(0);
|
||||
BasicBlock *FalseDest = BI.getSuccessor(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user