1 ; RUN: llvm-as < %s | opt -loop-reduce -disable-output
2 ; Test to make sure that loop-reduce never crashes on IV's
3 ; with different types but identical strides.
9 no_exit: ; preds = %no_exit, %entry
10 %indvar = phi uint [ 0, %entry ], [ %indvar.next, %no_exit ] ; <uint> [#uses=3]
11 %indvar = cast uint %indvar to short ; <short> [#uses=1]
12 %X.0.0 = mul short %indvar, 1234 ; <short> [#uses=1]
13 %tmp. = mul uint %indvar, 1234 ; <uint> [#uses=1]
14 %tmp.5 = cast short %X.0.0 to int ; <int> [#uses=1]
15 %tmp.3 = call int (...)* %bar( int %tmp.5, uint %tmp. ) ; <int> [#uses=0]
16 %tmp.0 = call bool %pred( ) ; <int> [#uses=1]
17 %indvar.next = add uint %indvar, 1 ; <uint> [#uses=1]
18 br bool %tmp.0, label %return, label %no_exit