1 ; RUN: opt < %s -instcombine -S | FileCheck %s
3 define void @test(float* %a, float* readnone %a_end, i64 %b) unnamed_addr {
5 %cmp1 = icmp ult float* %a, %a_end
6 br i1 %cmp1, label %for.body.preheader, label %for.end
8 for.body.preheader: ; preds = %entry
9 %b.float = inttoptr i64 %b to float*
12 for.body: ; preds = %for.body.preheader, %for.body
13 %a.addr.03 = phi float* [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ]
14 %b.addr.float = phi float* [ %b.addr.float.inc, %for.body ], [ %b.float, %for.body.preheader ]
15 %b.addr.i64 = phi i64 [ %b.addr.i64.inc, %for.body ], [ %b, %for.body.preheader ]
16 ; CHECK: %a.addr.03 = phi float* [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ]
17 ; CHECK-NEXT: %b.addr.float = phi float* [ %b.addr.float.inc, %for.body ], [ %b.float, %for.body.preheader ]
18 ; CHECK-NEXT: = load float
19 %l = load float, float* %b.addr.float, align 4
20 %mul.i = fmul float %l, 4.200000e+01
21 store float %mul.i, float* %a.addr.03, align 4
23 %b.addr.float.2 = inttoptr i64 %b.addr.i64 to float*
25 %b.addr.float.inc = getelementptr inbounds float, float* %b.addr.float.2, i64 1
26 ; CHECK: %b.addr.float.inc =
27 %b.addr.i64.inc = ptrtoint float* %b.addr.float.inc to i64
29 %incdec.ptr = getelementptr inbounds float, float* %a.addr.03, i64 1
30 ; CHECK: %incdec.ptr =
31 %cmp = icmp ult float* %incdec.ptr, %a_end
32 br i1 %cmp, label %for.body, label %for.end
34 for.end: ; preds = %for.body, %entry