1 ; RUN: opt < %s -basicaa -licm -S | FileCheck %s
3 @a = external constant float*
5 define void @test(i32 %count) {
9 ; CHECK: %tmp3 = load float*, float** @a
10 ; CHECK: br label %forcond
13 %i.0 = phi i32 [ 0, %entry ], [ %inc, %forbody ]
14 %cmp = icmp ult i32 %i.0, %count
15 br i1 %cmp, label %forbody, label %afterfor
17 ; CHECK: %i.0 = phi i32 [ 0, %entry ], [ %inc, %forbody ]
18 ; CHECK: %cmp = icmp ult i32 %i.0, %count
19 ; CHECK: br i1 %cmp, label %forbody, label %afterfor
22 %tmp3 = load float*, float** @a
23 %arrayidx = getelementptr float, float* %tmp3, i32 %i.0
24 %tmp7 = uitofp i32 %i.0 to float
25 store float %tmp7, float* %arrayidx
26 %inc = add i32 %i.0, 1
29 ; CHECK: %arrayidx = getelementptr float, float* %tmp3, i32 %i.0
30 ; CHECK: %tmp7 = uitofp i32 %i.0 to float
31 ; CHECK: store float %tmp7, float* %arrayidx
32 ; CHECK: %inc = add i32 %i.0, 1
33 ; CHECK: br label %forcond