aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/SimplifyCFG/branch-phi-thread.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/SimplifyCFG/branch-phi-thread.ll')
-rw-r--r--test/Transforms/SimplifyCFG/branch-phi-thread.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/branch-phi-thread.ll b/test/Transforms/SimplifyCFG/branch-phi-thread.ll
index 2da837d73b..491bb0eefa 100644
--- a/test/Transforms/SimplifyCFG/branch-phi-thread.ll
+++ b/test/Transforms/SimplifyCFG/branch-phi-thread.ll
@@ -42,3 +42,22 @@ F:
ret int 123
}
+int %test3(int %X, bool %D, int* %AP, int* %BP) {
+E:
+ %C = seteq int %X, 0
+ br bool %C, label %T, label %F
+T:
+ call void %f3() ;; Inst in block.
+ %XX = load int* %AP
+ store int %XX, int* %BP
+ br bool %C, label %B, label %A
+A:
+ call void %f1()
+ br bool %D, label %T, label %F
+B:
+ call void %f2()
+ ret int 345
+F:
+ call void %f3()
+ ret int 123
+}