; 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
}


; RUN: llvm-as < %s | opt -indvars  | llvm-dis | grep -C1 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
}


Improve testcase portability on OS/X
Improve testcase portability on OS/X


git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@10337 91177308-0d34-0410-b5e6-96231b3b80d8
