llvm.org GIT mirror llvm / 2077e18
ifcvt should ignore cfg where true and false successors are the same. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73423 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 10 years ago
2 changed file(s) with 24 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
546546 // fallthrough.
547547 if (!BBI.FalseBB)
548548 BBI.FalseBB = findFalseBlock(BBI.BB, BBI.TrueBB);
549 assert(BBI.FalseBB && "Expected to find the fallthrough block!");
549 if (!BBI.FalseBB) {
550 // Malformed bcc? True and false blocks are the same?
551 BBI.IsUnpredicable = true;
552 return;
553 }
550554 }
551555
552556 // Then scan all the instructions.
657661
658662 // Do not ifcvt if either path is a back edge to the entry block.
659663 if (BBI.TrueBB == BB || BBI.FalseBB == BB) {
664 BBI.IsBeingAnalyzed = false;
665 BBI.IsAnalyzed = true;
666 return BBI;
667 }
668
669 // Do not ifcvt if true and false fallthrough blocks are the same.
670 if (!BBI.FalseBB) {
660671 BBI.IsBeingAnalyzed = false;
661672 BBI.IsAnalyzed = true;
662673 return BBI;
0 ; RUN: llvm-as < %s | llc -march=arm
1
2 define fastcc void @t() nounwind {
3 entry:
4 br i1 undef, label %bb.i.i3, label %growMapping.exit
5
6 bb.i.i3: ; preds = %entry
7 unreachable
8
9 growMapping.exit: ; preds = %entry
10 unreachable
11 }