aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-04-10 22:05:25 +0000
committerHal Finkel <hfinkel@anl.gov>2013-04-10 22:05:25 +0000
commit9af7014019c971368d541870b108aef1f12a24ba (patch)
treeee3ba7278d270093bd1fe0e2a49fe5ed145671e0 /test/CodeGen
parent3c08eef20b9cfc31d4ae3a43f1c9a57a4ab2cad7 (diff)
Manually remove successors in if conversion when CopyAndPredicateBlock is used
In the simple and triangle if-conversion cases, when CopyAndPredicateBlock is used because the to-be-predicated block has other predecessors, we need to explicitly remove the old copied block from the successors list. Normally if conversion relies on TII->AnalyzeBranch combined with BB->CorrectExtraCFGEdges to cleanup the successors list, but if the predicated block contained an un-analyzable branch (such as a now-predicated return), then this will fail. These extra successors were causing a problem on PPC because it was causing later passes (such as PPCEarlyReturm) to leave dead return-only basic blocks in the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/PowerPC/bdzlr.ll1
-rw-r--r--test/CodeGen/PowerPC/early-ret2.ll1
2 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGen/PowerPC/bdzlr.ll b/test/CodeGen/PowerPC/bdzlr.ll
index 1d3b31ba10..656a85860d 100644
--- a/test/CodeGen/PowerPC/bdzlr.ll
+++ b/test/CodeGen/PowerPC/bdzlr.ll
@@ -53,6 +53,7 @@ for.end: ; preds = %for.body, %if.end,
; CHECK: bnelr
; CHECK: bnelr
; CHECK: bdzlr
+; CHECK-NOT: blr
}
attributes #0 = { nounwind }
diff --git a/test/CodeGen/PowerPC/early-ret2.ll b/test/CodeGen/PowerPC/early-ret2.ll
index bedd16ce4d..a274e2c265 100644
--- a/test/CodeGen/PowerPC/early-ret2.ll
+++ b/test/CodeGen/PowerPC/early-ret2.ll
@@ -17,7 +17,6 @@ while.end: ; preds = %while.body, %while.
; CHECK: @_Z8example3iPiS_
; CHECK: bnelr
-; CHECK: bnelr
}
attributes #0 = { noinline nounwind }