1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-30 23:42:52 +01:00
llvm-mirror/test/Regression/Transforms/IndVarsSimplify/2003-09-23-NotAtTop.ll

17 lines
437 B
LLVM
Raw Normal View History

; RUN: llvm-as < %s | opt -indvars | llvm-dis | %prcontext Loop: 1 | grep %indvar
2003-09-23 22:26:38 +02:00
; 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
}