Finally I'm able to distill a testcase for a problem I'm seeing!
authorChris Lattner <sabre@nondot.org>
Mon, 7 Oct 2002 20:05:27 +0000 (20:05 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 7 Oct 2002 20:05:27 +0000 (20:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4063 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/CorrelatedExprs/2002-10-07-DominatorProblem.ll [new file with mode: 0644]

diff --git a/test/Transforms/CorrelatedExprs/2002-10-07-DominatorProblem.ll b/test/Transforms/CorrelatedExprs/2002-10-07-DominatorProblem.ll
new file mode 100644 (file)
index 0000000..a8dd168
--- /dev/null
@@ -0,0 +1,24 @@
+
+
+implementation
+
+int %test(int %A, int %B, bool %c0) {
+Start:
+       %c1 = seteq int %A, %B
+       br bool %c1, label %Eq, label %Loop
+
+Eq:    ; In this block we know that A == B
+       br label %Loop    ; This should be modified to branch to "Forwarded".
+
+Loop:        ;; Merge point, nothing is known here...
+       %Z = phi int [%A, %Start], [%B, %Eq], [%Z, %Bottom]
+       %c2 = setgt int %A, %B
+       br bool %c2, label %Forwarded, label %Bottom
+
+Forwarded:
+       call int %test(int 0, int %Z, bool true)
+       br label %Bottom
+
+Bottom:
+       br label %Loop
+}