new testcase

llvm-svn: 8688
This commit is contained in:
Chris Lattner 2003-09-23 20:26:38 +00:00
parent 427929adfb
commit a4e0f76fb8
1 changed files with 16 additions and 0 deletions

View File

@ -0,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
}