1 ; RUN: opt < %s -instcombine -S > %t
2 ; RUN: not grep zext %t
4 ; RUN: grep "icmp ult" %t
6 ; Instcombine should convert the zext+slt into a simple ult.
8 define void @foo(double* %p) nounwind {
13 %indvar = phi i64 [ 0, %entry ], [ %indvar.next, %bb ]
14 %t0 = and i64 %indvar, 65535
15 %t1 = getelementptr double, double* %p, i64 %t0
16 %t2 = load double, double* %t1, align 8
17 %t3 = fmul double %t2, 2.2
18 store double %t3, double* %t1, align 8
19 %i.04 = trunc i64 %indvar to i16
20 %t4 = add i16 %i.04, 1
21 %t5 = zext i16 %t4 to i32
22 %t6 = icmp slt i32 %t5, 500
23 %indvar.next = add i64 %indvar, 1
24 br i1 %t6, label %bb, label %return