summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LICM/2003-12-11-SinkingToPHI.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/LICM/2003-12-11-SinkingToPHI.ll')
-rw-r--r--llvm/test/Transforms/LICM/2003-12-11-SinkingToPHI.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/Transforms/LICM/2003-12-11-SinkingToPHI.ll b/llvm/test/Transforms/LICM/2003-12-11-SinkingToPHI.ll
new file mode 100644
index 00000000000..955e70b8e95
--- /dev/null
+++ b/llvm/test/Transforms/LICM/2003-12-11-SinkingToPHI.ll
@@ -0,0 +1,20 @@
+; RUN: llvm-upgrade < %s | llvm-as | opt -licm | lli
+
+implementation ; Functions:
+
+int %main() {
+entry:
+ br label %Loop
+
+Loop:
+ br bool true, label %LoopCont, label %Out
+LoopCont:
+ %X = add int 1, 0
+ br bool true, label %Out, label %Loop
+
+Out:
+ %V = phi int [ 2, %Loop], [ %X, %LoopCont]
+ %V2 = sub int %V, 1
+ ret int %V2
+}
+
OpenPOWER on IntegriCloud