summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopRotate
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-02-20 20:49:25 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-02-20 20:49:25 +0000
commit911d5b3ace39c8351042bdc211e9ec59f5c08b7f (patch)
treeb4150655dde79fa944f5107f066ddc3e75b0ff0a /llvm/test/Transforms/LoopRotate
parenta5c57ccf2da8fed28a96f12c3227577c580ea0ad (diff)
downloadbcm5719-llvm-911d5b3ace39c8351042bdc211e9ec59f5c08b7f.tar.gz
bcm5719-llvm-911d5b3ace39c8351042bdc211e9ec59f5c08b7f.zip
LoopRotate: When reconstructing loop simplify form don't split edges from indirectbrs.
Yet another chapter in the endless story. While this looks like we leave the loop in a non-canonical state this replicates the logic in LoopSimplify so it doesn't diverge from the canonical form in any way. PR21968 llvm-svn: 230058
Diffstat (limited to 'llvm/test/Transforms/LoopRotate')
-rw-r--r--llvm/test/Transforms/LoopRotate/crash.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/Transforms/LoopRotate/crash.ll b/llvm/test/Transforms/LoopRotate/crash.ll
index fd922cb5569..e95f9a1f350 100644
--- a/llvm/test/Transforms/LoopRotate/crash.ll
+++ b/llvm/test/Transforms/LoopRotate/crash.ll
@@ -153,3 +153,21 @@ entry:
"5": ; preds = %"3", %entry
ret void
}
+
+; PR21968
+define void @test8(i1 %C, i8* %P) #0 {
+entry:
+ br label %for.cond
+
+for.cond: ; preds = %for.inc, %entry
+ br i1 %C, label %l_bad, label %for.body
+
+for.body: ; preds = %for.cond
+ indirectbr i8* %P, [label %for.inc, label %l_bad]
+
+for.inc: ; preds = %for.body
+ br label %for.cond
+
+l_bad: ; preds = %for.body, %for.cond
+ ret void
+}
OpenPOWER on IntegriCloud