[llvm-commits] CVS: llvm/test/Regression/Transforms/IndVarsSimplify/2003-09-23-NotAtTop.ll
Chris Lattner
lattner at cs.uiuc.edu
Tue Sep 23 15:27:02 PDT 2003
Changes in directory llvm/test/Regression/Transforms/IndVarsSimplify:
2003-09-23-NotAtTop.ll added (r1.1)
---
Log message:
new testcase
---
Diffs of the changes:
Index: llvm/test/Regression/Transforms/IndVarsSimplify/2003-09-23-NotAtTop.ll
diff -c /dev/null llvm/test/Regression/Transforms/IndVarsSimplify/2003-09-23-NotAtTop.ll:1.1
*** /dev/null Tue Sep 23 15:26:48 2003
--- llvm/test/Regression/Transforms/IndVarsSimplify/2003-09-23-NotAtTop.ll Tue Sep 23 15:26:38 2003
***************
*** 0 ****
--- 1,16 ----
+ ; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep -C 1 Loop: | grep Canonical
+
+ ; The indvar simplification code should ensure that the first PHI in the block
+ ; is the canonical one!
+
+ int %test() {
+ br label %Loop
+ Loop:
+ %NonIndvar = phi int [200, %0], [%NonIndvarNext, %Loop]
+ %Canonical = phi int [0, %0], [%CanonicalNext, %Loop]
+
+ %NonIndvarNext = div int %NonIndvar, 2
+ %CanonicalNext = add int %Canonical, 1
+ br label %Loop
+ }
+
More information about the llvm-commits
mailing list