Another testcase
authorChris Lattner <sabre@nondot.org>
Sun, 18 Apr 2004 06:55:57 +0000 (06:55 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 18 Apr 2004 06:55:57 +0000 (06:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13037 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/IndVarsSimplify/exit_value_tests.llx

index e5defcbd3386656ece4abff4bd88c7e777726455..3f527ca369a55ee8b7840ce6e1a15f2c5dda03f7 100644 (file)
@@ -87,3 +87,16 @@ Out:
         ret short %B1
 }
 
+uint %linear_div_fold() {   ;; for (i = 4; i != 68; i += 8)  (exit with i/2)
+entry:
+        br label %loop
+loop:
+        %i = phi uint [ 4, %entry ], [ %i.next, %loop ]
+        %i.next = add uint %i, 8
+        %RV = div uint %i, 2
+        %c = setne uint %i, 68
+        br bool %c, label %loop, label %loopexit
+loopexit:
+        ret uint %RV
+}
+