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