diff options
Diffstat (limited to 'test/Transforms/LoopVectorize')
130 files changed, 1865 insertions, 1616 deletions
diff --git a/test/Transforms/LoopVectorize/12-12-11-if-conv.ll b/test/Transforms/LoopVectorize/12-12-11-if-conv.ll index a292afb..d5e020c 100644 --- a/test/Transforms/LoopVectorize/12-12-11-if-conv.ll +++ b/test/Transforms/LoopVectorize/12-12-11-if-conv.ll @@ -14,8 +14,8 @@ entry: for.body: ; preds = %entry, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %tobool = icmp eq i32 %0, 0 br i1 %tobool, label %if.end, label %if.then diff --git a/test/Transforms/LoopVectorize/2012-10-22-isconsec.ll b/test/Transforms/LoopVectorize/2012-10-22-isconsec.ll index 16d64ea..9d848bd 100644 --- a/test/Transforms/LoopVectorize/2012-10-22-isconsec.ll +++ b/test/Transforms/LoopVectorize/2012-10-22-isconsec.ll @@ -22,7 +22,7 @@ entry: "3": ; preds = %"3.lr.ph", %"3" %indvars.iv = phi i64 [ 0, %"3.lr.ph" ], [ %indvars.iv.next, %"3" ] %3 = shl nsw i64 %indvars.iv, 2 - %4 = getelementptr inbounds i8* %1, i64 %3 + %4 = getelementptr inbounds i8, i8* %1, i64 %3 %5 = bitcast i8* %4 to float* store float %value, float* %5, align 4 %indvars.iv.next = add i64 %indvars.iv, %2 @@ -41,7 +41,7 @@ entry: "3": ; preds = %"3", %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %"3" ] %0 = shl nsw i64 %indvars.iv, 2 - %1 = getelementptr inbounds i8* bitcast (float* getelementptr inbounds ([32000 x float]* @b, i64 0, i64 16000) to i8*), i64 %0 + %1 = getelementptr inbounds i8, i8* bitcast (float* getelementptr inbounds ([32000 x float], [32000 x float]* @b, i64 0, i64 16000) to i8*), i64 %0 %2 = bitcast i8* %1 to float* store float -1.000000e+00, float* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/AArch64/aarch64-unroll.ll b/test/Transforms/LoopVectorize/AArch64/aarch64-unroll.ll index 9962c3d..a689f44 100644 --- a/test/Transforms/LoopVectorize/AArch64/aarch64-unroll.ll +++ b/test/Transforms/LoopVectorize/AArch64/aarch64-unroll.ll @@ -22,12 +22,12 @@ for.body.preheader: ; preds = %entry for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds i32* %a, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds i32* %b, i64 %indvars.iv - %1 = load i32* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %b, i64 %indvars.iv + %1 = load i32, i32* %arrayidx2, align 4 %add = add nsw i32 %1, %0 - %arrayidx4 = getelementptr inbounds i32* %c, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds i32, i32* %c, i64 %indvars.iv store i32 %add, i32* %arrayidx4, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/AArch64/arbitrary-induction-step.ll b/test/Transforms/LoopVectorize/AArch64/arbitrary-induction-step.ll index 95734bf..4cd703f 100644 --- a/test/Transforms/LoopVectorize/AArch64/arbitrary-induction-step.ll +++ b/test/Transforms/LoopVectorize/AArch64/arbitrary-induction-step.ll @@ -11,8 +11,8 @@ target triple = "aarch64--linux-gnueabi" ; } ; CHECK-LABEL: @ind_plus2( -; CHECK: load <4 x i32>* -; CHECK: load <4 x i32>* +; CHECK: load <4 x i32>, <4 x i32>* +; CHECK: load <4 x i32>, <4 x i32>* ; CHECK: mul nsw <4 x i32> ; CHECK: mul nsw <4 x i32> ; CHECK: add nsw <4 x i32> @@ -21,7 +21,7 @@ target triple = "aarch64--linux-gnueabi" ; CHECK: icmp eq i64 %index.next, 512 ; FORCE-VEC-LABEL: @ind_plus2( -; FORCE-VEC: %wide.load = load <2 x i32>* +; FORCE-VEC: %wide.load = load <2 x i32>, <2 x i32>* ; FORCE-VEC: mul nsw <2 x i32> ; FORCE-VEC: add nsw <2 x i32> ; FORCE-VEC: %index.next = add i64 %index, 2 @@ -34,8 +34,8 @@ for.body: ; preds = %entry, %for.body %A.addr = phi i32* [ %A, %entry ], [ %inc.ptr, %for.body ] %i = phi i32 [ 0, %entry ], [ %add1, %for.body ] %sum = phi i32 [ 0, %entry ], [ %add, %for.body ] - %inc.ptr = getelementptr inbounds i32* %A.addr, i64 1 - %0 = load i32* %A.addr, align 4 + %inc.ptr = getelementptr inbounds i32, i32* %A.addr, i64 1 + %0 = load i32, i32* %A.addr, align 4 %mul = mul nsw i32 %0, %i %add = add nsw i32 %mul, %sum %add1 = add nsw i32 %i, 2 @@ -55,8 +55,8 @@ for.end: ; preds = %for.body ; } ; CHECK-LABEL: @ind_minus2( -; CHECK: load <4 x i32>* -; CHECK: load <4 x i32>* +; CHECK: load <4 x i32>, <4 x i32>* +; CHECK: load <4 x i32>, <4 x i32>* ; CHECK: mul nsw <4 x i32> ; CHECK: mul nsw <4 x i32> ; CHECK: add nsw <4 x i32> @@ -65,7 +65,7 @@ for.end: ; preds = %for.body ; CHECK: icmp eq i64 %index.next, 512 ; FORCE-VEC-LABEL: @ind_minus2( -; FORCE-VEC: %wide.load = load <2 x i32>* +; FORCE-VEC: %wide.load = load <2 x i32>, <2 x i32>* ; FORCE-VEC: mul nsw <2 x i32> ; FORCE-VEC: add nsw <2 x i32> ; FORCE-VEC: %index.next = add i64 %index, 2 @@ -78,8 +78,8 @@ for.body: ; preds = %entry, %for.body %A.addr = phi i32* [ %A, %entry ], [ %inc.ptr, %for.body ] %i = phi i32 [ 1024, %entry ], [ %sub, %for.body ] %sum = phi i32 [ 0, %entry ], [ %add, %for.body ] - %inc.ptr = getelementptr inbounds i32* %A.addr, i64 1 - %0 = load i32* %A.addr, align 4 + %inc.ptr = getelementptr inbounds i32, i32* %A.addr, i64 1 + %0 = load i32, i32* %A.addr, align 4 %mul = mul nsw i32 %0, %i %add = add nsw i32 %mul, %sum %sub = add nsw i32 %i, -2 @@ -102,10 +102,10 @@ for.end: ; preds = %for.body ; } ; CHECK-LABEL: @ptr_ind_plus2( -; CHECK: load i32* -; CHECK: load i32* -; CHECK: load i32* -; CHECK: load i32* +; CHECK: load i32, i32* +; CHECK: load i32, i32* +; CHECK: load i32, i32* +; CHECK: load i32, i32* ; CHECK: mul nsw i32 ; CHECK: mul nsw i32 ; CHECK: add nsw i32 @@ -114,13 +114,13 @@ for.end: ; preds = %for.body ; CHECK: %21 = icmp eq i64 %index.next, 1024 ; FORCE-VEC-LABEL: @ptr_ind_plus2( -; FORCE-VEC: load i32* +; FORCE-VEC: load i32, i32* ; FORCE-VEC: insertelement <2 x i32> -; FORCE-VEC: load i32* +; FORCE-VEC: load i32, i32* ; FORCE-VEC: insertelement <2 x i32> -; FORCE-VEC: load i32* +; FORCE-VEC: load i32, i32* ; FORCE-VEC: insertelement <2 x i32> -; FORCE-VEC: load i32* +; FORCE-VEC: load i32, i32* ; FORCE-VEC: insertelement <2 x i32> ; FORCE-VEC: mul nsw <2 x i32> ; FORCE-VEC: add nsw <2 x i32> @@ -134,10 +134,10 @@ for.body: ; preds = %for.body, %entry %A.addr = phi i32* [ %A, %entry ], [ %inc.ptr1, %for.body ] %sum = phi i32 [ 0, %entry ], [ %add, %for.body ] %i = phi i32 [ 0, %entry ], [ %inc, %for.body ] - %inc.ptr = getelementptr inbounds i32* %A.addr, i64 1 - %0 = load i32* %A.addr, align 4 - %inc.ptr1 = getelementptr inbounds i32* %A.addr, i64 2 - %1 = load i32* %inc.ptr, align 4 + %inc.ptr = getelementptr inbounds i32, i32* %A.addr, i64 1 + %0 = load i32, i32* %A.addr, align 4 + %inc.ptr1 = getelementptr inbounds i32, i32* %A.addr, i64 2 + %1 = load i32, i32* %inc.ptr, align 4 %mul = mul nsw i32 %1, %0 %add = add nsw i32 %mul, %sum %inc = add nsw i32 %i, 1 diff --git a/test/Transforms/LoopVectorize/AArch64/arm64-unroll.ll b/test/Transforms/LoopVectorize/AArch64/arm64-unroll.ll index f8eb3ed..395b468 100644 --- a/test/Transforms/LoopVectorize/AArch64/arm64-unroll.ll +++ b/test/Transforms/LoopVectorize/AArch64/arm64-unroll.ll @@ -22,12 +22,12 @@ for.body.preheader: ; preds = %entry for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds i32* %a, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds i32* %b, i64 %indvars.iv - %1 = load i32* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %b, i64 %indvars.iv + %1 = load i32, i32* %arrayidx2, align 4 %add = add nsw i32 %1, %0 - %arrayidx4 = getelementptr inbounds i32* %c, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds i32, i32* %c, i64 %indvars.iv store i32 %add, i32* %arrayidx4, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/AArch64/gather-cost.ll b/test/Transforms/LoopVectorize/AArch64/gather-cost.ll index bb28538..46b8ef1 100644 --- a/test/Transforms/LoopVectorize/AArch64/gather-cost.ll +++ b/test/Transforms/LoopVectorize/AArch64/gather-cost.ll @@ -30,32 +30,32 @@ for.body: %b.054 = phi float [ 0.000000e+00, %for.body.lr.ph ], [ %add30, %for.body ] %add = add i64 %v.055, %offset %mul = mul i64 %add, 3 - %arrayidx = getelementptr inbounds [1536 x float]* @src_data, i64 0, i64 %mul - %0 = load float* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds [512 x float]* @kernel, i64 0, i64 %v.055 - %1 = load float* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds [1536 x float], [1536 x float]* @src_data, i64 0, i64 %mul + %0 = load float, float* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds [512 x float], [512 x float]* @kernel, i64 0, i64 %v.055 + %1 = load float, float* %arrayidx2, align 4 %mul3 = fmul fast float %0, %1 - %arrayidx4 = getelementptr inbounds [512 x float]* @kernel2, i64 0, i64 %v.055 - %2 = load float* %arrayidx4, align 4 + %arrayidx4 = getelementptr inbounds [512 x float], [512 x float]* @kernel2, i64 0, i64 %v.055 + %2 = load float, float* %arrayidx4, align 4 %mul5 = fmul fast float %mul3, %2 - %arrayidx6 = getelementptr inbounds [512 x float]* @kernel3, i64 0, i64 %v.055 - %3 = load float* %arrayidx6, align 4 + %arrayidx6 = getelementptr inbounds [512 x float], [512 x float]* @kernel3, i64 0, i64 %v.055 + %3 = load float, float* %arrayidx6, align 4 %mul7 = fmul fast float %mul5, %3 - %arrayidx8 = getelementptr inbounds [512 x float]* @kernel4, i64 0, i64 %v.055 - %4 = load float* %arrayidx8, align 4 + %arrayidx8 = getelementptr inbounds [512 x float], [512 x float]* @kernel4, i64 0, i64 %v.055 + %4 = load float, float* %arrayidx8, align 4 %mul9 = fmul fast float %mul7, %4 %add10 = fadd fast float %r.057, %mul9 %arrayidx.sum = add i64 %mul, 1 - %arrayidx11 = getelementptr inbounds [1536 x float]* @src_data, i64 0, i64 %arrayidx.sum - %5 = load float* %arrayidx11, align 4 + %arrayidx11 = getelementptr inbounds [1536 x float], [1536 x float]* @src_data, i64 0, i64 %arrayidx.sum + %5 = load float, float* %arrayidx11, align 4 %mul13 = fmul fast float %1, %5 %mul15 = fmul fast float %2, %mul13 %mul17 = fmul fast float %3, %mul15 %mul19 = fmul fast float %4, %mul17 %add20 = fadd fast float %g.056, %mul19 %arrayidx.sum52 = add i64 %mul, 2 - %arrayidx21 = getelementptr inbounds [1536 x float]* @src_data, i64 0, i64 %arrayidx.sum52 - %6 = load float* %arrayidx21, align 4 + %arrayidx21 = getelementptr inbounds [1536 x float], [1536 x float]* @src_data, i64 0, i64 %arrayidx.sum52 + %6 = load float, float* %arrayidx21, align 4 %mul23 = fmul fast float %1, %6 %mul25 = fmul fast float %2, %mul23 %mul27 = fmul fast float %3, %mul25 diff --git a/test/Transforms/LoopVectorize/AArch64/sdiv-pow2.ll b/test/Transforms/LoopVectorize/AArch64/sdiv-pow2.ll index a01d543..f3c6548 100644 --- a/test/Transforms/LoopVectorize/AArch64/sdiv-pow2.ll +++ b/test/Transforms/LoopVectorize/AArch64/sdiv-pow2.ll @@ -7,7 +7,7 @@ target triple = "aarch64--linux-gnu" @Foo = common global %struct.anon zeroinitializer, align 4 ; CHECK-LABEL: @foo( -; CHECK: load <4 x i32>* +; CHECK: load <4 x i32>, <4 x i32>* ; CHECK: sdiv <4 x i32> ; CHECK: store <4 x i32> @@ -17,10 +17,10 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds %struct.anon* @Foo, i64 0, i32 2, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds %struct.anon, %struct.anon* @Foo, i64 0, i32 2, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %div = sdiv i32 %0, 2 - %arrayidx2 = getelementptr inbounds %struct.anon* @Foo, i64 0, i32 0, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds %struct.anon, %struct.anon* @Foo, i64 0, i32 0, i64 %indvars.iv store i32 %div, i32* %arrayidx2, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 100 diff --git a/test/Transforms/LoopVectorize/ARM/arm-unroll.ll b/test/Transforms/LoopVectorize/ARM/arm-unroll.ll index 8843fc2..7b09913 100644 --- a/test/Transforms/LoopVectorize/ARM/arm-unroll.ll +++ b/test/Transforms/LoopVectorize/ARM/arm-unroll.ll @@ -20,8 +20,8 @@ define i32 @foo(i32* nocapture %A, i32 %n) nounwind readonly ssp { .lr.ph: ; preds = %0, %.lr.ph %i.02 = phi i32 [ %5, %.lr.ph ], [ 0, %0 ] %sum.01 = phi i32 [ %4, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds i32* %A, i32 %i.02 - %3 = load i32* %2, align 4 + %2 = getelementptr inbounds i32, i32* %A, i32 %i.02 + %3 = load i32, i32* %2, align 4 %4 = add nsw i32 %3, %sum.01 %5 = add nsw i32 %i.02, 1 %exitcond = icmp eq i32 %5, %n @@ -48,8 +48,8 @@ define i32 @register_limit(i32* nocapture %A, i32 %n) { %sum.04 = phi i32 [ %8, %.lr.ph ], [ 0, %0 ] %sum.05 = phi i32 [ %9, %.lr.ph ], [ 0, %0 ] %sum.06 = phi i32 [ %10, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds i32* %A, i32 %i.02 - %3 = load i32* %2, align 4 + %2 = getelementptr inbounds i32, i32* %A, i32 %i.02 + %3 = load i32, i32* %2, align 4 %4 = add nsw i32 %3, %sum.01 %5 = add nsw i32 %i.02, 1 %6 = add nsw i32 %3, %sum.02 diff --git a/test/Transforms/LoopVectorize/ARM/gather-cost.ll b/test/Transforms/LoopVectorize/ARM/gather-cost.ll index 239a28f..f14a8cc 100644 --- a/test/Transforms/LoopVectorize/ARM/gather-cost.ll +++ b/test/Transforms/LoopVectorize/ARM/gather-cost.ll @@ -33,32 +33,32 @@ for.body: %b.054 = phi float [ 0.000000e+00, %for.body.lr.ph ], [ %add30, %for.body ] %add = add i32 %v.055, %offset %mul = mul i32 %add, 3 - %arrayidx = getelementptr inbounds [1536 x float]* @src_data, i32 0, i32 %mul - %0 = load float* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds [512 x float]* @kernel, i32 0, i32 %v.055 - %1 = load float* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds [1536 x float], [1536 x float]* @src_data, i32 0, i32 %mul + %0 = load float, float* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds [512 x float], [512 x float]* @kernel, i32 0, i32 %v.055 + %1 = load float, float* %arrayidx2, align 4 %mul3 = fmul fast float %0, %1 - %arrayidx4 = getelementptr inbounds [512 x float]* @kernel2, i32 0, i32 %v.055 - %2 = load float* %arrayidx4, align 4 + %arrayidx4 = getelementptr inbounds [512 x float], [512 x float]* @kernel2, i32 0, i32 %v.055 + %2 = load float, float* %arrayidx4, align 4 %mul5 = fmul fast float %mul3, %2 - %arrayidx6 = getelementptr inbounds [512 x float]* @kernel3, i32 0, i32 %v.055 - %3 = load float* %arrayidx6, align 4 + %arrayidx6 = getelementptr inbounds [512 x float], [512 x float]* @kernel3, i32 0, i32 %v.055 + %3 = load float, float* %arrayidx6, align 4 %mul7 = fmul fast float %mul5, %3 - %arrayidx8 = getelementptr inbounds [512 x float]* @kernel4, i32 0, i32 %v.055 - %4 = load float* %arrayidx8, align 4 + %arrayidx8 = getelementptr inbounds [512 x float], [512 x float]* @kernel4, i32 0, i32 %v.055 + %4 = load float, float* %arrayidx8, align 4 %mul9 = fmul fast float %mul7, %4 %add10 = fadd fast float %r.057, %mul9 %arrayidx.sum = add i32 %mul, 1 - %arrayidx11 = getelementptr inbounds [1536 x float]* @src_data, i32 0, i32 %arrayidx.sum - %5 = load float* %arrayidx11, align 4 + %arrayidx11 = getelementptr inbounds [1536 x float], [1536 x float]* @src_data, i32 0, i32 %arrayidx.sum + %5 = load float, float* %arrayidx11, align 4 %mul13 = fmul fast float %1, %5 %mul15 = fmul fast float %2, %mul13 %mul17 = fmul fast float %3, %mul15 %mul19 = fmul fast float %4, %mul17 %add20 = fadd fast float %g.056, %mul19 %arrayidx.sum52 = add i32 %mul, 2 - %arrayidx21 = getelementptr inbounds [1536 x float]* @src_data, i32 0, i32 %arrayidx.sum52 - %6 = load float* %arrayidx21, align 4 + %arrayidx21 = getelementptr inbounds [1536 x float], [1536 x float]* @src_data, i32 0, i32 %arrayidx.sum52 + %6 = load float, float* %arrayidx21, align 4 %mul23 = fmul fast float %1, %6 %mul25 = fmul fast float %2, %mul23 %mul27 = fmul fast float %3, %mul25 diff --git a/test/Transforms/LoopVectorize/ARM/gcc-examples.ll b/test/Transforms/LoopVectorize/ARM/gcc-examples.ll index f2bd0ac..783156d 100644 --- a/test/Transforms/LoopVectorize/ARM/gcc-examples.ll +++ b/test/Transforms/LoopVectorize/ARM/gcc-examples.ll @@ -18,12 +18,12 @@ define void @example1() nounwind uwtable ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = add nsw i32 %5, %3 - %7 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %7 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv store i32 %6, i32* %7, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -44,10 +44,10 @@ define void @example10b(i16* noalias nocapture %sa, i16* noalias nocapture %sb, ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds i16* %sb, i64 %indvars.iv - %3 = load i16* %2, align 2 + %2 = getelementptr inbounds i16, i16* %sb, i64 %indvars.iv + %3 = load i16, i16* %2, align 2 %4 = sext i16 %3 to i32 - %5 = getelementptr inbounds i32* %ia, i64 %indvars.iv + %5 = getelementptr inbounds i32, i32* %ia, i64 %indvars.iv store i32 %4, i32* %5, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/ARM/mul-cast-vect.ll b/test/Transforms/LoopVectorize/ARM/mul-cast-vect.ll index d2e3de2..e88fcca 100644 --- a/test/Transforms/LoopVectorize/ARM/mul-cast-vect.ll +++ b/test/Transforms/LoopVectorize/ARM/mul-cast-vect.ll @@ -16,9 +16,9 @@ target triple = "armv7--linux-gnueabihf" define void @direct(%T432* %loadaddr, %T432* %loadaddr2, %T432* %storeaddr) { ; COST: function 'direct': - %v0 = load %T432* %loadaddr + %v0 = load %T432, %T432* %loadaddr ; ASM: vld1.64 - %v1 = load %T432* %loadaddr2 + %v1 = load %T432, %T432* %loadaddr2 ; ASM: vld1.64 %r3 = mul %T432 %v0, %v1 ; COST: cost of 2 for instruction: {{.*}} mul <4 x i32> @@ -30,9 +30,9 @@ define void @direct(%T432* %loadaddr, %T432* %loadaddr2, %T432* %storeaddr) { define void @ups1632(%T416* %loadaddr, %T416* %loadaddr2, %T432* %storeaddr) { ; COST: function 'ups1632': - %v0 = load %T416* %loadaddr + %v0 = load %T416, %T416* %loadaddr ; ASM: vldr - %v1 = load %T416* %loadaddr2 + %v1 = load %T416, %T416* %loadaddr2 ; ASM: vldr %r1 = sext %T416 %v0 to %T432 %r2 = sext %T416 %v1 to %T432 @@ -47,9 +47,9 @@ define void @ups1632(%T416* %loadaddr, %T416* %loadaddr2, %T432* %storeaddr) { define void @upu1632(%T416* %loadaddr, %T416* %loadaddr2, %T432* %storeaddr) { ; COST: function 'upu1632': - %v0 = load %T416* %loadaddr + %v0 = load %T416, %T416* %loadaddr ; ASM: vldr - %v1 = load %T416* %loadaddr2 + %v1 = load %T416, %T416* %loadaddr2 ; ASM: vldr %r1 = zext %T416 %v0 to %T432 %r2 = zext %T416 %v1 to %T432 @@ -64,9 +64,9 @@ define void @upu1632(%T416* %loadaddr, %T416* %loadaddr2, %T432* %storeaddr) { define void @ups3264(%T232* %loadaddr, %T232* %loadaddr2, %T264* %storeaddr) { ; COST: function 'ups3264': - %v0 = load %T232* %loadaddr + %v0 = load %T232, %T232* %loadaddr ; ASM: vldr - %v1 = load %T232* %loadaddr2 + %v1 = load %T232, %T232* %loadaddr2 ; ASM: vldr %r3 = mul %T232 %v0, %v1 ; ASM: vmul.i32 @@ -81,9 +81,9 @@ define void @ups3264(%T232* %loadaddr, %T232* %loadaddr2, %T264* %storeaddr) { define void @upu3264(%T232* %loadaddr, %T232* %loadaddr2, %T264* %storeaddr) { ; COST: function 'upu3264': - %v0 = load %T232* %loadaddr + %v0 = load %T232, %T232* %loadaddr ; ASM: vldr - %v1 = load %T232* %loadaddr2 + %v1 = load %T232, %T232* %loadaddr2 ; ASM: vldr %r3 = mul %T232 %v0, %v1 ; ASM: vmul.i32 @@ -98,9 +98,9 @@ define void @upu3264(%T232* %loadaddr, %T232* %loadaddr2, %T264* %storeaddr) { define void @dn3216(%T432* %loadaddr, %T432* %loadaddr2, %T416* %storeaddr) { ; COST: function 'dn3216': - %v0 = load %T432* %loadaddr + %v0 = load %T432, %T432* %loadaddr ; ASM: vld1.64 - %v1 = load %T432* %loadaddr2 + %v1 = load %T432, %T432* %loadaddr2 ; ASM: vld1.64 %r3 = mul %T432 %v0, %v1 ; ASM: vmul.i32 diff --git a/test/Transforms/LoopVectorize/ARM/width-detect.ll b/test/Transforms/LoopVectorize/ARM/width-detect.ll index 99d7fa7..66d2556 100644 --- a/test/Transforms/LoopVectorize/ARM/width-detect.ll +++ b/test/Transforms/LoopVectorize/ARM/width-detect.ll @@ -13,8 +13,8 @@ define float @foo_F32(float* nocapture %A, i32 %n) nounwind uwtable readonly ssp .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] %prod.01 = phi float [ %4, %.lr.ph ], [ 0.000000e+00, %0 ] - %2 = getelementptr inbounds float* %A, i64 %indvars.iv - %3 = load float* %2, align 8 + %2 = getelementptr inbounds float, float* %A, i64 %indvars.iv + %3 = load float, float* %2, align 8 %4 = fmul fast float %prod.01, %3 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -36,8 +36,8 @@ define signext i8 @foo_I8(i8* nocapture %A, i32 %n) nounwind uwtable readonly ss .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] %red.01 = phi i8 [ %4, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds i8* %A, i64 %indvars.iv - %3 = load i8* %2, align 1 + %2 = getelementptr inbounds i8, i8* %A, i64 %indvars.iv + %3 = load i8, i8* %2, align 1 %4 = xor i8 %3, %red.01 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/PowerPC/large-loop-rdx.ll b/test/Transforms/LoopVectorize/PowerPC/large-loop-rdx.ll new file mode 100644 index 0000000..de6595f --- /dev/null +++ b/test/Transforms/LoopVectorize/PowerPC/large-loop-rdx.ll @@ -0,0 +1,73 @@ +; RUN: opt < %s -loop-vectorize -S | FileCheck %s + +; CHECK: fadd +; CHECK-NEXT: fadd +; CHECK-NEXT: fadd +; CHECK-NEXT: fadd +; CHECK-NEXT: fadd +; CHECK-NEXT: fadd +; CHECK-NEXT: fadd +; CHECK-NEXT: fadd +; CHECK-NEXT: fadd +; CHECK-NEXT: fadd +; CHECK-NEXT: fadd +; CHECK-NEXT: fadd +; CHECK-NEXT-NOT: fadd + +target datalayout = "e-m:e-i64:64-n32:64" +target triple = "powerpc64le-ibm-linux-gnu" + +define void @QLA_F3_r_veq_norm2_V(float* noalias nocapture %r, [3 x { float, float }]* noalias nocapture readonly %a, i32 signext %n) #0 { +entry: + %cmp24 = icmp sgt i32 %n, 0 + br i1 %cmp24, label %for.cond1.preheader.preheader, label %for.end13 + +for.cond1.preheader.preheader: ; preds = %entry + br label %for.cond1.preheader + +for.cond1.preheader: ; preds = %for.cond1.preheader.preheader, %for.cond1.preheader + %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond1.preheader ], [ 0, %for.cond1.preheader.preheader ] + %sum.026 = phi double [ %add10.2, %for.cond1.preheader ], [ 0.000000e+00, %for.cond1.preheader.preheader ] + %arrayidx5.realp = getelementptr inbounds [3 x { float, float }], [3 x { float, float }]* %a, i64 %indvars.iv, i64 0, i32 0 + %arrayidx5.real = load float, float* %arrayidx5.realp, align 8 + %arrayidx5.imagp = getelementptr inbounds [3 x { float, float }], [3 x { float, float }]* %a, i64 %indvars.iv, i64 0, i32 1 + %arrayidx5.imag = load float, float* %arrayidx5.imagp, align 8 + %mul = fmul fast float %arrayidx5.real, %arrayidx5.real + %mul9 = fmul fast float %arrayidx5.imag, %arrayidx5.imag + %add = fadd fast float %mul9, %mul + %conv = fpext float %add to double + %add10 = fadd fast double %conv, %sum.026 + %arrayidx5.realp.1 = getelementptr inbounds [3 x { float, float }], [3 x { float, float }]* %a, i64 %indvars.iv, i64 1, i32 0 + %arrayidx5.real.1 = load float, float* %arrayidx5.realp.1, align 8 + %arrayidx5.imagp.1 = getelementptr inbounds [3 x { float, float }], [3 x { float, float }]* %a, i64 %indvars.iv, i64 1, i32 1 + %arrayidx5.imag.1 = load float, float* %arrayidx5.imagp.1, align 8 + %mul.1 = fmul fast float %arrayidx5.real.1, %arrayidx5.real.1 + %mul9.1 = fmul fast float %arrayidx5.imag.1, %arrayidx5.imag.1 + %add.1 = fadd fast float %mul9.1, %mul.1 + %conv.1 = fpext float %add.1 to double + %add10.1 = fadd fast double %conv.1, %add10 + %arrayidx5.realp.2 = getelementptr inbounds [3 x { float, float }], [3 x { float, float }]* %a, i64 %indvars.iv, i64 2, i32 0 + %arrayidx5.real.2 = load float, float* %arrayidx5.realp.2, align 8 + %arrayidx5.imagp.2 = getelementptr inbounds [3 x { float, float }], [3 x { float, float }]* %a, i64 %indvars.iv, i64 2, i32 1 + %arrayidx5.imag.2 = load float, float* %arrayidx5.imagp.2, align 8 + %mul.2 = fmul fast float %arrayidx5.real.2, %arrayidx5.real.2 + %mul9.2 = fmul fast float %arrayidx5.imag.2, %arrayidx5.imag.2 + %add.2 = fadd fast float %mul9.2, %mul.2 + %conv.2 = fpext float %add.2 to double + %add10.2 = fadd fast double %conv.2, %add10.1 + %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 + %lftr.wideiv = trunc i64 %indvars.iv.next to i32 + %exitcond = icmp eq i32 %lftr.wideiv, %n + br i1 %exitcond, label %for.cond.for.end13_crit_edge, label %for.cond1.preheader + +for.cond.for.end13_crit_edge: ; preds = %for.cond1.preheader + %add10.2.lcssa = phi double [ %add10.2, %for.cond1.preheader ] + %phitmp = fptrunc double %add10.2.lcssa to float + br label %for.end13 + +for.end13: ; preds = %for.cond.for.end13_crit_edge, %entry + %sum.0.lcssa = phi float [ %phitmp, %for.cond.for.end13_crit_edge ], [ 0.000000e+00, %entry ] + store float %sum.0.lcssa, float* %r, align 4 + ret void +} + diff --git a/test/Transforms/LoopVectorize/PowerPC/small-loop-rdx.ll b/test/Transforms/LoopVectorize/PowerPC/small-loop-rdx.ll index 25e7d24..2898af2 100644 --- a/test/Transforms/LoopVectorize/PowerPC/small-loop-rdx.ll +++ b/test/Transforms/LoopVectorize/PowerPC/small-loop-rdx.ll @@ -29,8 +29,8 @@ for.body.lr.ph: ; preds = %entry for.body: ; preds = %for.body, %for.body.lr.ph %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ] %redx.05 = phi double [ 0.000000e+00, %for.body.lr.ph ], [ %add, %for.body ] - %arrayidx = getelementptr inbounds double* %arr, i64 %indvars.iv - %1 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %arr, i64 %indvars.iv + %1 = load double, double* %arrayidx, align 8 %add = fadd fast double %1, %redx.05 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv to i32 diff --git a/test/Transforms/LoopVectorize/PowerPC/vsx-tsvc-s173.ll b/test/Transforms/LoopVectorize/PowerPC/vsx-tsvc-s173.ll index 6cd9c4d..65b3919 100644 --- a/test/Transforms/LoopVectorize/PowerPC/vsx-tsvc-s173.ll +++ b/test/Transforms/LoopVectorize/PowerPC/vsx-tsvc-s173.ll @@ -9,7 +9,7 @@ target triple = "powerpc64-unknown-linux-gnu" define signext i32 @s173() #0 { entry: - %0 = load i32* @ntimes, align 4 + %0 = load i32, i32* @ntimes, align 4 %cmp21 = icmp sgt i32 %0, 0 br i1 %cmp21, label %for.cond1.preheader, label %for.end12 @@ -19,13 +19,13 @@ for.cond1.preheader: ; preds = %for.end, %entry for.body3: ; preds = %for.body3, %for.cond1.preheader %indvars.iv = phi i64 [ 0, %for.cond1.preheader ], [ %indvars.iv.next, %for.body3 ] - %arrayidx = getelementptr inbounds %struct.GlobalData* @global_data, i64 0, i32 0, i64 %indvars.iv - %1 = load float* %arrayidx, align 4 - %arrayidx5 = getelementptr inbounds %struct.GlobalData* @global_data, i64 0, i32 3, i64 %indvars.iv - %2 = load float* %arrayidx5, align 4 + %arrayidx = getelementptr inbounds %struct.GlobalData, %struct.GlobalData* @global_data, i64 0, i32 0, i64 %indvars.iv + %1 = load float, float* %arrayidx, align 4 + %arrayidx5 = getelementptr inbounds %struct.GlobalData, %struct.GlobalData* @global_data, i64 0, i32 3, i64 %indvars.iv + %2 = load float, float* %arrayidx5, align 4 %add = fadd float %1, %2 %3 = add nsw i64 %indvars.iv, 16000 - %arrayidx8 = getelementptr inbounds %struct.GlobalData* @global_data, i64 0, i32 0, i64 %3 + %arrayidx8 = getelementptr inbounds %struct.GlobalData, %struct.GlobalData* @global_data, i64 0, i32 0, i64 %3 store float %add, float* %arrayidx8, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 16000 @@ -33,7 +33,7 @@ for.body3: ; preds = %for.body3, %for.con for.end: ; preds = %for.body3 %inc11 = add nsw i32 %nl.022, 1 - %4 = load i32* @ntimes, align 4 + %4 = load i32, i32* @ntimes, align 4 %mul = mul nsw i32 %4, 10 %cmp = icmp slt i32 %inc11, %mul br i1 %cmp, label %for.cond1.preheader, label %for.end12 @@ -42,7 +42,7 @@ for.end12: ; preds = %for.end, %entry ret i32 0 ; CHECK-LABEL: @s173 -; CHECK: load <4 x float>* +; CHECK: load <4 x float>, <4 x float>* ; CHECK: add i64 %index, 16000 ; CHECK: ret i32 0 } diff --git a/test/Transforms/LoopVectorize/X86/already-vectorized.ll b/test/Transforms/LoopVectorize/X86/already-vectorized.ll index 29d74a0..c400c76 100644 --- a/test/Transforms/LoopVectorize/X86/already-vectorized.ll +++ b/test/Transforms/LoopVectorize/X86/already-vectorized.ll @@ -21,8 +21,8 @@ for.body: ; preds = %for.body, %entry ; CHECK: LV: We can vectorize this loop! %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %red.05 = phi i32 [ 0, %entry ], [ %add, %for.body ] - %arrayidx = getelementptr inbounds [255 x i32]* @a, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [255 x i32], [255 x i32]* @a, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %add = add nsw i32 %0, %red.05 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 255 @@ -42,5 +42,6 @@ for.end: ; preds = %for.body ; CHECK: [[vect]] = distinct !{[[vect]], [[width:![0-9]+]], [[unroll:![0-9]+]]} ; CHECK: [[width]] = !{!"llvm.loop.vectorize.width", i32 1} ; CHECK: [[unroll]] = !{!"llvm.loop.interleave.count", i32 1} -; CHECK: [[scalar]] = distinct !{[[scalar]], [[width]], [[unroll]]} +; CHECK: [[scalar]] = distinct !{[[scalar]], [[runtime_unroll:![0-9]+]], [[width]], [[unroll]]} +; CHECK: [[runtime_unroll]] = !{!"llvm.loop.unroll.runtime.disable"} diff --git a/test/Transforms/LoopVectorize/X86/assume.ll b/test/Transforms/LoopVectorize/X86/assume.ll index a94e24d..4fd378d 100644 --- a/test/Transforms/LoopVectorize/X86/assume.ll +++ b/test/Transforms/LoopVectorize/X86/assume.ll @@ -22,12 +22,12 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds float* %b, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %b, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp1 = fcmp ogt float %0, 1.000000e+02 tail call void @llvm.assume(i1 %cmp1) %add = fadd float %0, 1.000000e+00 - %arrayidx5 = getelementptr inbounds float* %a, i64 %indvars.iv + %arrayidx5 = getelementptr inbounds float, float* %a, i64 %indvars.iv store float %add, float* %arrayidx5, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv, 1599 @@ -48,13 +48,13 @@ attributes #1 = { nounwind } ; Function Attrs: nounwind uwtable define void @test2(%struct.data* nocapture readonly %d) #0 { entry: - %b = getelementptr inbounds %struct.data* %d, i64 0, i32 1 - %0 = load float** %b, align 8 + %b = getelementptr inbounds %struct.data, %struct.data* %d, i64 0, i32 1 + %0 = load float*, float** %b, align 8 %ptrint = ptrtoint float* %0 to i64 %maskedptr = and i64 %ptrint, 31 %maskcond = icmp eq i64 %maskedptr, 0 - %a = getelementptr inbounds %struct.data* %d, i64 0, i32 0 - %1 = load float** %a, align 8 + %a = getelementptr inbounds %struct.data, %struct.data* %d, i64 0, i32 0 + %1 = load float*, float** %a, align 8 %ptrint2 = ptrtoint float* %1 to i64 %maskedptr3 = and i64 %ptrint2, 31 %maskcond4 = icmp eq i64 %maskedptr3, 0 @@ -84,11 +84,11 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] tail call void @llvm.assume(i1 %maskcond) - %arrayidx = getelementptr inbounds float* %0, i64 %indvars.iv - %2 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %0, i64 %indvars.iv + %2 = load float, float* %arrayidx, align 4 %add = fadd float %2, 1.000000e+00 tail call void @llvm.assume(i1 %maskcond4) - %arrayidx5 = getelementptr inbounds float* %1, i64 %indvars.iv + %arrayidx5 = getelementptr inbounds float, float* %1, i64 %indvars.iv store float %add, float* %arrayidx5, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv, 1599 diff --git a/test/Transforms/LoopVectorize/X86/avx1.ll b/test/Transforms/LoopVectorize/X86/avx1.ll index 01c9125..37977c4 100644 --- a/test/Transforms/LoopVectorize/X86/avx1.ll +++ b/test/Transforms/LoopVectorize/X86/avx1.ll @@ -12,8 +12,8 @@ define i32 @read_mod_write_single_ptr(float* nocapture %a, i32 %n) nounwind uwta .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds float* %a, i64 %indvars.iv - %3 = load float* %2, align 4 + %2 = getelementptr inbounds float, float* %a, i64 %indvars.iv + %3 = load float, float* %2, align 4 %4 = fmul float %3, 3.000000e+00 store float %4, float* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -35,8 +35,8 @@ define i32 @read_mod_i64(i64* nocapture %a, i32 %n) nounwind uwtable ssp { .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds i64* %a, i64 %indvars.iv - %3 = load i64* %2, align 4 + %2 = getelementptr inbounds i64, i64* %a, i64 %indvars.iv + %3 = load i64, i64* %2, align 4 %4 = add i64 %3, 3 store i64 %4, i64* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/X86/avx512.ll b/test/Transforms/LoopVectorize/X86/avx512.ll index a220866..754e859 100644 --- a/test/Transforms/LoopVectorize/X86/avx512.ll +++ b/test/Transforms/LoopVectorize/X86/avx512.ll @@ -20,7 +20,7 @@ for.body.preheader: ; preds = %entry for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds i32* %a, i64 %indvars.iv + %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv store i32 %n, i32* %arrayidx, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/X86/constant-vector-operand.ll b/test/Transforms/LoopVectorize/X86/constant-vector-operand.ll index f4c07b4..d75b1d9 100644 --- a/test/Transforms/LoopVectorize/X86/constant-vector-operand.ll +++ b/test/Transforms/LoopVectorize/X86/constant-vector-operand.ll @@ -15,10 +15,10 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @B, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @B, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %shl = ashr i32 %0, 3 - %arrayidx2 = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv store i32 %shl, i32* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/X86/conversion-cost.ll b/test/Transforms/LoopVectorize/X86/conversion-cost.ll index 0af562d..eb2a2a5 100644 --- a/test/Transforms/LoopVectorize/X86/conversion-cost.ll +++ b/test/Transforms/LoopVectorize/X86/conversion-cost.ll @@ -13,7 +13,7 @@ define i32 @conversion_cost1(i32 %n, i8* nocapture %A, float* nocapture %B) noun .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 3, %0 ] %2 = trunc i64 %indvars.iv to i8 - %3 = getelementptr inbounds i8* %A, i64 %indvars.iv + %3 = getelementptr inbounds i8, i8* %A, i64 %indvars.iv store i8 %2, i8* %3, align 1 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -35,7 +35,7 @@ define i32 @conversion_cost2(i32 %n, i8* nocapture %A, float* nocapture %B) noun %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 9, %0 ] %add = add nsw i64 %indvars.iv, 3 %tofp = sitofp i64 %add to float - %gep = getelementptr inbounds float* %B, i64 %indvars.iv + %gep = getelementptr inbounds float, float* %B, i64 %indvars.iv store float %tofp, float* %gep, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/X86/cost-model.ll b/test/Transforms/LoopVectorize/X86/cost-model.ll index 98718e1..0136571 100644 --- a/test/Transforms/LoopVectorize/X86/cost-model.ll +++ b/test/Transforms/LoopVectorize/X86/cost-model.ll @@ -21,15 +21,15 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %0 = shl nsw i64 %indvars.iv, 1 - %arrayidx = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %0 - %1 = load i32* %arrayidx, align 8 + %arrayidx = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %0 + %1 = load i32, i32* %arrayidx, align 8 %idxprom1 = sext i32 %1 to i64 - %arrayidx2 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %idxprom1 - %2 = load i32* %arrayidx2, align 4 - %arrayidx4 = getelementptr inbounds [2048 x i32]* @d, i64 0, i64 %indvars.iv - %3 = load i32* %arrayidx4, align 4 + %arrayidx2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %idxprom1 + %2 = load i32, i32* %arrayidx2, align 4 + %arrayidx4 = getelementptr inbounds [2048 x i32], [2048 x i32]* @d, i64 0, i64 %indvars.iv + %3 = load i32, i32* %arrayidx4, align 4 %idxprom5 = sext i32 %3 to i64 - %arrayidx6 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %idxprom5 + %arrayidx6 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %idxprom5 store i32 %2, i32* %arrayidx6, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/X86/fp32_to_uint32-cost-model.ll b/test/Transforms/LoopVectorize/X86/fp32_to_uint32-cost-model.ll index 529ed88..4a56d6b 100644 --- a/test/Transforms/LoopVectorize/X86/fp32_to_uint32-cost-model.ll +++ b/test/Transforms/LoopVectorize/X86/fp32_to_uint32-cost-model.ll @@ -20,10 +20,10 @@ for.body.preheader: ; preds = %entry for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds [10000 x float]* @float_array, i64 0, i64 %indvars.iv - %1 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [10000 x float], [10000 x float]* @float_array, i64 0, i64 %indvars.iv + %1 = load float, float* %arrayidx, align 4 %conv = fptoui float %1 to i32 - %arrayidx2 = getelementptr inbounds [10000 x i32]* @unsigned_array, i64 0, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds [10000 x i32], [10000 x i32]* @unsigned_array, i64 0, i64 %indvars.iv store i32 %conv, i32* %arrayidx2, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/X86/fp64_to_uint32-cost-model.ll b/test/Transforms/LoopVectorize/X86/fp64_to_uint32-cost-model.ll index ef3e3be..c066afc 100644 --- a/test/Transforms/LoopVectorize/X86/fp64_to_uint32-cost-model.ll +++ b/test/Transforms/LoopVectorize/X86/fp64_to_uint32-cost-model.ll @@ -13,7 +13,7 @@ target triple = "x86_64-apple-macosx" define void @convert() { entry: - %0 = load i32* @n, align 4 + %0 = load i32, i32* @n, align 4 %cmp4 = icmp eq i32 %0, 0 br i1 %cmp4, label %for.end, label %for.body.preheader @@ -22,10 +22,10 @@ for.body.preheader: ; preds = %entry for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds [10000 x double]* @double_array, i64 0, i64 %indvars.iv - %1 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds [10000 x double], [10000 x double]* @double_array, i64 0, i64 %indvars.iv + %1 = load double, double* %arrayidx, align 8 %conv = fptoui double %1 to i32 - %arrayidx2 = getelementptr inbounds [10000 x i32]* @unsigned_array, i64 0, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds [10000 x i32], [10000 x i32]* @unsigned_array, i64 0, i64 %indvars.iv store i32 %conv, i32* %arrayidx2, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/X86/fp_to_sint8-cost-model.ll b/test/Transforms/LoopVectorize/X86/fp_to_sint8-cost-model.ll index 23e6227..b3a0710 100644 --- a/test/Transforms/LoopVectorize/X86/fp_to_sint8-cost-model.ll +++ b/test/Transforms/LoopVectorize/X86/fp_to_sint8-cost-model.ll @@ -11,10 +11,10 @@ entry: br label %for.body for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds float* %b, i64 %indvars.iv - %tmp = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %b, i64 %indvars.iv + %tmp = load float, float* %arrayidx, align 4 %conv = fptosi float %tmp to i8 - %arrayidx2 = getelementptr inbounds i8* %a, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds i8, i8* %a, i64 %indvars.iv store i8 %conv, i8* %arrayidx2, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 256 diff --git a/test/Transforms/LoopVectorize/X86/gather-cost.ll b/test/Transforms/LoopVectorize/X86/gather-cost.ll index 09363d6..f0e6c8f 100644 --- a/test/Transforms/LoopVectorize/X86/gather-cost.ll +++ b/test/Transforms/LoopVectorize/X86/gather-cost.ll @@ -31,32 +31,32 @@ for.body: %b.054 = phi float [ 0.000000e+00, %for.body.lr.ph ], [ %add30, %for.body ] %add = add i64 %v.055, %offset %mul = mul i64 %add, 3 - %arrayidx = getelementptr inbounds [1536 x float]* @src_data, i64 0, i64 %mul - %0 = load float* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds [512 x float]* @kernel, i64 0, i64 %v.055 - %1 = load float* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds [1536 x float], [1536 x float]* @src_data, i64 0, i64 %mul + %0 = load float, float* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds [512 x float], [512 x float]* @kernel, i64 0, i64 %v.055 + %1 = load float, float* %arrayidx2, align 4 %mul3 = fmul fast float %0, %1 - %arrayidx4 = getelementptr inbounds [512 x float]* @kernel2, i64 0, i64 %v.055 - %2 = load float* %arrayidx4, align 4 + %arrayidx4 = getelementptr inbounds [512 x float], [512 x float]* @kernel2, i64 0, i64 %v.055 + %2 = load float, float* %arrayidx4, align 4 %mul5 = fmul fast float %mul3, %2 - %arrayidx6 = getelementptr inbounds [512 x float]* @kernel3, i64 0, i64 %v.055 - %3 = load float* %arrayidx6, align 4 + %arrayidx6 = getelementptr inbounds [512 x float], [512 x float]* @kernel3, i64 0, i64 %v.055 + %3 = load float, float* %arrayidx6, align 4 %mul7 = fmul fast float %mul5, %3 - %arrayidx8 = getelementptr inbounds [512 x float]* @kernel4, i64 0, i64 %v.055 - %4 = load float* %arrayidx8, align 4 + %arrayidx8 = getelementptr inbounds [512 x float], [512 x float]* @kernel4, i64 0, i64 %v.055 + %4 = load float, float* %arrayidx8, align 4 %mul9 = fmul fast float %mul7, %4 %add10 = fadd fast float %r.057, %mul9 %arrayidx.sum = add i64 %mul, 1 - %arrayidx11 = getelementptr inbounds [1536 x float]* @src_data, i64 0, i64 %arrayidx.sum - %5 = load float* %arrayidx11, align 4 + %arrayidx11 = getelementptr inbounds [1536 x float], [1536 x float]* @src_data, i64 0, i64 %arrayidx.sum + %5 = load float, float* %arrayidx11, align 4 %mul13 = fmul fast float %1, %5 %mul15 = fmul fast float %2, %mul13 %mul17 = fmul fast float %3, %mul15 %mul19 = fmul fast float %4, %mul17 %add20 = fadd fast float %g.056, %mul19 %arrayidx.sum52 = add i64 %mul, 2 - %arrayidx21 = getelementptr inbounds [1536 x float]* @src_data, i64 0, i64 %arrayidx.sum52 - %6 = load float* %arrayidx21, align 4 + %arrayidx21 = getelementptr inbounds [1536 x float], [1536 x float]* @src_data, i64 0, i64 %arrayidx.sum52 + %6 = load float, float* %arrayidx21, align 4 %mul23 = fmul fast float %1, %6 %mul25 = fmul fast float %2, %mul23 %mul27 = fmul fast float %3, %mul25 diff --git a/test/Transforms/LoopVectorize/X86/gcc-examples.ll b/test/Transforms/LoopVectorize/X86/gcc-examples.ll index 05403cd..c581f4b 100644 --- a/test/Transforms/LoopVectorize/X86/gcc-examples.ll +++ b/test/Transforms/LoopVectorize/X86/gcc-examples.ll @@ -28,12 +28,12 @@ define void @example1() nounwind uwtable ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = add nsw i32 %5, %3 - %7 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %7 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv store i32 %6, i32* %7, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -61,10 +61,10 @@ define void @example10b(i16* noalias nocapture %sa, i16* noalias nocapture %sb, ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds i16* %sb, i64 %indvars.iv - %3 = load i16* %2, align 2 + %2 = getelementptr inbounds i16, i16* %sb, i64 %indvars.iv + %3 = load i16, i16* %2, align 2 %4 = sext i16 %3 to i32 - %5 = getelementptr inbounds i32* %ia, i64 %indvars.iv + %5 = getelementptr inbounds i32, i32* %ia, i64 %indvars.iv store i32 %4, i32* %5, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/X86/illegal-parallel-loop-uniform-write.ll b/test/Transforms/LoopVectorize/X86/illegal-parallel-loop-uniform-write.ll index 46efaf0..cbba530 100644 --- a/test/Transforms/LoopVectorize/X86/illegal-parallel-loop-uniform-write.ll +++ b/test/Transforms/LoopVectorize/X86/illegal-parallel-loop-uniform-write.ll @@ -14,8 +14,8 @@ entry: br i1 %cmp27, label %for.body3.lr.ph.us, label %for.end15 for.end.us: ; preds = %for.body3.us - %arrayidx9.us = getelementptr inbounds i32* %b, i64 %indvars.iv33 - %0 = load i32* %arrayidx9.us, align 4, !llvm.mem.parallel_loop_access !3 + %arrayidx9.us = getelementptr inbounds i32, i32* %b, i64 %indvars.iv33 + %0 = load i32, i32* %arrayidx9.us, align 4, !llvm.mem.parallel_loop_access !3 %add10.us = add nsw i32 %0, 3 store i32 %add10.us, i32* %arrayidx9.us, align 4, !llvm.mem.parallel_loop_access !3 %indvars.iv.next34 = add i64 %indvars.iv33, 1 @@ -28,8 +28,8 @@ for.body3.us: ; preds = %for.body3.us, %for. %1 = trunc i64 %indvars.iv29 to i32 %add4.us = add i32 %add.us, %1 %idxprom.us = sext i32 %add4.us to i64 - %arrayidx.us = getelementptr inbounds i32* %a, i64 %idxprom.us - %2 = load i32* %arrayidx.us, align 4, !llvm.mem.parallel_loop_access !3 + %arrayidx.us = getelementptr inbounds i32, i32* %a, i64 %idxprom.us + %2 = load i32, i32* %arrayidx.us, align 4, !llvm.mem.parallel_loop_access !3 %add5.us = add nsw i32 %2, 1 store i32 %add5.us, i32* %arrayidx7.us, align 4, !llvm.mem.parallel_loop_access !3 %indvars.iv.next30 = add i64 %indvars.iv29, 1 @@ -41,7 +41,7 @@ for.body3.lr.ph.us: ; preds = %for.end.us, %entry %indvars.iv33 = phi i64 [ %indvars.iv.next34, %for.end.us ], [ 0, %entry ] %3 = trunc i64 %indvars.iv33 to i32 %add.us = add i32 %3, %k - %arrayidx7.us = getelementptr inbounds i32* %a, i64 %indvars.iv33 + %arrayidx7.us = getelementptr inbounds i32, i32* %a, i64 %indvars.iv33 br label %for.body3.us for.end15: ; preds = %for.end.us, %entry diff --git a/test/Transforms/LoopVectorize/X86/masked_load_store.ll b/test/Transforms/LoopVectorize/X86/masked_load_store.ll index 9e2de80..8c375cc 100644 --- a/test/Transforms/LoopVectorize/X86/masked_load_store.ll +++ b/test/Transforms/LoopVectorize/X86/masked_load_store.ll @@ -46,35 +46,35 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 10000 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %idxprom = sext i32 %1 to i64 - %2 = load i32** %trigger.addr, align 8 - %arrayidx = getelementptr inbounds i32* %2, i64 %idxprom - %3 = load i32* %arrayidx, align 4 + %2 = load i32*, i32** %trigger.addr, align 8 + %arrayidx = getelementptr inbounds i32, i32* %2, i64 %idxprom + %3 = load i32, i32* %arrayidx, align 4 %cmp1 = icmp slt i32 %3, 100 br i1 %cmp1, label %if.then, label %if.end if.then: ; preds = %for.body - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %idxprom2 = sext i32 %4 to i64 - %5 = load i32** %B.addr, align 8 - %arrayidx3 = getelementptr inbounds i32* %5, i64 %idxprom2 - %6 = load i32* %arrayidx3, align 4 - %7 = load i32* %i, align 4 + %5 = load i32*, i32** %B.addr, align 8 + %arrayidx3 = getelementptr inbounds i32, i32* %5, i64 %idxprom2 + %6 = load i32, i32* %arrayidx3, align 4 + %7 = load i32, i32* %i, align 4 %idxprom4 = sext i32 %7 to i64 - %8 = load i32** %trigger.addr, align 8 - %arrayidx5 = getelementptr inbounds i32* %8, i64 %idxprom4 - %9 = load i32* %arrayidx5, align 4 + %8 = load i32*, i32** %trigger.addr, align 8 + %arrayidx5 = getelementptr inbounds i32, i32* %8, i64 %idxprom4 + %9 = load i32, i32* %arrayidx5, align 4 %add = add nsw i32 %6, %9 - %10 = load i32* %i, align 4 + %10 = load i32, i32* %i, align 4 %idxprom6 = sext i32 %10 to i64 - %11 = load i32** %A.addr, align 8 - %arrayidx7 = getelementptr inbounds i32* %11, i64 %idxprom6 + %11 = load i32*, i32** %A.addr, align 8 + %arrayidx7 = getelementptr inbounds i32, i32* %11, i64 %idxprom6 store i32 %add, i32* %arrayidx7, align 4 br label %if.end @@ -82,7 +82,7 @@ if.end: ; preds = %if.then, %for.body br label %for.inc for.inc: ; preds = %if.end - %12 = load i32* %i, align 4 + %12 = load i32, i32* %i, align 4 %inc = add nsw i32 %12, 1 store i32 %inc, i32* %i, align 4 br label %for.cond @@ -130,36 +130,36 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 10000 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %idxprom = sext i32 %1 to i64 - %2 = load i32** %trigger.addr, align 8 - %arrayidx = getelementptr inbounds i32* %2, i64 %idxprom - %3 = load i32* %arrayidx, align 4 + %2 = load i32*, i32** %trigger.addr, align 8 + %arrayidx = getelementptr inbounds i32, i32* %2, i64 %idxprom + %3 = load i32, i32* %arrayidx, align 4 %cmp1 = icmp slt i32 %3, 100 br i1 %cmp1, label %if.then, label %if.end if.then: ; preds = %for.body - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %idxprom2 = sext i32 %4 to i64 - %5 = load float** %B.addr, align 8 - %arrayidx3 = getelementptr inbounds float* %5, i64 %idxprom2 - %6 = load float* %arrayidx3, align 4 - %7 = load i32* %i, align 4 + %5 = load float*, float** %B.addr, align 8 + %arrayidx3 = getelementptr inbounds float, float* %5, i64 %idxprom2 + %6 = load float, float* %arrayidx3, align 4 + %7 = load i32, i32* %i, align 4 %idxprom4 = sext i32 %7 to i64 - %8 = load i32** %trigger.addr, align 8 - %arrayidx5 = getelementptr inbounds i32* %8, i64 %idxprom4 - %9 = load i32* %arrayidx5, align 4 + %8 = load i32*, i32** %trigger.addr, align 8 + %arrayidx5 = getelementptr inbounds i32, i32* %8, i64 %idxprom4 + %9 = load i32, i32* %arrayidx5, align 4 %conv = sitofp i32 %9 to float %add = fadd float %6, %conv - %10 = load i32* %i, align 4 + %10 = load i32, i32* %i, align 4 %idxprom6 = sext i32 %10 to i64 - %11 = load float** %A.addr, align 8 - %arrayidx7 = getelementptr inbounds float* %11, i64 %idxprom6 + %11 = load float*, float** %A.addr, align 8 + %arrayidx7 = getelementptr inbounds float, float* %11, i64 %idxprom6 store float %add, float* %arrayidx7, align 4 br label %if.end @@ -167,7 +167,7 @@ if.end: ; preds = %if.then, %for.body br label %for.inc for.inc: ; preds = %if.end - %12 = load i32* %i, align 4 + %12 = load i32, i32* %i, align 4 %inc = add nsw i32 %12, 1 store i32 %inc, i32* %i, align 4 br label %for.cond @@ -218,36 +218,36 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 10000 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %idxprom = sext i32 %1 to i64 - %2 = load i32** %trigger.addr, align 8 - %arrayidx = getelementptr inbounds i32* %2, i64 %idxprom - %3 = load i32* %arrayidx, align 4 + %2 = load i32*, i32** %trigger.addr, align 8 + %arrayidx = getelementptr inbounds i32, i32* %2, i64 %idxprom + %3 = load i32, i32* %arrayidx, align 4 %cmp1 = icmp slt i32 %3, 100 br i1 %cmp1, label %if.then, label %if.end if.then: ; preds = %for.body - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %idxprom2 = sext i32 %4 to i64 - %5 = load double** %B.addr, align 8 - %arrayidx3 = getelementptr inbounds double* %5, i64 %idxprom2 - %6 = load double* %arrayidx3, align 8 - %7 = load i32* %i, align 4 + %5 = load double*, double** %B.addr, align 8 + %arrayidx3 = getelementptr inbounds double, double* %5, i64 %idxprom2 + %6 = load double, double* %arrayidx3, align 8 + %7 = load i32, i32* %i, align 4 %idxprom4 = sext i32 %7 to i64 - %8 = load i32** %trigger.addr, align 8 - %arrayidx5 = getelementptr inbounds i32* %8, i64 %idxprom4 - %9 = load i32* %arrayidx5, align 4 + %8 = load i32*, i32** %trigger.addr, align 8 + %arrayidx5 = getelementptr inbounds i32, i32* %8, i64 %idxprom4 + %9 = load i32, i32* %arrayidx5, align 4 %conv = sitofp i32 %9 to double %add = fadd double %6, %conv - %10 = load i32* %i, align 4 + %10 = load i32, i32* %i, align 4 %idxprom6 = sext i32 %10 to i64 - %11 = load double** %A.addr, align 8 - %arrayidx7 = getelementptr inbounds double* %11, i64 %idxprom6 + %11 = load double*, double** %A.addr, align 8 + %arrayidx7 = getelementptr inbounds double, double* %11, i64 %idxprom6 store double %add, double* %arrayidx7, align 8 br label %if.end @@ -255,7 +255,7 @@ if.end: ; preds = %if.then, %for.body br label %for.inc for.inc: ; preds = %if.end - %12 = load i32* %i, align 4 + %12 = load i32, i32* %i, align 4 %inc = add nsw i32 %12, 1 store i32 %inc, i32* %i, align 4 br label %for.cond @@ -297,37 +297,37 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 10000 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %idxprom = sext i32 %1 to i64 - %2 = load i32** %trigger.addr, align 8 - %arrayidx = getelementptr inbounds i32* %2, i64 %idxprom - %3 = load i32* %arrayidx, align 4 + %2 = load i32*, i32** %trigger.addr, align 8 + %arrayidx = getelementptr inbounds i32, i32* %2, i64 %idxprom + %3 = load i32, i32* %arrayidx, align 4 %cmp1 = icmp slt i32 %3, 100 br i1 %cmp1, label %if.then, label %if.end if.then: ; preds = %for.body - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %mul = mul nsw i32 %4, 2 %idxprom2 = sext i32 %mul to i64 - %5 = load double** %B.addr, align 8 - %arrayidx3 = getelementptr inbounds double* %5, i64 %idxprom2 - %6 = load double* %arrayidx3, align 8 - %7 = load i32* %i, align 4 + %5 = load double*, double** %B.addr, align 8 + %arrayidx3 = getelementptr inbounds double, double* %5, i64 %idxprom2 + %6 = load double, double* %arrayidx3, align 8 + %7 = load i32, i32* %i, align 4 %idxprom4 = sext i32 %7 to i64 - %8 = load i32** %trigger.addr, align 8 - %arrayidx5 = getelementptr inbounds i32* %8, i64 %idxprom4 - %9 = load i32* %arrayidx5, align 4 + %8 = load i32*, i32** %trigger.addr, align 8 + %arrayidx5 = getelementptr inbounds i32, i32* %8, i64 %idxprom4 + %9 = load i32, i32* %arrayidx5, align 4 %conv = sitofp i32 %9 to double %add = fadd double %6, %conv - %10 = load i32* %i, align 4 + %10 = load i32, i32* %i, align 4 %idxprom6 = sext i32 %10 to i64 - %11 = load double** %A.addr, align 8 - %arrayidx7 = getelementptr inbounds double* %11, i64 %idxprom6 + %11 = load double*, double** %A.addr, align 8 + %arrayidx7 = getelementptr inbounds double, double* %11, i64 %idxprom6 store double %add, double* %arrayidx7, align 8 br label %if.end @@ -335,7 +335,7 @@ if.end: ; preds = %if.then, %for.body br label %for.inc for.inc: ; preds = %if.end - %12 = load i32* %i, align 4 + %12 = load i32, i32* %i, align 4 %inc = add nsw i32 %12, 1 store i32 %inc, i32* %i, align 4 br label %for.cond @@ -373,43 +373,43 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 10000 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %idxprom = sext i32 %1 to i64 - %2 = load i32** %trigger.addr, align 8 - %arrayidx = getelementptr inbounds i32* %2, i64 %idxprom - %3 = load i32* %arrayidx, align 4 + %2 = load i32*, i32** %trigger.addr, align 8 + %arrayidx = getelementptr inbounds i32, i32* %2, i64 %idxprom + %3 = load i32, i32* %arrayidx, align 4 %cmp1 = icmp slt i32 %3, 100 br i1 %cmp1, label %if.then, label %if.end if.then: ; preds = %for.body - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %idxprom2 = sext i32 %4 to i64 - %5 = load i32** %B.addr, align 8 - %arrayidx3 = getelementptr inbounds i32* %5, i64 %idxprom2 - %6 = load i32* %arrayidx3, align 4 - %7 = load i32* %i, align 4 + %5 = load i32*, i32** %B.addr, align 8 + %arrayidx3 = getelementptr inbounds i32, i32* %5, i64 %idxprom2 + %6 = load i32, i32* %arrayidx3, align 4 + %7 = load i32, i32* %i, align 4 %idxprom4 = sext i32 %7 to i64 - %8 = load i32** %trigger.addr, align 8 - %arrayidx5 = getelementptr inbounds i32* %8, i64 %idxprom4 - %9 = load i32* %arrayidx5, align 4 + %8 = load i32*, i32** %trigger.addr, align 8 + %arrayidx5 = getelementptr inbounds i32, i32* %8, i64 %idxprom4 + %9 = load i32, i32* %arrayidx5, align 4 %add = add nsw i32 %6, %9 - %10 = load i32* %i, align 4 + %10 = load i32, i32* %i, align 4 %idxprom6 = sext i32 %10 to i64 - %11 = load i32** %A.addr, align 8 - %arrayidx7 = getelementptr inbounds i32* %11, i64 %idxprom6 - store i32 sdiv (i32 1, i32 zext (i1 icmp eq (i32** getelementptr inbounds ([1 x i32*]* @a, i64 0, i64 1), i32** @c) to i32)), i32* %arrayidx7, align 4 + %11 = load i32*, i32** %A.addr, align 8 + %arrayidx7 = getelementptr inbounds i32, i32* %11, i64 %idxprom6 + store i32 sdiv (i32 1, i32 zext (i1 icmp eq (i32** getelementptr inbounds ([1 x i32*], [1 x i32*]* @a, i64 0, i64 1), i32** @c) to i32)), i32* %arrayidx7, align 4 br label %if.end if.end: ; preds = %if.then, %for.body br label %for.inc for.inc: ; preds = %if.end - %12 = load i32* %i, align 4 + %12 = load i32, i32* %i, align 4 %inc = add nsw i32 %12, 1 store i32 %inc, i32* %i, align 4 br label %for.cond @@ -459,30 +459,30 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp sge i32 %0, 0 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %idxprom = sext i32 %1 to i64 - %2 = load i32** %trigger.addr, align 8 - %arrayidx = getelementptr inbounds i32* %2, i64 %idxprom - %3 = load i32* %arrayidx, align 4 + %2 = load i32*, i32** %trigger.addr, align 8 + %arrayidx = getelementptr inbounds i32, i32* %2, i64 %idxprom + %3 = load i32, i32* %arrayidx, align 4 %cmp1 = icmp sgt i32 %3, 0 br i1 %cmp1, label %if.then, label %if.end if.then: ; preds = %for.body - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %idxprom2 = sext i32 %4 to i64 - %5 = load double** %in.addr, align 8 - %arrayidx3 = getelementptr inbounds double* %5, i64 %idxprom2 - %6 = load double* %arrayidx3, align 8 + %5 = load double*, double** %in.addr, align 8 + %arrayidx3 = getelementptr inbounds double, double* %5, i64 %idxprom2 + %6 = load double, double* %arrayidx3, align 8 %add = fadd double %6, 5.000000e-01 - %7 = load i32* %i, align 4 + %7 = load i32, i32* %i, align 4 %idxprom4 = sext i32 %7 to i64 - %8 = load double** %out.addr, align 8 - %arrayidx5 = getelementptr inbounds double* %8, i64 %idxprom4 + %8 = load double*, double** %out.addr, align 8 + %arrayidx5 = getelementptr inbounds double, double* %8, i64 %idxprom4 store double %add, double* %arrayidx5, align 8 br label %if.end @@ -490,7 +490,7 @@ if.end: ; preds = %if.then, %for.body br label %for.inc for.inc: ; preds = %if.end - %9 = load i32* %i, align 4 + %9 = load i32, i32* %i, align 4 %dec = add nsw i32 %9, -1 store i32 %dec, i32* %i, align 4 br label %for.cond diff --git a/test/Transforms/LoopVectorize/X86/metadata-enable.ll b/test/Transforms/LoopVectorize/X86/metadata-enable.ll index 7feb66c..ba8e11e 100644 --- a/test/Transforms/LoopVectorize/X86/metadata-enable.ll +++ b/test/Transforms/LoopVectorize/X86/metadata-enable.ll @@ -54,17 +54,17 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds i32* %b, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %b, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %add = add nsw i32 %0, %N - %arrayidx2 = getelementptr inbounds i32* %a, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv store i32 %add, i32* %arrayidx2, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 32 br i1 %exitcond, label %for.end, label %for.body, !llvm.loop !0 for.end: ; preds = %for.body - %1 = load i32* %a, align 4 + %1 = load i32, i32* %a, align 4 ret i32 %1 } @@ -105,17 +105,17 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds i32* %b, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %b, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %add = add nsw i32 %0, %N - %arrayidx2 = getelementptr inbounds i32* %a, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv store i32 %add, i32* %arrayidx2, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 32 br i1 %exitcond, label %for.end, label %for.body for.end: ; preds = %for.body - %1 = load i32* %a, align 4 + %1 = load i32, i32* %a, align 4 ret i32 %1 } @@ -156,17 +156,17 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds i32* %b, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %b, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %add = add nsw i32 %0, %N - %arrayidx2 = getelementptr inbounds i32* %a, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv store i32 %add, i32* %arrayidx2, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 32 br i1 %exitcond, label %for.end, label %for.body, !llvm.loop !2 for.end: ; preds = %for.body - %1 = load i32* %a, align 4 + %1 = load i32, i32* %a, align 4 ret i32 %1 } diff --git a/test/Transforms/LoopVectorize/X86/min-trip-count-switch.ll b/test/Transforms/LoopVectorize/X86/min-trip-count-switch.ll index fd69dc4..bb972c4 100644 --- a/test/Transforms/LoopVectorize/X86/min-trip-count-switch.ll +++ b/test/Transforms/LoopVectorize/X86/min-trip-count-switch.ll @@ -10,8 +10,8 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds float* %a, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %a, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %add = fadd float %0, 1.000000e+00 store float %add, float* %arrayidx, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/X86/no-vector.ll b/test/Transforms/LoopVectorize/X86/no-vector.ll index 692eec9..4b464b0 100644 --- a/test/Transforms/LoopVectorize/X86/no-vector.ll +++ b/test/Transforms/LoopVectorize/X86/no-vector.ll @@ -8,8 +8,8 @@ entry: for.body: ; preds = %entry, %for.body %i.06 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %r.05 = phi i32 [ %xor, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i8* %s, i32 %i.06 - %0 = load i8* %arrayidx, align 1 + %arrayidx = getelementptr inbounds i8, i8* %s, i32 %i.06 + %0 = load i8, i8* %arrayidx, align 1 %conv = sext i8 %0 to i32 %xor = xor i32 %conv, %r.05 %inc = add nsw i32 %i.06, 1 diff --git a/test/Transforms/LoopVectorize/X86/parallel-loops-after-reg2mem.ll b/test/Transforms/LoopVectorize/X86/parallel-loops-after-reg2mem.ll index ad01044..631361c 100644 --- a/test/Transforms/LoopVectorize/X86/parallel-loops-after-reg2mem.ll +++ b/test/Transforms/LoopVectorize/X86/parallel-loops-after-reg2mem.ll @@ -17,28 +17,28 @@ entry: br label %for.body for.body: ; preds = %for.body.for.body_crit_edge, %entry - %indvars.iv.reload = load i64* %indvars.iv.reg2mem - %arrayidx = getelementptr inbounds i32* %b, i64 %indvars.iv.reload - %0 = load i32* %arrayidx, align 4, !llvm.mem.parallel_loop_access !3 - %arrayidx2 = getelementptr inbounds i32* %a, i64 %indvars.iv.reload - %1 = load i32* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !3 + %indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem + %arrayidx = getelementptr inbounds i32, i32* %b, i64 %indvars.iv.reload + %0 = load i32, i32* %arrayidx, align 4, !llvm.mem.parallel_loop_access !3 + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.reload + %1 = load i32, i32* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !3 %idxprom3 = sext i32 %1 to i64 - %arrayidx4 = getelementptr inbounds i32* %a, i64 %idxprom3 + %arrayidx4 = getelementptr inbounds i32, i32* %a, i64 %idxprom3 store i32 %0, i32* %arrayidx4, align 4, !llvm.mem.parallel_loop_access !3 %indvars.iv.next = add i64 %indvars.iv.reload, 1 ; A new store without the parallel metadata here: store i64 %indvars.iv.next, i64* %indvars.iv.next.reg2mem - %indvars.iv.next.reload1 = load i64* %indvars.iv.next.reg2mem - %arrayidx6 = getelementptr inbounds i32* %b, i64 %indvars.iv.next.reload1 - %2 = load i32* %arrayidx6, align 4, !llvm.mem.parallel_loop_access !3 + %indvars.iv.next.reload1 = load i64, i64* %indvars.iv.next.reg2mem + %arrayidx6 = getelementptr inbounds i32, i32* %b, i64 %indvars.iv.next.reload1 + %2 = load i32, i32* %arrayidx6, align 4, !llvm.mem.parallel_loop_access !3 store i32 %2, i32* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !3 - %indvars.iv.next.reload = load i64* %indvars.iv.next.reg2mem + %indvars.iv.next.reload = load i64, i64* %indvars.iv.next.reg2mem %lftr.wideiv = trunc i64 %indvars.iv.next.reload to i32 %exitcond = icmp eq i32 %lftr.wideiv, 512 br i1 %exitcond, label %for.end, label %for.body.for.body_crit_edge, !llvm.loop !3 for.body.for.body_crit_edge: ; preds = %for.body - %indvars.iv.next.reload2 = load i64* %indvars.iv.next.reg2mem + %indvars.iv.next.reload2 = load i64, i64* %indvars.iv.next.reg2mem store i64 %indvars.iv.next.reload2, i64* %indvars.iv.reg2mem br label %for.body diff --git a/test/Transforms/LoopVectorize/X86/parallel-loops.ll b/test/Transforms/LoopVectorize/X86/parallel-loops.ll index 22ab521..53061ed 100644 --- a/test/Transforms/LoopVectorize/X86/parallel-loops.ll +++ b/test/Transforms/LoopVectorize/X86/parallel-loops.ll @@ -20,16 +20,16 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds i32* %b, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds i32* %a, i64 %indvars.iv - %1 = load i32* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds i32, i32* %b, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv + %1 = load i32, i32* %arrayidx2, align 4 %idxprom3 = sext i32 %1 to i64 - %arrayidx4 = getelementptr inbounds i32* %a, i64 %idxprom3 + %arrayidx4 = getelementptr inbounds i32, i32* %a, i64 %idxprom3 store i32 %0, i32* %arrayidx4, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 - %arrayidx6 = getelementptr inbounds i32* %b, i64 %indvars.iv.next - %2 = load i32* %arrayidx6, align 4 + %arrayidx6 = getelementptr inbounds i32, i32* %b, i64 %indvars.iv.next + %2 = load i32, i32* %arrayidx6, align 4 store i32 %2, i32* %arrayidx2, align 4 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond = icmp eq i32 %lftr.wideiv, 512 @@ -50,18 +50,18 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds i32* %b, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4, !llvm.mem.parallel_loop_access !3 - %arrayidx2 = getelementptr inbounds i32* %a, i64 %indvars.iv - %1 = load i32* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !3 + %arrayidx = getelementptr inbounds i32, i32* %b, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4, !llvm.mem.parallel_loop_access !3 + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv + %1 = load i32, i32* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !3 %idxprom3 = sext i32 %1 to i64 - %arrayidx4 = getelementptr inbounds i32* %a, i64 %idxprom3 + %arrayidx4 = getelementptr inbounds i32, i32* %a, i64 %idxprom3 ; This store might have originated from inlining a function with a parallel ; loop. Refers to a list with the "original loop reference" (!4) also included. store i32 %0, i32* %arrayidx4, align 4, !llvm.mem.parallel_loop_access !5 %indvars.iv.next = add i64 %indvars.iv, 1 - %arrayidx6 = getelementptr inbounds i32* %b, i64 %indvars.iv.next - %2 = load i32* %arrayidx6, align 4, !llvm.mem.parallel_loop_access !3 + %arrayidx6 = getelementptr inbounds i32, i32* %b, i64 %indvars.iv.next + %2 = load i32, i32* %arrayidx6, align 4, !llvm.mem.parallel_loop_access !3 store i32 %2, i32* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !3 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond = icmp eq i32 %lftr.wideiv, 512 @@ -83,18 +83,18 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds i32* %b, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4, !llvm.mem.parallel_loop_access !6 - %arrayidx2 = getelementptr inbounds i32* %a, i64 %indvars.iv - %1 = load i32* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !6 + %arrayidx = getelementptr inbounds i32, i32* %b, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4, !llvm.mem.parallel_loop_access !6 + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv + %1 = load i32, i32* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !6 %idxprom3 = sext i32 %1 to i64 - %arrayidx4 = getelementptr inbounds i32* %a, i64 %idxprom3 + %arrayidx4 = getelementptr inbounds i32, i32* %a, i64 %idxprom3 ; This refers to the loop marked with !7 which we are not in at the moment. ; It should prevent detecting as a parallel loop. store i32 %0, i32* %arrayidx4, align 4, !llvm.mem.parallel_loop_access !7 %indvars.iv.next = add i64 %indvars.iv, 1 - %arrayidx6 = getelementptr inbounds i32* %b, i64 %indvars.iv.next - %2 = load i32* %arrayidx6, align 4, !llvm.mem.parallel_loop_access !6 + %arrayidx6 = getelementptr inbounds i32, i32* %b, i64 %indvars.iv.next + %2 = load i32, i32* %arrayidx6, align 4, !llvm.mem.parallel_loop_access !6 store i32 %2, i32* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !6 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond = icmp eq i32 %lftr.wideiv, 512 diff --git a/test/Transforms/LoopVectorize/X86/powof2div.ll b/test/Transforms/LoopVectorize/X86/powof2div.ll index 054da8e..6bc738a 100644 --- a/test/Transforms/LoopVectorize/X86/powof2div.ll +++ b/test/Transforms/LoopVectorize/X86/powof2div.ll @@ -7,7 +7,7 @@ target triple = "x86_64-unknown-linux-gnu" @Foo = common global %struct.anon zeroinitializer, align 4 ;CHECK-LABEL: @foo( -;CHECK: load <4 x i32>* +;CHECK: load <4 x i32>, <4 x i32>* ;CHECK: sdiv <4 x i32> ;CHECK: store <4 x i32> @@ -17,10 +17,10 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds %struct.anon* @Foo, i64 0, i32 2, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds %struct.anon, %struct.anon* @Foo, i64 0, i32 2, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %div = sdiv i32 %0, 2 - %arrayidx2 = getelementptr inbounds %struct.anon* @Foo, i64 0, i32 0, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds %struct.anon, %struct.anon* @Foo, i64 0, i32 0, i64 %indvars.iv store i32 %div, i32* %arrayidx2, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 100 diff --git a/test/Transforms/LoopVectorize/X86/reduction-crash.ll b/test/Transforms/LoopVectorize/X86/reduction-crash.ll index 3957a55..3741b95 100644 --- a/test/Transforms/LoopVectorize/X86/reduction-crash.ll +++ b/test/Transforms/LoopVectorize/X86/reduction-crash.ll @@ -14,17 +14,17 @@ bb: br label %bb2 bb2: ; preds = %bb - %tmp = load double* null, align 8 + %tmp = load double, double* null, align 8 br i1 undef, label %bb3, label %bb12 bb3: ; preds = %bb3, %bb2 %tmp4 = phi double [ %tmp9, %bb3 ], [ %tmp, %bb2 ] %tmp5 = phi i32 [ %tmp8, %bb3 ], [ 0, %bb2 ] - %tmp6 = getelementptr inbounds [16 x double]* undef, i32 0, i32 %tmp5 - %tmp7 = load double* %tmp6, align 4 + %tmp6 = getelementptr inbounds [16 x double], [16 x double]* undef, i32 0, i32 %tmp5 + %tmp7 = load double, double* %tmp6, align 4 %tmp8 = add nsw i32 %tmp5, 1 %tmp9 = fadd fast double %tmp4, undef - %tmp10 = getelementptr inbounds float* %arg, i32 %tmp5 + %tmp10 = getelementptr inbounds float, float* %arg, i32 %tmp5 store float undef, float* %tmp10, align 4 %tmp11 = icmp eq i32 %tmp8, %arg1 br i1 %tmp11, label %bb12, label %bb3 diff --git a/test/Transforms/LoopVectorize/X86/small-size.ll b/test/Transforms/LoopVectorize/X86/small-size.ll index 8c7a881..47c262b 100644 --- a/test/Transforms/LoopVectorize/X86/small-size.ll +++ b/test/Transforms/LoopVectorize/X86/small-size.ll @@ -30,12 +30,12 @@ define void @example1() optsize { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = add nsw i32 %5, %3 - %7 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %7 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv store i32 %6, i32* %7, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -65,7 +65,7 @@ define void @example2(i32 %n, i32 %x) optsize { .lr.ph5: ; preds = %0, %.lr.ph5 %indvars.iv6 = phi i64 [ %indvars.iv.next7, %.lr.ph5 ], [ 0, %0 ] - %3 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv6 + %3 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv6 store i32 %x, i32* %3, align 4 %indvars.iv.next7 = add i64 %indvars.iv6, 1 %lftr.wideiv = trunc i64 %indvars.iv.next7 to i32 @@ -76,12 +76,12 @@ define void @example2(i32 %n, i32 %x) optsize { %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %i.0.lcssa, %.preheader ] %.02 = phi i32 [ %4, %.lr.ph ], [ %n, %.preheader ] %4 = add nsw i32 %.02, -1 - %5 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv - %6 = load i32* %5, align 4 - %7 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %indvars.iv - %8 = load i32* %7, align 4 + %5 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv + %6 = load i32, i32* %5, align 4 + %7 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %indvars.iv + %8 = load i32, i32* %7, align 4 %9 = and i32 %8, %6 - %10 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %10 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv store i32 %9, i32* %10, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %11 = icmp eq i32 %4, 0 @@ -104,9 +104,9 @@ define void @example3(i32 %n, i32* noalias nocapture %p, i32* noalias nocapture %.014 = phi i32* [ %5, %.lr.ph ], [ %p, %0 ] %.023 = phi i32* [ %3, %.lr.ph ], [ %q, %0 ] %2 = add nsw i32 %.05, -1 - %3 = getelementptr inbounds i32* %.023, i64 1 - %4 = load i32* %.023, align 16 - %5 = getelementptr inbounds i32* %.014, i64 1 + %3 = getelementptr inbounds i32, i32* %.023, i64 1 + %4 = load i32, i32* %.023, align 16 + %5 = getelementptr inbounds i32, i32* %.014, i64 1 store i32 %4, i32* %.014, align 16 %6 = icmp eq i32 %2, 0 br i1 %6, label %._crit_edge, label %.lr.ph @@ -128,9 +128,9 @@ define void @example4(i32 %n, i32* noalias nocapture %p, i32* noalias nocapture %.014 = phi i32* [ %5, %.lr.ph ], [ %p, %0 ] %.023 = phi i32* [ %3, %.lr.ph ], [ %q, %0 ] %2 = add nsw i32 %.05, -1 - %3 = getelementptr inbounds i32* %.023, i64 1 - %4 = load i32* %.023, align 16 - %5 = getelementptr inbounds i32* %.014, i64 1 + %3 = getelementptr inbounds i32, i32* %.023, i64 1 + %4 = load i32, i32* %.023, align 16 + %5 = getelementptr inbounds i32, i32* %.014, i64 1 store i32 %4, i32* %.014, align 16 %6 = icmp eq i32 %2, 0 br i1 %6, label %._crit_edge, label %.lr.ph @@ -152,11 +152,11 @@ define void @example23(i16* nocapture %src, i32* nocapture %dst) optsize { %.04 = phi i16* [ %src, %0 ], [ %2, %1 ] %.013 = phi i32* [ %dst, %0 ], [ %6, %1 ] %i.02 = phi i32 [ 0, %0 ], [ %7, %1 ] - %2 = getelementptr inbounds i16* %.04, i64 1 - %3 = load i16* %.04, align 2 + %2 = getelementptr inbounds i16, i16* %.04, i64 1 + %3 = load i16, i16* %.04, align 2 %4 = zext i16 %3 to i32 %5 = shl nuw nsw i32 %4, 7 - %6 = getelementptr inbounds i32* %.013, i64 1 + %6 = getelementptr inbounds i32, i32* %.013, i64 1 store i32 %5, i32* %.013, align 4 %7 = add nsw i32 %i.02, 1 %exitcond = icmp eq i32 %7, 256 @@ -178,11 +178,11 @@ define void @example23b(i16* noalias nocapture %src, i32* noalias nocapture %dst %.04 = phi i16* [ %src, %0 ], [ %2, %1 ] %.013 = phi i32* [ %dst, %0 ], [ %6, %1 ] %i.02 = phi i32 [ 0, %0 ], [ %7, %1 ] - %2 = getelementptr inbounds i16* %.04, i64 1 - %3 = load i16* %.04, align 2 + %2 = getelementptr inbounds i16, i16* %.04, i64 1 + %3 = load i16, i16* %.04, align 2 %4 = zext i16 %3 to i32 %5 = shl nuw nsw i32 %4, 7 - %6 = getelementptr inbounds i32* %.013, i64 1 + %6 = getelementptr inbounds i32, i32* %.013, i64 1 store i32 %5, i32* %.013, align 4 %7 = add nsw i32 %i.02, 1 %exitcond = icmp eq i32 %7, 256 diff --git a/test/Transforms/LoopVectorize/X86/struct-store.ll b/test/Transforms/LoopVectorize/X86/struct-store.ll index a995e43..4ff3b0e 100644 --- a/test/Transforms/LoopVectorize/X86/struct-store.ll +++ b/test/Transforms/LoopVectorize/X86/struct-store.ll @@ -15,7 +15,7 @@ entry: loop: %indvars.iv = phi i64 [ %indvars.iv.next, %loop ], [ 0, %entry ] - %tmp = getelementptr inbounds [16 x { i64, i64 }]* @glbl, i64 0, i64 %indvars.iv + %tmp = getelementptr inbounds [16 x { i64, i64 }], [16 x { i64, i64 }]* @glbl, i64 0, i64 %indvars.iv store { i64, i64 } { i64 ptrtoint (void ()* @fn to i64), i64 0 }, { i64, i64 }* %tmp, align 16 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/X86/tripcount.ll b/test/Transforms/LoopVectorize/X86/tripcount.ll index a4ec694..c0bbb92 100644 --- a/test/Transforms/LoopVectorize/X86/tripcount.ll +++ b/test/Transforms/LoopVectorize/X86/tripcount.ll @@ -22,8 +22,8 @@ for.body.preheader: for.body: %i.07 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds [0 x i32]* @big, i32 0, i32 %i.07 - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [0 x i32], [0 x i32]* @big, i32 0, i32 %i.07 + %0 = load i32, i32* %arrayidx, align 4 %neg = xor i32 %0, -1 store i32 %neg, i32* %arrayidx, align 4 %inc = add nsw i32 %i.07, 1 diff --git a/test/Transforms/LoopVectorize/X86/uint64_to_fp64-cost-model.ll b/test/Transforms/LoopVectorize/X86/uint64_to_fp64-cost-model.ll index 86c32b2..38af11c 100644 --- a/test/Transforms/LoopVectorize/X86/uint64_to_fp64-cost-model.ll +++ b/test/Transforms/LoopVectorize/X86/uint64_to_fp64-cost-model.ll @@ -12,10 +12,10 @@ entry: br label %for.body for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds i64* %a, i64 %indvars.iv - %tmp = load i64* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i64, i64* %a, i64 %indvars.iv + %tmp = load i64, i64* %arrayidx, align 4 %conv = uitofp i64 %tmp to double - %arrayidx2 = getelementptr inbounds double* %b, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %b, i64 %indvars.iv store double %conv, double* %arrayidx2, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 256 diff --git a/test/Transforms/LoopVectorize/X86/unroll-pm.ll b/test/Transforms/LoopVectorize/X86/unroll-pm.ll index 5064fec..52914b6 100644 --- a/test/Transforms/LoopVectorize/X86/unroll-pm.ll +++ b/test/Transforms/LoopVectorize/X86/unroll-pm.ll @@ -17,8 +17,8 @@ define i32 @bar(i32* nocapture %A, i32 %n) nounwind uwtable ssp { .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds i32* %A, i64 %indvars.iv - %3 = load i32* %2, align 4 + %2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 %4 = add nsw i32 %3, 6 store i32 %4, i32* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/X86/unroll-small-loops.ll b/test/Transforms/LoopVectorize/X86/unroll-small-loops.ll index 716dc08..4411da3 100644 --- a/test/Transforms/LoopVectorize/X86/unroll-small-loops.ll +++ b/test/Transforms/LoopVectorize/X86/unroll-small-loops.ll @@ -16,8 +16,8 @@ target triple = "x86_64-apple-macosx10.8.0" ; CHECK-VECTOR: ret ; ; CHECK-SCALAR-LABEL: @foo( -; CHECK-SCALAR: load i32* -; CHECK-SCALAR-NOT: load i32* +; CHECK-SCALAR: load i32, i32* +; CHECK-SCALAR-NOT: load i32, i32* ; CHECK-SCALAR: store i32 ; CHECK-SCALAR-NOT: store i32 ; CHECK-SCALAR: ret @@ -26,8 +26,8 @@ define i32 @foo(i32* nocapture %A) nounwind uwtable ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds i32* %A, i64 %indvars.iv - %3 = load i32* %2, align 4 + %2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 %4 = add nsw i32 %3, 6 store i32 %4, i32* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -57,8 +57,8 @@ define i32 @bar(i32* nocapture %A, i32 %n) nounwind uwtable ssp { .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds i32* %A, i64 %indvars.iv - %3 = load i32* %2, align 4 + %2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 %4 = add nsw i32 %3, 6 store i32 %4, i32* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -86,10 +86,10 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds float* %B, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %B, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %mul = fmul float %0, %N - %arrayidx2 = getelementptr inbounds float* %A, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %A, i64 %indvars.iv store float %mul, float* %arrayidx2, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 256 diff --git a/test/Transforms/LoopVectorize/X86/unroll_selection.ll b/test/Transforms/LoopVectorize/X86/unroll_selection.ll index c684b4e..71b8290 100644 --- a/test/Transforms/LoopVectorize/X86/unroll_selection.ll +++ b/test/Transforms/LoopVectorize/X86/unroll_selection.ll @@ -16,8 +16,8 @@ define void @reg_pressure(double* nocapture %A, i32 %n) nounwind uwtable ssp { ; <label>:2 ; preds = %2, %0 %indvars.iv = phi i64 [ %indvars.iv.next, %2 ], [ %1, %0 ] - %3 = getelementptr inbounds double* %A, i64 %indvars.iv - %4 = load double* %3, align 8 + %3 = getelementptr inbounds double, double* %A, i64 %indvars.iv + %4 = load double, double* %3, align 8 %5 = fadd double %4, 3.000000e+00 %6 = fmul double %4, 2.000000e+00 %7 = fadd double %5, %6 @@ -58,8 +58,8 @@ define void @small_loop(i16* nocapture %A, i64 %n) nounwind uwtable ssp { .lr.ph: ; preds = %0, %.lr.ph %i.01 = phi i64 [ %5, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds i16* %A, i64 %i.01 - %3 = load i16* %2, align 2 + %2 = getelementptr inbounds i16, i16* %A, i64 %i.01 + %3 = load i16, i16* %2, align 2 %4 = xor i16 %3, 3 store i16 %4, i16* %2, align 2 %5 = add i64 %i.01, 1 diff --git a/test/Transforms/LoopVectorize/X86/veclib-calls.ll b/test/Transforms/LoopVectorize/X86/veclib-calls.ll new file mode 100644 index 0000000..62e0a44 --- /dev/null +++ b/test/Transforms/LoopVectorize/X86/veclib-calls.ll @@ -0,0 +1,182 @@ +; RUN: opt < %s -vector-library=Accelerate -loop-vectorize -S | FileCheck %s + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +;CHECK-LABEL: @sqrt_f32( +;CHECK: vsqrtf{{.*}}<4 x float> +;CHECK: ret void +declare float @sqrtf(float) nounwind readnone +define void @sqrt_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable { +entry: + %cmp6 = icmp sgt i32 %n, 0 + br i1 %cmp6, label %for.body, label %for.end + +for.body: ; preds = %entry, %for.body + %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %call = tail call float @sqrtf(float %0) nounwind readnone + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv + store float %call, float* %arrayidx2, align 4 + %indvars.iv.next = add i64 %indvars.iv, 1 + %lftr.wideiv = trunc i64 %indvars.iv.next to i32 + %exitcond = icmp eq i32 %lftr.wideiv, %n + br i1 %exitcond, label %for.end, label %for.body + +for.end: ; preds = %for.body, %entry + ret void +} + +;CHECK-LABEL: @exp_f32( +;CHECK: vexpf{{.*}}<4 x float> +;CHECK: ret void +declare float @expf(float) nounwind readnone +define void @exp_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable { +entry: + %cmp6 = icmp sgt i32 %n, 0 + br i1 %cmp6, label %for.body, label %for.end + +for.body: ; preds = %entry, %for.body + %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %call = tail call float @expf(float %0) nounwind readnone + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv + store float %call, float* %arrayidx2, align 4 + %indvars.iv.next = add i64 %indvars.iv, 1 + %lftr.wideiv = trunc i64 %indvars.iv.next to i32 + %exitcond = icmp eq i32 %lftr.wideiv, %n + br i1 %exitcond, label %for.end, label %for.body + +for.end: ; preds = %for.body, %entry + ret void +} + +;CHECK-LABEL: @log_f32( +;CHECK: vlogf{{.*}}<4 x float> +;CHECK: ret void +declare float @logf(float) nounwind readnone +define void @log_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable { +entry: + %cmp6 = icmp sgt i32 %n, 0 + br i1 %cmp6, label %for.body, label %for.end + +for.body: ; preds = %entry, %for.body + %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %call = tail call float @logf(float %0) nounwind readnone + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv + store float %call, float* %arrayidx2, align 4 + %indvars.iv.next = add i64 %indvars.iv, 1 + %lftr.wideiv = trunc i64 %indvars.iv.next to i32 + %exitcond = icmp eq i32 %lftr.wideiv, %n + br i1 %exitcond, label %for.end, label %for.body + +for.end: ; preds = %for.body, %entry + ret void +} + +; For abs instruction we'll generate vector intrinsic, as it's cheaper than a lib call. +;CHECK-LABEL: @fabs_f32( +;CHECK: fabs{{.*}}<4 x float> +;CHECK: ret void +declare float @fabsf(float) nounwind readnone +define void @fabs_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable { +entry: + %cmp6 = icmp sgt i32 %n, 0 + br i1 %cmp6, label %for.body, label %for.end + +for.body: ; preds = %entry, %for.body + %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %call = tail call float @fabsf(float %0) nounwind readnone + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv + store float %call, float* %arrayidx2, align 4 + %indvars.iv.next = add i64 %indvars.iv, 1 + %lftr.wideiv = trunc i64 %indvars.iv.next to i32 + %exitcond = icmp eq i32 %lftr.wideiv, %n + br i1 %exitcond, label %for.end, label %for.body + +for.end: ; preds = %for.body, %entry + ret void +} + +; Test that we can vectorize an intrinsic into a vector call. +;CHECK-LABEL: @exp_f32_intrin( +;CHECK: vexpf{{.*}}<4 x float> +;CHECK: ret void +declare float @llvm.exp.f32(float) nounwind readnone +define void @exp_f32_intrin(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable { +entry: + %cmp6 = icmp sgt i32 %n, 0 + br i1 %cmp6, label %for.body, label %for.end + +for.body: ; preds = %entry, %for.body + %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %call = tail call float @llvm.exp.f32(float %0) nounwind readnone + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv + store float %call, float* %arrayidx2, align 4 + %indvars.iv.next = add i64 %indvars.iv, 1 + %lftr.wideiv = trunc i64 %indvars.iv.next to i32 + %exitcond = icmp eq i32 %lftr.wideiv, %n + br i1 %exitcond, label %for.end, label %for.body + +for.end: ; preds = %for.body, %entry + ret void +} + +; Test that we don't vectorize arbitrary functions. +;CHECK-LABEL: @foo_f32( +;CHECK-NOT: foo{{.*}}<4 x float> +;CHECK: ret void +declare float @foo(float) nounwind readnone +define void @foo_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable { +entry: + %cmp6 = icmp sgt i32 %n, 0 + br i1 %cmp6, label %for.body, label %for.end + +for.body: ; preds = %entry, %for.body + %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %call = tail call float @foo(float %0) nounwind readnone + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv + store float %call, float* %arrayidx2, align 4 + %indvars.iv.next = add i64 %indvars.iv, 1 + %lftr.wideiv = trunc i64 %indvars.iv.next to i32 + %exitcond = icmp eq i32 %lftr.wideiv, %n + br i1 %exitcond, label %for.end, label %for.body + +for.end: ; preds = %for.body, %entry + ret void +} + +; Test that we don't vectorize calls with nobuiltin attribute. +;CHECK-LABEL: @sqrt_f32_nobuiltin( +;CHECK-NOT: vsqrtf{{.*}}<4 x float> +;CHECK: ret void +define void @sqrt_f32_nobuiltin(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable { +entry: + %cmp6 = icmp sgt i32 %n, 0 + br i1 %cmp6, label %for.body, label %for.end + +for.body: ; preds = %entry, %for.body + %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %call = tail call float @sqrtf(float %0) nounwind readnone nobuiltin + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv + store float %call, float* %arrayidx2, align 4 + %indvars.iv.next = add i64 %indvars.iv, 1 + %lftr.wideiv = trunc i64 %indvars.iv.next to i32 + %exitcond = icmp eq i32 %lftr.wideiv, %n + br i1 %exitcond, label %for.end, label %for.body + +for.end: ; preds = %for.body, %entry + ret void +} diff --git a/test/Transforms/LoopVectorize/X86/vect.omp.force.ll b/test/Transforms/LoopVectorize/X86/vect.omp.force.ll index a781fbe..c2a0fed 100644 --- a/test/Transforms/LoopVectorize/X86/vect.omp.force.ll +++ b/test/Transforms/LoopVectorize/X86/vect.omp.force.ll @@ -15,9 +15,9 @@ target triple = "x86_64-apple-macosx10.8.0" ; The source code for the test: ; ; #include <math.h> -; void foo(float* restrict A, float * restrict B, int size) +; void foo(float* restrict A, float * restrict B) ; { -; for (int i = 0; i < size; ++i) A[i] = sinf(B[i]); +; for (int i = 0; i < 1000; i+=2) A[i] = sinf(B[i]); ; } ; @@ -25,24 +25,20 @@ target triple = "x86_64-apple-macosx10.8.0" ; This loop will be vectorized, although the scalar cost is lower than any of vector costs, but vectorization is explicitly forced in metadata. ; -define void @vectorized(float* noalias nocapture %A, float* noalias nocapture %B, i32 %size) { +define void @vectorized(float* noalias nocapture %A, float* noalias nocapture %B) { entry: - %cmp6 = icmp sgt i32 %size, 0 - br i1 %cmp6, label %for.body.preheader, label %for.end - -for.body.preheader: br label %for.body for.body: - %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds float* %B, i64 %indvars.iv - %0 = load float* %arrayidx, align 4, !llvm.mem.parallel_loop_access !1 + %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] + %arrayidx = getelementptr inbounds float, float* %B, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4, !llvm.mem.parallel_loop_access !1 %call = tail call float @llvm.sin.f32(float %0) - %arrayidx2 = getelementptr inbounds float* %A, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %A, i64 %indvars.iv store float %call, float* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !1 - %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 + %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 - %exitcond = icmp eq i32 %lftr.wideiv, %size + %exitcond = icmp eq i32 %lftr.wideiv, 1000 br i1 %exitcond, label %for.end.loopexit, label %for.body, !llvm.loop !1 for.end.loopexit: @@ -59,24 +55,20 @@ for.end: ; This method will not be vectorized, as scalar cost is lower than any of vector costs. ; -define void @not_vectorized(float* noalias nocapture %A, float* noalias nocapture %B, i32 %size) { +define void @not_vectorized(float* noalias nocapture %A, float* noalias nocapture %B) { entry: - %cmp6 = icmp sgt i32 %size, 0 - br i1 %cmp6, label %for.body.preheader, label %for.end - -for.body.preheader: br label %for.body for.body: - %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds float* %B, i64 %indvars.iv - %0 = load float* %arrayidx, align 4, !llvm.mem.parallel_loop_access !3 + %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] + %arrayidx = getelementptr inbounds float, float* %B, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4, !llvm.mem.parallel_loop_access !3 %call = tail call float @llvm.sin.f32(float %0) - %arrayidx2 = getelementptr inbounds float* %A, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %A, i64 %indvars.iv store float %call, float* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !3 - %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 + %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 - %exitcond = icmp eq i32 %lftr.wideiv, %size + %exitcond = icmp eq i32 %lftr.wideiv, 1000 br i1 %exitcond, label %for.end.loopexit, label %for.body, !llvm.loop !3 for.end.loopexit: diff --git a/test/Transforms/LoopVectorize/X86/vect.omp.force.small-tc.ll b/test/Transforms/LoopVectorize/X86/vect.omp.force.small-tc.ll index e39e6b5..8d139ac 100644 --- a/test/Transforms/LoopVectorize/X86/vect.omp.force.small-tc.ll +++ b/test/Transforms/LoopVectorize/X86/vect.omp.force.small-tc.ll @@ -29,10 +29,10 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds float* %B, i64 %indvars.iv - %0 = load float* %arrayidx, align 4, !llvm.mem.parallel_loop_access !1 - %arrayidx2 = getelementptr inbounds float* %A, i64 %indvars.iv - %1 = load float* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !1 + %arrayidx = getelementptr inbounds float, float* %B, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4, !llvm.mem.parallel_loop_access !1 + %arrayidx2 = getelementptr inbounds float, float* %A, i64 %indvars.iv + %1 = load float, float* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !1 %add = fadd fast float %0, %1 store float %add, float* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 @@ -55,10 +55,10 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds float* %B, i64 %indvars.iv - %0 = load float* %arrayidx, align 4, !llvm.mem.parallel_loop_access !3 - %arrayidx2 = getelementptr inbounds float* %A, i64 %indvars.iv - %1 = load float* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !3 + %arrayidx = getelementptr inbounds float, float* %B, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4, !llvm.mem.parallel_loop_access !3 + %arrayidx2 = getelementptr inbounds float, float* %A, i64 %indvars.iv + %1 = load float, float* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !3 %add = fadd fast float %0, %1 store float %add, float* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !3 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/X86/vector-scalar-select-cost.ll b/test/Transforms/LoopVectorize/X86/vector-scalar-select-cost.ll index ece9895..5efabe1 100644 --- a/test/Transforms/LoopVectorize/X86/vector-scalar-select-cost.ll +++ b/test/Transforms/LoopVectorize/X86/vector-scalar-select-cost.ll @@ -15,12 +15,12 @@ define void @scalarselect(i1 %cond) { ; <label>:1 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = add nsw i32 %5, %3 - %7 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %7 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv ; A scalar select has a cost of 1 on core2 ; CHECK: cost of 1 for VF 2 {{.*}} select i1 %cond, i32 %6, i32 0 @@ -42,12 +42,12 @@ define void @vectorselect(i1 %cond) { ; <label>:1 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = add nsw i32 %5, %3 - %7 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %7 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv %8 = icmp ult i64 %indvars.iv, 8 ; A vector select has a cost of 1 on core2 diff --git a/test/Transforms/LoopVectorize/X86/vector_ptr_load_store.ll b/test/Transforms/LoopVectorize/X86/vector_ptr_load_store.ll index e57cfef..6cd3c9c 100644 --- a/test/Transforms/LoopVectorize/X86/vector_ptr_load_store.ll +++ b/test/Transforms/LoopVectorize/X86/vector_ptr_load_store.ll @@ -19,7 +19,7 @@ target triple = "x86_64-apple-macosx10.8.0" ; CHECK: test_consecutive_store ; CHECK: The Widest type: 64 bits define void @test_consecutive_store(%0**, %0**, %0** nocapture) nounwind ssp uwtable align 2 { - %4 = load %0** %2, align 8 + %4 = load %0*, %0** %2, align 8 %5 = icmp eq %0** %0, %1 br i1 %5, label %12, label %6 @@ -29,7 +29,7 @@ define void @test_consecutive_store(%0**, %0**, %0** nocapture) nounwind ssp uwt ; <label>:7 ; preds = %7, %6 %8 = phi %0** [ %0, %6 ], [ %9, %7 ] store %0* %4, %0** %8, align 8 - %9 = getelementptr inbounds %0** %8, i64 1 + %9 = getelementptr inbounds %0*, %0** %8, i64 1 %10 = icmp eq %0** %9, %1 br i1 %10, label %11, label %7 @@ -61,12 +61,12 @@ define void @test_nonconsecutive_store() nounwind ssp uwtable { ; <label>:3 ; preds = %3, %1 %4 = phi i64 [ 0, %1 ], [ %11, %3 ] - %5 = getelementptr inbounds [2048 x i16]* @q, i64 0, i64 %4 - %6 = load i16* %5, align 2 + %5 = getelementptr inbounds [2048 x i16], [2048 x i16]* @q, i64 0, i64 %4 + %6 = load i16, i16* %5, align 2 %7 = sext i16 %6 to i64 %8 = add i64 %7, 1 %9 = inttoptr i64 %8 to i32* - %10 = getelementptr inbounds [2048 x [8 x i32*]]* @p, i64 0, i64 %4, i64 %2 + %10 = getelementptr inbounds [2048 x [8 x i32*]], [2048 x [8 x i32*]]* @p, i64 0, i64 %4, i64 %2 store i32* %9, i32** %10, align 8 %11 = add i64 %4, 1 %12 = trunc i64 %11 to i32 @@ -100,8 +100,8 @@ define i8 @test_consecutive_ptr_load() nounwind readonly ssp uwtable { ; <label>:1 ; preds = %1, %0 %2 = phi i64 [ 0, %0 ], [ %10, %1 ] %3 = phi i8 [ 0, %0 ], [ %9, %1 ] - %4 = getelementptr inbounds [1024 x i32*]* @ia, i32 0, i64 %2 - %5 = load i32** %4, align 4 + %4 = getelementptr inbounds [1024 x i32*], [1024 x i32*]* @ia, i32 0, i64 %2 + %5 = load i32*, i32** %4, align 4 %6 = ptrtoint i32* %5 to i64 %7 = trunc i64 %6 to i8 %8 = add i8 %3, 1 @@ -127,9 +127,9 @@ define void @test_nonconsecutive_ptr_load() nounwind ssp uwtable { ; <label>:3 ; preds = %3, %1 %4 = phi i64 [ 0, %1 ], [ %10, %3 ] - %5 = getelementptr inbounds [2048 x [8 x i32*]]* @p2, i64 0, i64 %4, i64 %2 - %6 = getelementptr inbounds [2048 x i16]* @q2, i64 0, i64 %4 - %7 = load i32** %5, align 2 + %5 = getelementptr inbounds [2048 x [8 x i32*]], [2048 x [8 x i32*]]* @p2, i64 0, i64 %4, i64 %2 + %6 = getelementptr inbounds [2048 x i16], [2048 x i16]* @q2, i64 0, i64 %4 + %7 = load i32*, i32** %5, align 2 %8 = ptrtoint i32* %7 to i64 %9 = trunc i64 %8 to i16 store i16 %9, i16* %6, align 8 diff --git a/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll b/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll index 011ce8e..60ad3c6 100644 --- a/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll +++ b/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll @@ -52,7 +52,7 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv, !dbg !16 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv, !dbg !16 %0 = trunc i64 %indvars.iv to i32, !dbg !16 store i32 %0, i32* %arrayidx, align 4, !dbg !16, !tbaa !18 %cmp3 = icmp sle i32 %0, %Length, !dbg !22 @@ -74,7 +74,7 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv, !dbg !30 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv, !dbg !30 %0 = trunc i64 %indvars.iv to i32, !dbg !30 store i32 %0, i32* %arrayidx, align 4, !dbg !30, !tbaa !18 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1, !dbg !25 @@ -97,12 +97,12 @@ for.body.preheader: ; preds = %entry for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds i32* %B, i64 %indvars.iv, !dbg !35 - %0 = load i32* %arrayidx, align 4, !dbg !35, !tbaa !18 + %arrayidx = getelementptr inbounds i32, i32* %B, i64 %indvars.iv, !dbg !35 + %0 = load i32, i32* %arrayidx, align 4, !dbg !35, !tbaa !18 %idxprom1 = sext i32 %0 to i64, !dbg !35 - %arrayidx2 = getelementptr inbounds i32* %A, i64 %idxprom1, !dbg !35 - %1 = load i32* %arrayidx2, align 4, !dbg !35, !tbaa !18 - %arrayidx4 = getelementptr inbounds i32* %A, i64 %indvars.iv, !dbg !35 + %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %idxprom1, !dbg !35 + %1 = load i32, i32* %arrayidx2, align 4, !dbg !35, !tbaa !18 + %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv, !dbg !35 store i32 %1, i32* %arrayidx4, align 4, !dbg !35, !tbaa !18 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1, !dbg !32 %lftr.wideiv = trunc i64 %indvars.iv.next to i32, !dbg !32 @@ -122,40 +122,40 @@ attributes #0 = { nounwind } !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = !{!"0x11\004\00clang version 3.5.0\001\00\006\00\002", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [./source.cpp] [DW_LANG_C_plus_plus] -!1 = !{!"source.cpp", !"."} +!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, runtimeVersion: 6, emissionKind: 2, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!1 = !MDFile(filename: "source.cpp", directory: ".") !2 = !{} !3 = !{!4, !7, !8} -!4 = !{!"0x2e\00test\00test\00\001\000\001\000\006\00256\001\001", !1, !5, !6, null, void (i32*, i32)* @_Z4testPii, null, null, !2} ; [ DW_TAG_subprogram ] [line 1] [def] [test] -!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [./source.cpp] -!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!7 = !{!"0x2e\00test_disabled\00test_disabled\00\0010\000\001\000\006\00256\001\0010", !1, !5, !6, null, void (i32*, i32)* @_Z13test_disabledPii, null, null, !2} ; [ DW_TAG_subprogram ] [line 10] [def] [test_disabled] -!8 = !{!"0x2e\00test_array_bounds\00test_array_bounds\00\0016\000\001\000\006\00256\001\0016", !1, !5, !6, null, void (i32*, i32*, i32)* @_Z17test_array_boundsPiS_i, null, null, !2} ; [ DW_TAG_subprogram ] [line 16] [def] [test_array_bounds] +!4 = !MDSubprogram(name: "test", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, function: void (i32*, i32)* @_Z4testPii, variables: !2) +!5 = !MDFile(filename: "source.cpp", directory: ".") +!6 = !MDSubroutineType(types: !2) +!7 = !MDSubprogram(name: "test_disabled", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 10, file: !1, scope: !5, type: !6, function: void (i32*, i32)* @_Z13test_disabledPii, variables: !2) +!8 = !MDSubprogram(name: "test_array_bounds", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 16, file: !1, scope: !5, type: !6, function: void (i32*, i32*, i32)* @_Z17test_array_boundsPiS_i, variables: !2) !9 = !{i32 2, !"Dwarf Version", i32 2} -!10 = !{i32 2, !"Debug Info Version", i32 2} +!10 = !{i32 2, !"Debug Info Version", i32 3} !11 = !{!"clang version 3.5.0"} !12 = !MDLocation(line: 3, column: 8, scope: !13) -!13 = !{!"0xb\003\003\000", !1, !4} ; [ DW_TAG_lexical_block ] +!13 = distinct !MDLexicalBlock(line: 3, column: 3, file: !1, scope: !4) !14 = !{!14, !15, !15} !15 = !{!"llvm.loop.vectorize.enable", i1 true} !16 = !MDLocation(line: 4, column: 5, scope: !17) -!17 = !{!"0xb\003\0036\000", !1, !13} ; [ DW_TAG_lexical_block ] +!17 = distinct !MDLexicalBlock(line: 3, column: 36, file: !1, scope: !13) !18 = !{!19, !19, i64 0} !19 = !{!"int", !20, i64 0} !20 = !{!"omnipotent char", !21, i64 0} !21 = !{!"Simple C/C++ TBAA"} !22 = !MDLocation(line: 5, column: 9, scope: !23) -!23 = !{!"0xb\005\009\000", !1, !17} ; [ DW_TAG_lexical_block ] +!23 = distinct !MDLexicalBlock(line: 5, column: 9, file: !1, scope: !17) !24 = !MDLocation(line: 8, column: 1, scope: !4) !25 = !MDLocation(line: 12, column: 8, scope: !26) -!26 = !{!"0xb\0012\003\000", !1, !7} ; [ DW_TAG_lexical_block ] +!26 = distinct !MDLexicalBlock(line: 12, column: 3, file: !1, scope: !7) !27 = !{!27, !28, !29} !28 = !{!"llvm.loop.interleave.count", i32 1} !29 = !{!"llvm.loop.vectorize.width", i32 1} !30 = !MDLocation(line: 13, column: 5, scope: !26) !31 = !MDLocation(line: 14, column: 1, scope: !7) !32 = !MDLocation(line: 18, column: 8, scope: !33) -!33 = !{!"0xb\0018\003\000", !1, !8} ; [ DW_TAG_lexical_block ] +!33 = distinct !MDLexicalBlock(line: 18, column: 3, file: !1, scope: !8) !34 = !{!34, !15} !35 = !MDLocation(line: 19, column: 5, scope: !33) !36 = !MDLocation(line: 20, column: 1, scope: !8) diff --git a/test/Transforms/LoopVectorize/X86/vectorization-remarks.ll b/test/Transforms/LoopVectorize/X86/vectorization-remarks.ll index 16fe370..a4e895a 100644 --- a/test/Transforms/LoopVectorize/X86/vectorization-remarks.ll +++ b/test/Transforms/LoopVectorize/X86/vectorization-remarks.ll @@ -26,11 +26,11 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %add8 = phi i32 [ 0, %entry ], [ %add, %for.body ], !dbg !19 - %arrayidx = getelementptr inbounds [16 x i8]* %cb, i64 0, i64 %indvars.iv, !dbg !19 - %0 = load i8* %arrayidx, align 1, !dbg !19, !tbaa !21 + %arrayidx = getelementptr inbounds [16 x i8], [16 x i8]* %cb, i64 0, i64 %indvars.iv, !dbg !19 + %0 = load i8, i8* %arrayidx, align 1, !dbg !19, !tbaa !21 %conv = sext i8 %0 to i32, !dbg !19 - %arrayidx2 = getelementptr inbounds [16 x i8]* %cc, i64 0, i64 %indvars.iv, !dbg !19 - %1 = load i8* %arrayidx2, align 1, !dbg !19, !tbaa !21 + %arrayidx2 = getelementptr inbounds [16 x i8], [16 x i8]* %cc, i64 0, i64 %indvars.iv, !dbg !19 + %1 = load i8, i8* %arrayidx2, align 1, !dbg !19, !tbaa !21 %conv3 = sext i8 %1 to i32, !dbg !19 %sub = sub i32 %conv, %conv3, !dbg !19 %add = add nsw i32 %sub, %add8, !dbg !19 @@ -49,14 +49,14 @@ declare void @ibar(i32*) #1 !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!1 = !{!"vectorization-remarks.c", !"."} +!1 = !MDFile(filename: "vectorization-remarks.c", directory: ".") !2 = !{} !3 = !{!4} -!4 = !{!"0x2e\00foo\00foo\00\005\000\001\000\006\00256\001\006", !1, !5, !6, null, i32 (i32)* @foo, null, null, !2} ; [ DW_TAG_subprogram ] [line 5] [def] [scope 6] [foo] -!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [./vectorization-remarks.c] -!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!4 = !MDSubprogram(name: "foo", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !1, scope: !5, type: !6, function: i32 (i32)* @foo, variables: !2) +!5 = !MDFile(filename: "vectorization-remarks.c", directory: ".") +!6 = !MDSubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 4} -!8 = !{i32 1, !"Debug Info Version", i32 2} +!8 = !{i32 1, !"Debug Info Version", i32 3} !9 = !{!"clang version 3.5.0 "} !10 = !MDLocation(line: 8, column: 3, scope: !4) !11 = !{!12, !12, i64 0} @@ -64,11 +64,11 @@ declare void @ibar(i32*) #1 !13 = !{!"omnipotent char", !14, i64 0} !14 = !{!"Simple C/C++ TBAA"} !15 = !MDLocation(line: 17, column: 8, scope: !16) -!16 = !{!"0xb\0017\008\002", !1, !17} ; [ DW_TAG_lexical_block ] [./vectorization-remarks.c] -!17 = !{!"0xb\0017\008\001", !1, !18} ; [ DW_TAG_lexical_block ] [./vectorization-remarks.c] -!18 = !{!"0xb\0017\003\000", !1, !4} ; [ DW_TAG_lexical_block ] [./vectorization-remarks.c] +!16 = distinct !MDLexicalBlock(line: 17, column: 8, file: !1, scope: !17) +!17 = distinct !MDLexicalBlock(line: 17, column: 8, file: !1, scope: !18) +!18 = distinct !MDLexicalBlock(line: 17, column: 3, file: !1, scope: !4) !19 = !MDLocation(line: 18, column: 5, scope: !20) -!20 = !{!"0xb\0017\0027\000", !1, !18} ; [ DW_TAG_lexical_block ] [./vectorization-remarks.c] +!20 = distinct !MDLexicalBlock(line: 17, column: 27, file: !1, scope: !18) !21 = !{!13, !13, i64 0} !22 = !MDLocation(line: 20, column: 3, scope: !4) !23 = !MDLocation(line: 21, column: 3, scope: !4) diff --git a/test/Transforms/LoopVectorize/X86/x86_fp80-vector-store.ll b/test/Transforms/LoopVectorize/X86/x86_fp80-vector-store.ll index d8e5403..0debb33 100644 --- a/test/Transforms/LoopVectorize/X86/x86_fp80-vector-store.ll +++ b/test/Transforms/LoopVectorize/X86/x86_fp80-vector-store.ll @@ -17,7 +17,7 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %conv = sitofp i32 1 to x86_fp80 - %arrayidx = getelementptr inbounds [1024 x x86_fp80]* @x, i64 0, i64 %indvars.iv + %arrayidx = getelementptr inbounds [1024 x x86_fp80], [1024 x x86_fp80]* @x, i64 0, i64 %indvars.iv store x86_fp80 %conv, x86_fp80* %arrayidx, align 16 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/XCore/no-vector-registers.ll b/test/Transforms/LoopVectorize/XCore/no-vector-registers.ll index cab333d..afb3322 100644 --- a/test/Transforms/LoopVectorize/XCore/no-vector-registers.ll +++ b/test/Transforms/LoopVectorize/XCore/no-vector-registers.ll @@ -13,7 +13,7 @@ entry: do.body: %ptr.addr.0 = phi i8* [ %ptr, %entry ], [ %incdec.ptr, %do.body ] %len.addr.0 = phi i32 [ %len, %entry ], [ %dec, %do.body ] - %incdec.ptr = getelementptr inbounds i8* %ptr.addr.0, i32 1 + %incdec.ptr = getelementptr inbounds i8, i8* %ptr.addr.0, i32 1 store i8 0, i8* %ptr.addr.0, align 1 %dec = add nsw i32 %len.addr.0, -1 %tobool = icmp eq i32 %len.addr.0, 0 diff --git a/test/Transforms/LoopVectorize/align.ll b/test/Transforms/LoopVectorize/align.ll index f2fb8b9..7ee401d 100644 --- a/test/Transforms/LoopVectorize/align.ll +++ b/test/Transforms/LoopVectorize/align.ll @@ -6,8 +6,8 @@ target triple = "x86_64-apple-macosx10.8.0" ; Make sure we output the abi alignment if no alignment is specified. ;CHECK-LABEL: @align -;CHECK: load <4 x i32>* {{.*}} align 4 -;CHECK: load <4 x i32>* {{.*}} align 4 +;CHECK: load <4 x i32>, <4 x i32>* {{.*}} align 4 +;CHECK: load <4 x i32>, <4 x i32>* {{.*}} align 4 ;CHECK: store <4 x i32> {{.*}} align 4 define void @align(i32* %a, i32* %b, i32* %c) nounwind uwtable ssp { @@ -15,12 +15,12 @@ define void @align(i32* %a, i32* %b, i32* %c) nounwind uwtable ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds i32* %b, i64 %indvars.iv - %3 = load i32* %2 - %4 = getelementptr inbounds i32* %c, i64 %indvars.iv - %5 = load i32* %4 + %2 = getelementptr inbounds i32, i32* %b, i64 %indvars.iv + %3 = load i32, i32* %2 + %4 = getelementptr inbounds i32, i32* %c, i64 %indvars.iv + %5 = load i32, i32* %4 %6 = add nsw i32 %5, %3 - %7 = getelementptr inbounds i32* %a, i64 %indvars.iv + %7 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv store i32 %6, i32* %7 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/bsd_regex.ll b/test/Transforms/LoopVectorize/bsd_regex.ll index 7a3e798..ddb00ba 100644 --- a/test/Transforms/LoopVectorize/bsd_regex.ll +++ b/test/Transforms/LoopVectorize/bsd_regex.ll @@ -24,7 +24,7 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %0 = shl nsw i64 %indvars.iv, 2 - %arrayidx = getelementptr inbounds i32* %A, i64 %0 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %0 store i32 4, i32* %arrayidx, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/bzip_reverse_loops.ll b/test/Transforms/LoopVectorize/bzip_reverse_loops.ll index d7cbad0..f1efb25 100644 --- a/test/Transforms/LoopVectorize/bzip_reverse_loops.ll +++ b/test/Transforms/LoopVectorize/bzip_reverse_loops.ll @@ -16,8 +16,8 @@ entry: do.body: ; preds = %cond.end, %entry %n.addr.0 = phi i32 [ %n, %entry ], [ %dec, %cond.end ] %p.addr.0 = phi i16* [ %p, %entry ], [ %incdec.ptr, %cond.end ] - %incdec.ptr = getelementptr inbounds i16* %p.addr.0, i64 -1 - %0 = load i16* %incdec.ptr, align 2 + %incdec.ptr = getelementptr inbounds i16, i16* %p.addr.0, i64 -1 + %0 = load i16, i16* %incdec.ptr, align 2 %conv = zext i16 %0 to i32 %cmp = icmp ult i32 %conv, %size br i1 %cmp, label %cond.end, label %cond.true @@ -51,8 +51,8 @@ entry: do.body: ; preds = %do.body, %entry %n.addr.0 = phi i32 [ %n, %entry ], [ %dec, %do.body ] %p.0 = phi i32* [ %a, %entry ], [ %incdec.ptr, %do.body ] - %incdec.ptr = getelementptr inbounds i32* %p.0, i64 -1 - %0 = load i32* %incdec.ptr, align 4 + %incdec.ptr = getelementptr inbounds i32, i32* %p.0, i64 -1 + %0 = load i32, i32* %incdec.ptr, align 4 %cmp = icmp slt i32 %0, %wsize %sub = sub nsw i32 %0, %wsize %cond = select i1 %cmp, i32 0, i32 %sub diff --git a/test/Transforms/LoopVectorize/calloc.ll b/test/Transforms/LoopVectorize/calloc.ll index 5f441f3..a41e517 100644 --- a/test/Transforms/LoopVectorize/calloc.ll +++ b/test/Transforms/LoopVectorize/calloc.ll @@ -22,8 +22,8 @@ for.body.lr.ph: ; preds = %entry for.body: ; preds = %for.body, %for.body.lr.ph %i.030 = phi i64 [ 0, %for.body.lr.ph ], [ %inc, %for.body ] %shr = lshr i64 %i.030, 1 - %arrayidx = getelementptr inbounds i8* %bytes, i64 %shr - %1 = load i8* %arrayidx, align 1 + %arrayidx = getelementptr inbounds i8, i8* %bytes, i64 %shr + %1 = load i8, i8* %arrayidx, align 1 %conv = zext i8 %1 to i32 %and = shl i64 %i.030, 2 %neg = and i64 %and, 4 @@ -37,7 +37,7 @@ for.body: ; preds = %for.body, %for.body %cond = select i1 %cmp15, i32 87, i32 48 %add17 = add nsw i32 %cond, %shr11 %conv18 = trunc i32 %add17 to i8 - %arrayidx19 = getelementptr inbounds i8* %call, i64 %i.030 + %arrayidx19 = getelementptr inbounds i8, i8* %call, i64 %i.030 store i8 %conv18, i8* %arrayidx19, align 1 %inc = add i64 %i.030, 1 %exitcond = icmp eq i64 %inc, %0 diff --git a/test/Transforms/LoopVectorize/cast-induction.ll b/test/Transforms/LoopVectorize/cast-induction.ll index 4f92d33..fae8997 100644 --- a/test/Transforms/LoopVectorize/cast-induction.ll +++ b/test/Transforms/LoopVectorize/cast-induction.ll @@ -16,7 +16,7 @@ define void @example12() nounwind uwtable ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv %3 = trunc i64 %indvars.iv to i32 store i32 %3, i32* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/conditional-assignment.ll b/test/Transforms/LoopVectorize/conditional-assignment.ll index 38e9c4f..178a0e5 100644 --- a/test/Transforms/LoopVectorize/conditional-assignment.ll +++ b/test/Transforms/LoopVectorize/conditional-assignment.ll @@ -12,8 +12,8 @@ entry: for.body: ; preds = %for.inc, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.inc ] - %arrayidx = getelementptr inbounds i32* %indices, i64 %indvars.iv, !dbg !12 - %0 = load i32* %arrayidx, align 4, !dbg !12, !tbaa !14 + %arrayidx = getelementptr inbounds i32, i32* %indices, i64 %indvars.iv, !dbg !12 + %0 = load i32, i32* %arrayidx, align 4, !dbg !12, !tbaa !14 %cmp1 = icmp eq i32 %0, 1024, !dbg !12 br i1 %cmp1, label %if.then, label %for.inc, !dbg !12 @@ -36,20 +36,20 @@ attributes #0 = { nounwind } !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = !{!"0x11\0012\00clang version 3.6.0\001\00\000\00\002", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] -!1 = !{!"source.c", !"."} +!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0", isOptimized: true, emissionKind: 2, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!1 = !MDFile(filename: "source.c", directory: ".") !2 = !{} !3 = !{!4} -!4 = !{!"0x2e\00conditional_store\00conditional_store\00\001\000\001\000\006\00256\001\001", !1, !5, !6, null, void (i32*)* @conditional_store, null, null, !2} ; [ DW_TAG_subprogram ] -!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] -!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] +!4 = !MDSubprogram(name: "conditional_store", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, function: void (i32*)* @conditional_store, variables: !2) +!5 = !MDFile(filename: "source.c", directory: ".") +!6 = !MDSubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 2} -!8 = !{i32 2, !"Debug Info Version", i32 2} +!8 = !{i32 2, !"Debug Info Version", i32 3} !9 = !{!"clang version 3.6.0"} !10 = !MDLocation(line: 2, column: 8, scope: !11) -!11 = !{!"0xb\002\003\000", !1, !4} ; [ DW_TAG_lexical_block ] +!11 = distinct !MDLexicalBlock(line: 2, column: 3, file: !1, scope: !4) !12 = !MDLocation(line: 3, column: 9, scope: !13) -!13 = !{!"0xb\003\009\000", !1, !11} ; [ DW_TAG_lexical_block ] +!13 = distinct !MDLexicalBlock(line: 3, column: 9, file: !1, scope: !11) !14 = !{!15, !15, i64 0} !15 = !{!"int", !16, i64 0} !16 = !{!"omnipotent char", !17, i64 0} diff --git a/test/Transforms/LoopVectorize/control-flow.ll b/test/Transforms/LoopVectorize/control-flow.ll index 1882c3f..ae0e6c6 100644 --- a/test/Transforms/LoopVectorize/control-flow.ll +++ b/test/Transforms/LoopVectorize/control-flow.ll @@ -30,8 +30,8 @@ for.body.preheader: ; preds = %entry for.body: ; preds = %for.body.preheader, %if.else %indvars.iv = phi i64 [ %indvars.iv.next, %if.else ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv, !dbg !12 - %0 = load i32* %arrayidx, align 4, !dbg !12, !tbaa !15 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv, !dbg !12 + %0 = load i32, i32* %arrayidx, align 4, !dbg !12, !tbaa !15 %cmp1 = icmp sgt i32 %0, 10, !dbg !12 br i1 %cmp1, label %end.loopexit, label %if.else, !dbg !12 @@ -55,21 +55,21 @@ attributes #0 = { nounwind } !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = !{!"0x11\004\00clang version 3.5.0\001\00\006\00\002", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [./source.cpp] [DW_LANG_C_plus_plus] -!1 = !{!"source.cpp", !"."} +!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, runtimeVersion: 6, emissionKind: 2, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!1 = !MDFile(filename: "source.cpp", directory: ".") !2 = !{} !3 = !{!4} -!4 = !{!"0x2e\00test\00test\00\001\000\001\000\006\00256\001\002", !1, !5, !6, null, i32 (i32*, i32)* @_Z4testPii, null, null, !2} ; [ DW_TAG_subprogram ] [line 1] [def] [scope 2] [test] -!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [./source.cpp] -!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!4 = !MDSubprogram(name: "test", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !5, type: !6, function: i32 (i32*, i32)* @_Z4testPii, variables: !2) +!5 = !MDFile(filename: "source.cpp", directory: ".") +!6 = !MDSubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 2} -!8 = !{i32 2, !"Debug Info Version", i32 2} +!8 = !{i32 2, !"Debug Info Version", i32 3} !9 = !{!"clang version 3.5.0"} !10 = !MDLocation(line: 3, column: 8, scope: !11) -!11 = !{!"0xb\003\003\000", !1, !4} ; [ DW_TAG_lexical_block ] +!11 = distinct !MDLexicalBlock(line: 3, column: 3, file: !1, scope: !4) !12 = !MDLocation(line: 5, column: 9, scope: !13) -!13 = !{!"0xb\005\009\000", !1, !14} ; [ DW_TAG_lexical_block ] -!14 = !{!"0xb\004\003\000", !1, !11} ; [ DW_TAG_lexical_block ] +!13 = distinct !MDLexicalBlock(line: 5, column: 9, file: !1, scope: !14) +!14 = distinct !MDLexicalBlock(line: 4, column: 3, file: !1, scope: !11) !15 = !{!16, !16, i64 0} !16 = !{!"int", !17, i64 0} !17 = !{!"omnipotent char", !18, i64 0} diff --git a/test/Transforms/LoopVectorize/cpp-new-array.ll b/test/Transforms/LoopVectorize/cpp-new-array.ll index f32f610..22896d3 100644 --- a/test/Transforms/LoopVectorize/cpp-new-array.ll +++ b/test/Transforms/LoopVectorize/cpp-new-array.ll @@ -24,21 +24,21 @@ entry: for.body: ; preds = %entry, %for.body %i.01 = phi i32 [ 0, %entry ], [ %inc, %for.body ] %idxprom = sext i32 %i.01 to i64 - %arrayidx = getelementptr inbounds float* %0, i64 %idxprom - %3 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %0, i64 %idxprom + %3 = load float, float* %arrayidx, align 4 %idxprom5 = sext i32 %i.01 to i64 - %arrayidx6 = getelementptr inbounds float* %1, i64 %idxprom5 - %4 = load float* %arrayidx6, align 4 + %arrayidx6 = getelementptr inbounds float, float* %1, i64 %idxprom5 + %4 = load float, float* %arrayidx6, align 4 %add = fadd float %3, %4 %idxprom7 = sext i32 %i.01 to i64 - %arrayidx8 = getelementptr inbounds float* %2, i64 %idxprom7 + %arrayidx8 = getelementptr inbounds float, float* %2, i64 %idxprom7 store float %add, float* %arrayidx8, align 4 %inc = add nsw i32 %i.01, 1 %cmp = icmp slt i32 %inc, 1000 br i1 %cmp, label %for.body, label %for.end for.end: ; preds = %for.body - %5 = load float* %2, align 4 + %5 = load float, float* %2, align 4 %conv10 = fptosi float %5 to i32 ret i32 %conv10 } diff --git a/test/Transforms/LoopVectorize/dbg.value.ll b/test/Transforms/LoopVectorize/dbg.value.ll index 92d3154..f942ecc 100644 --- a/test/Transforms/LoopVectorize/dbg.value.ll +++ b/test/Transforms/LoopVectorize/dbg.value.ll @@ -11,21 +11,21 @@ target triple = "x86_64-apple-macosx10.8.0" ; CHECK-LABEL: @test( define i32 @test() #0 { entry: - tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !9, metadata !{}), !dbg !18 + tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !9, metadata !MDExpression()), !dbg !18 br label %for.body, !dbg !18 for.body: ;CHECK: load <4 x i32> %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @B, i64 0, i64 %indvars.iv, !dbg !19 - %0 = load i32* %arrayidx, align 4, !dbg !19 - %arrayidx2 = getelementptr inbounds [1024 x i32]* @C, i64 0, i64 %indvars.iv, !dbg !19 - %1 = load i32* %arrayidx2, align 4, !dbg !19 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @B, i64 0, i64 %indvars.iv, !dbg !19 + %0 = load i32, i32* %arrayidx, align 4, !dbg !19 + %arrayidx2 = getelementptr inbounds [1024 x i32], [1024 x i32]* @C, i64 0, i64 %indvars.iv, !dbg !19 + %1 = load i32, i32* %arrayidx2, align 4, !dbg !19 %add = add nsw i32 %1, %0, !dbg !19 - %arrayidx4 = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv, !dbg !19 + %arrayidx4 = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv, !dbg !19 store i32 %add, i32* %arrayidx4, align 4, !dbg !19 %indvars.iv.next = add i64 %indvars.iv, 1, !dbg !18 - tail call void @llvm.dbg.value(metadata !{null}, i64 0, metadata !9, metadata !{}), !dbg !18 + tail call void @llvm.dbg.value(metadata !{null}, i64 0, metadata !9, metadata !MDExpression()), !dbg !18 %lftr.wideiv = trunc i64 %indvars.iv.next to i32, !dbg !18 %exitcond = icmp ne i32 %lftr.wideiv, 1024, !dbg !18 br i1 %exitcond, label %for.body, label %for.end, !dbg !18 @@ -44,27 +44,27 @@ attributes #1 = { nounwind readnone } !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!26} -!0 = !{!"0x11\004\00clang\001\00\000\00\000", !25, !1, !1, !2, !11, null} ; [ DW_TAG_compile_unit ] +!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang", isOptimized: true, emissionKind: 0, file: !25, enums: !1, retainedTypes: !1, subprograms: !2, globals: !11) !1 = !{i32 0} !2 = !{!3} -!3 = !{!"0x2e\00test\00test\00test\005\000\001\000\006\00256\001\005", !25, !4, !5, null, i32 ()* @test, null, null, !8} ; [ DW_TAG_subprogram ] -!4 = !{!"0x29", !25} ; [ DW_TAG_file_type ] -!5 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !6, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!3 = !MDSubprogram(name: "test", linkageName: "test", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !25, scope: !4, type: !5, function: i32 ()* @test, variables: !8) +!4 = !MDFile(filename: "test", directory: "/path/to/somewhere") +!5 = !MDSubroutineType(types: !6) !6 = !{!7} -!7 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] +!7 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !8 = !{!9} -!9 = !{!"0x100\00i\006\000", !10, !4, !7} ; [ DW_TAG_auto_variable ] -!10 = !{!"0xb\006\000\000", !25, !3} ; [ DW_TAG_lexical_block ] +!9 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i", line: 6, scope: !10, file: !4, type: !7) +!10 = distinct !MDLexicalBlock(line: 6, column: 0, file: !25, scope: !3) !11 = !{!12, !16, !17} -!12 = !{!"0x34\00A\00A\00\001\000\001", null, !4, !13, [1024 x i32]* @A, null} ; [ DW_TAG_variable ] -!13 = !{!"0x1\00\000\0032768\0032\000\000", null, null, !7, !14, i32 0, null, null, null} ; [ DW_TAG_array_type ] [line 0, size 32768, align 32, offset 0] [from int] +!12 = !MDGlobalVariable(name: "A", line: 1, isLocal: false, isDefinition: true, scope: null, file: !4, type: !13, variable: [1024 x i32]* @A) +!13 = !MDCompositeType(tag: DW_TAG_array_type, size: 32768, align: 32, baseType: !7, elements: !14) !14 = !{!15} !15 = !{i32 786465, i64 0, i64 1024} -!16 = !{!"0x34\00B\00B\00\002\000\001", null, !4, !13, [1024 x i32]* @B, null} ; [ DW_TAG_variable ] -!17 = !{!"0x34\00C\00C\00\003\000\001", null, !4, !13, [1024 x i32]* @C, null} ; [ DW_TAG_variable ] +!16 = !MDGlobalVariable(name: "B", line: 2, isLocal: false, isDefinition: true, scope: null, file: !4, type: !13, variable: [1024 x i32]* @B) +!17 = !MDGlobalVariable(name: "C", line: 3, isLocal: false, isDefinition: true, scope: null, file: !4, type: !13, variable: [1024 x i32]* @C) !18 = !MDLocation(line: 6, scope: !10) !19 = !MDLocation(line: 7, scope: !20) -!20 = !{!"0xb\006\000\001", !25, !10} ; [ DW_TAG_lexical_block ] +!20 = distinct !MDLexicalBlock(line: 6, column: 0, file: !25, scope: !10) !24 = !MDLocation(line: 9, scope: !3) -!25 = !{!"test", !"/path/to/somewhere"} -!26 = !{i32 1, !"Debug Info Version", i32 2} +!25 = !MDFile(filename: "test", directory: "/path/to/somewhere") +!26 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/Transforms/LoopVectorize/debugloc.ll b/test/Transforms/LoopVectorize/debugloc.ll index 634bf79..97d9da0 100644 --- a/test/Transforms/LoopVectorize/debugloc.ll +++ b/test/Transforms/LoopVectorize/debugloc.ll @@ -8,8 +8,8 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 ; CHECK: cmp.zero = icmp eq i64 {{.*}}, 0, !dbg ![[LOC:[0-9]+]] ; CHECK: vector.body ; CHECK: index {{.*}}, !dbg ![[LOC]] -; CHECK: getelementptr inbounds i32* %a, {{.*}}, !dbg ![[LOC2:[0-9]+]] -; CHECK: load <2 x i32>* {{.*}}, !dbg ![[LOC2]] +; CHECK: getelementptr inbounds i32, i32* %a, {{.*}}, !dbg ![[LOC2:[0-9]+]] +; CHECK: load <2 x i32>, <2 x i32>* {{.*}}, !dbg ![[LOC2]] ; CHECK: add <2 x i32> {{.*}}, !dbg ![[LOC2]] ; CHECK: add i64 %index, 2, !dbg ![[LOC]] ; CHECK: icmp eq i64 %index.next, %end.idx.rnd.down, !dbg ![[LOC]] @@ -19,10 +19,10 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 define i32 @f(i32* nocapture %a, i32 %size) #0 { entry: - tail call void @llvm.dbg.value(metadata i32* %a, i64 0, metadata !13, metadata !{}), !dbg !19 - tail call void @llvm.dbg.value(metadata i32 %size, i64 0, metadata !14, metadata !{}), !dbg !19 - tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !15, metadata !{}), !dbg !20 - tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !16, metadata !{}), !dbg !21 + tail call void @llvm.dbg.value(metadata i32* %a, i64 0, metadata !13, metadata !MDExpression()), !dbg !19 + tail call void @llvm.dbg.value(metadata i32 %size, i64 0, metadata !14, metadata !MDExpression()), !dbg !19 + tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !15, metadata !MDExpression()), !dbg !20 + tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !16, metadata !MDExpression()), !dbg !21 %cmp4 = icmp eq i32 %size, 0, !dbg !21 br i1 %cmp4, label %for.end, label %for.body.lr.ph, !dbg !21 @@ -32,12 +32,12 @@ for.body.lr.ph: ; preds = %entry for.body: ; preds = %for.body.lr.ph, %for.body %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ] %sum.05 = phi i32 [ 0, %for.body.lr.ph ], [ %add, %for.body ] - %arrayidx = getelementptr inbounds i32* %a, i64 %indvars.iv, !dbg !22 - %0 = load i32* %arrayidx, align 4, !dbg !22 + %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv, !dbg !22 + %0 = load i32, i32* %arrayidx, align 4, !dbg !22 %add = add i32 %0, %sum.05, !dbg !22 - tail call void @llvm.dbg.value(metadata i32 %add.lcssa, i64 0, metadata !15, metadata !{}), !dbg !22 + tail call void @llvm.dbg.value(metadata i32 %add.lcssa, i64 0, metadata !15, metadata !MDExpression()), !dbg !22 %indvars.iv.next = add i64 %indvars.iv, 1, !dbg !21 - tail call void @llvm.dbg.value(metadata !{null}, i64 0, metadata !16, metadata !{}), !dbg !21 + tail call void @llvm.dbg.value(metadata !{null}, i64 0, metadata !16, metadata !MDExpression()), !dbg !21 %lftr.wideiv = trunc i64 %indvars.iv.next to i32, !dbg !21 %exitcond = icmp ne i32 %lftr.wideiv, %size, !dbg !21 br i1 %exitcond, label %for.body, label %for.cond.for.end_crit_edge, !dbg !21 @@ -63,28 +63,28 @@ attributes #1 = { nounwind readnone } !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!18, !27} -!0 = !{!"0x11\0012\00clang version 3.4 (trunk 185038) (llvm/trunk 185097)\001\00\000\00\000", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [/Volumes/Data/backedup/dev/os/llvm/debug/-] [DW_LANG_C99] -!1 = !{!"-", !"/Volumes/Data/backedup/dev/os/llvm/debug"} +!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 185038) (llvm/trunk 185097)", isOptimized: true, emissionKind: 0, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!1 = !MDFile(filename: "-", directory: "/Volumes/Data/backedup/dev/os/llvm/debug") !2 = !{i32 0} !3 = !{!4} -!4 = !{!"0x2e\00f\00f\00\003\000\001\000\006\00256\001\003", !5, !6, !7, null, i32 (i32*, i32)* @f, null, null, !12} ; [ DW_TAG_subprogram ] [line 3] [def] [f] -!5 = !{!"<stdin>", !"/Volumes/Data/backedup/dev/os/llvm/debug"} -!6 = !{!"0x29", !5} ; [ DW_TAG_file_type ] [/Volumes/Data/backedup/dev/os/llvm/debug/<stdin>] -!7 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !8, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!4 = !MDSubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !6, type: !7, function: i32 (i32*, i32)* @f, variables: !12) +!5 = !MDFile(filename: "<stdin>", directory: "/Volumes/Data/backedup/dev/os/llvm/debug") +!6 = !MDFile(filename: "<stdin>", directory: "/Volumes/Data/backedup/dev/os/llvm/debug") +!7 = !MDSubroutineType(types: !8) !8 = !{!9, !10, !11} -!9 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] -!10 = !{!"0xf\00\000\0064\0064\000\000", null, null, !9} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from int] -!11 = !{!"0x24\00unsigned int\000\0032\0032\000\000\007", null, null} ; [ DW_TAG_base_type ] [unsigned int] [line 0, size 32, align 32, offset 0, enc DW_ATE_unsigned] +!9 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!10 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !9) +!11 = !MDBasicType(tag: DW_TAG_base_type, name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) !12 = !{!13, !14, !15, !16} -!13 = !{!"0x101\00a\0016777219\000", !4, !6, !10} ; [ DW_TAG_arg_variable ] [a] [line 3] -!14 = !{!"0x101\00size\0033554435\000", !4, !6, !11} ; [ DW_TAG_arg_variable ] [size] [line 3] -!15 = !{!"0x100\00sum\004\000", !4, !6, !11} ; [ DW_TAG_auto_variable ] [sum] [line 4] -!16 = !{!"0x100\00i\005\000", !17, !6, !11} ; [ DW_TAG_auto_variable ] [i] [line 5] -!17 = !{!"0xb\005\000\000", !5, !4} ; [ DW_TAG_lexical_block ] [/Volumes/Data/backedup/dev/os/llvm/debug/<stdin>] +!13 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 3, arg: 1, scope: !4, file: !6, type: !10) +!14 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "size", line: 3, arg: 2, scope: !4, file: !6, type: !11) +!15 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "sum", line: 4, scope: !4, file: !6, type: !11) +!16 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i", line: 5, scope: !17, file: !6, type: !11) +!17 = distinct !MDLexicalBlock(line: 5, column: 0, file: !5, scope: !4) !18 = !{i32 2, !"Dwarf Version", i32 3} !19 = !MDLocation(line: 3, scope: !4) !20 = !MDLocation(line: 4, scope: !4) !21 = !MDLocation(line: 5, scope: !17) !22 = !MDLocation(line: 6, scope: !17) !26 = !MDLocation(line: 7, scope: !4) -!27 = !{i32 1, !"Debug Info Version", i32 2} +!27 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/Transforms/LoopVectorize/duplicated-metadata.ll b/test/Transforms/LoopVectorize/duplicated-metadata.ll index bf2f899..9f7cdef 100644 --- a/test/Transforms/LoopVectorize/duplicated-metadata.ll +++ b/test/Transforms/LoopVectorize/duplicated-metadata.ll @@ -12,8 +12,8 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds float* %a, i64 %indvars.iv - %p = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %a, i64 %indvars.iv + %p = load float, float* %arrayidx, align 4 %mul = fmul float %p, 2.000000e+00 store float %mul, float* %arrayidx, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/ee-crash.ll b/test/Transforms/LoopVectorize/ee-crash.ll index a3c0bb8..0c38734 100644 --- a/test/Transforms/LoopVectorize/ee-crash.ll +++ b/test/Transforms/LoopVectorize/ee-crash.ll @@ -11,18 +11,18 @@ target triple = "x86_64-apple-macosx10.8.0" define i32 @_Z4foo1Pii(i32* %A, i32 %n, <2 x i32> %q) #0 { entry: %idx.ext = sext i32 %n to i64 - %add.ptr = getelementptr inbounds i32* %A, i64 %idx.ext + %add.ptr = getelementptr inbounds i32, i32* %A, i64 %idx.ext %cmp3.i = icmp eq i32 %n, 0 br i1 %cmp3.i, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %for.body.i for.body.i: ; preds = %entry, %for.body.i %__init.addr.05.i = phi i32 [ %add.i, %for.body.i ], [ 0, %entry ] %__first.addr.04.i = phi i32* [ %incdec.ptr.i, %for.body.i ], [ %A, %entry ] - %0 = load i32* %__first.addr.04.i, align 4 + %0 = load i32, i32* %__first.addr.04.i, align 4 %q1 = extractelement <2 x i32> %q, i32 %n %q2 = add nsw i32 %0, %q1 %add.i = add nsw i32 %q2, %__init.addr.05.i - %incdec.ptr.i = getelementptr inbounds i32* %__first.addr.04.i, i64 1 + %incdec.ptr.i = getelementptr inbounds i32, i32* %__first.addr.04.i, i64 1 %cmp.i = icmp eq i32* %incdec.ptr.i, %add.ptr br i1 %cmp.i, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %for.body.i diff --git a/test/Transforms/LoopVectorize/exact.ll b/test/Transforms/LoopVectorize/exact.ll index 0a8fbf3..0a4e0dc 100644 --- a/test/Transforms/LoopVectorize/exact.ll +++ b/test/Transforms/LoopVectorize/exact.ll @@ -11,8 +11,8 @@ entry: for.body: %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ] - %arrayidx = getelementptr inbounds i32* %x, i64 %iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %x, i64 %iv + %0 = load i32, i32* %arrayidx, align 4 %conv1 = lshr exact i32 %0, 1 store i32 %conv1, i32* %arrayidx, align 4 %iv.next = add nuw nsw i64 %iv, 1 diff --git a/test/Transforms/LoopVectorize/flags.ll b/test/Transforms/LoopVectorize/flags.ll index 0fc55c8..fcbc874 100644 --- a/test/Transforms/LoopVectorize/flags.ll +++ b/test/Transforms/LoopVectorize/flags.ll @@ -14,8 +14,8 @@ define i32 @flags1(i32 %n, i32* nocapture %A) nounwind uwtable ssp { .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 9, %0 ] - %2 = getelementptr inbounds i32* %A, i64 %indvars.iv - %3 = load i32* %2, align 4 + %2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 %4 = mul nsw i32 %3, 3 store i32 %4, i32* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -39,8 +39,8 @@ define i32 @flags2(i32 %n, i32* nocapture %A) nounwind uwtable ssp { .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 9, %0 ] - %2 = getelementptr inbounds i32* %A, i64 %indvars.iv - %3 = load i32* %2, align 4 + %2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 %4 = mul i32 %3, 3 store i32 %4, i32* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -66,8 +66,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %q.04 = phi float [ 0.000000e+00, %entry ], [ %add, %for.body ] - %arrayidx = getelementptr inbounds float* %s, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %s, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %add = fadd fast float %q.04, %0 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 256 diff --git a/test/Transforms/LoopVectorize/float-reduction.ll b/test/Transforms/LoopVectorize/float-reduction.ll index 0f064ee..1310b27 100644 --- a/test/Transforms/LoopVectorize/float-reduction.ll +++ b/test/Transforms/LoopVectorize/float-reduction.ll @@ -12,8 +12,8 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %sum.04 = phi float [ 0.000000e+00, %entry ], [ %add, %for.body ] - %arrayidx = getelementptr inbounds float* %A, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %A, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %add = fadd fast float %sum.04, %0 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -34,8 +34,8 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %sum.04 = phi float [ 0.000000e+00, %entry ], [ %sub, %for.body ] - %arrayidx = getelementptr inbounds float* %A, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %A, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %sub = fsub fast float %sum.04, %0 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/funcall.ll b/test/Transforms/LoopVectorize/funcall.ll index e03534f..35c2dfc 100644 --- a/test/Transforms/LoopVectorize/funcall.ll +++ b/test/Transforms/LoopVectorize/funcall.ll @@ -16,8 +16,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds double* %d, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %d, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %1 = tail call double @llvm.pow.f64(double %0, double %t) store double %1, double* %arrayidx, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/gcc-examples.ll b/test/Transforms/LoopVectorize/gcc-examples.ll index 6a2c2c6..1880901 100644 --- a/test/Transforms/LoopVectorize/gcc-examples.ll +++ b/test/Transforms/LoopVectorize/gcc-examples.ll @@ -44,12 +44,12 @@ define void @example1() nounwind uwtable ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = add nsw i32 %5, %3 - %7 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %7 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv store i32 %6, i32* %7, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -84,7 +84,7 @@ define void @example2(i32 %n, i32 %x) nounwind uwtable ssp { .lr.ph5: ; preds = %0, %.lr.ph5 %indvars.iv6 = phi i64 [ %indvars.iv.next7, %.lr.ph5 ], [ 0, %0 ] - %3 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv6 + %3 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv6 store i32 %x, i32* %3, align 4 %indvars.iv.next7 = add i64 %indvars.iv6, 1 %lftr.wideiv = trunc i64 %indvars.iv.next7 to i32 @@ -95,12 +95,12 @@ define void @example2(i32 %n, i32 %x) nounwind uwtable ssp { %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %i.0.lcssa, %.preheader ] %.02 = phi i32 [ %4, %.lr.ph ], [ %n, %.preheader ] %4 = add nsw i32 %.02, -1 - %5 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv - %6 = load i32* %5, align 4 - %7 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %indvars.iv - %8 = load i32* %7, align 4 + %5 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv + %6 = load i32, i32* %5, align 4 + %7 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %indvars.iv + %8 = load i32, i32* %7, align 4 %9 = and i32 %8, %6 - %10 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %10 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv store i32 %9, i32* %10, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %11 = icmp eq i32 %4, 0 @@ -128,9 +128,9 @@ define void @example3(i32 %n, i32* noalias nocapture %p, i32* noalias nocapture %.014 = phi i32* [ %5, %.lr.ph ], [ %p, %0 ] %.023 = phi i32* [ %3, %.lr.ph ], [ %q, %0 ] %2 = add nsw i32 %.05, -1 - %3 = getelementptr inbounds i32* %.023, i64 1 - %4 = load i32* %.023, align 16 - %5 = getelementptr inbounds i32* %.014, i64 1 + %3 = getelementptr inbounds i32, i32* %.023, i64 1 + %4 = load i32, i32* %.023, align 16 + %5 = getelementptr inbounds i32, i32* %.014, i64 1 store i32 %4, i32* %.014, align 16 %6 = icmp eq i32 %2, 0 br i1 %6, label %._crit_edge, label %.lr.ph @@ -161,10 +161,10 @@ define void @example4(i32 %n, i32* noalias nocapture %p, i32* noalias nocapture %4 = phi i32 [ %9, %.lr.ph10 ], [ %1, %0 ] %.018 = phi i32* [ %8, %.lr.ph10 ], [ %p, %0 ] %.027 = phi i32* [ %5, %.lr.ph10 ], [ %q, %0 ] - %5 = getelementptr inbounds i32* %.027, i64 1 - %6 = load i32* %.027, align 16 + %5 = getelementptr inbounds i32, i32* %.027, i64 1 + %6 = load i32, i32* %.027, align 16 %7 = add nsw i32 %6, 5 - %8 = getelementptr inbounds i32* %.018, i64 1 + %8 = getelementptr inbounds i32, i32* %.018, i64 1 store i32 %7, i32* %.018, align 16 %9 = add nsw i32 %4, -1 %10 = icmp eq i32 %4, 0 @@ -176,13 +176,13 @@ define void @example4(i32 %n, i32* noalias nocapture %p, i32* noalias nocapture .lr.ph6: ; preds = %.preheader4, %.lr.ph6 %indvars.iv11 = phi i64 [ %indvars.iv.next12, %.lr.ph6 ], [ 0, %.preheader4 ] %indvars.iv.next12 = add i64 %indvars.iv11, 1 - %11 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv.next12 - %12 = load i32* %11, align 4 + %11 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv.next12 + %12 = load i32, i32* %11, align 4 %13 = add nsw i64 %indvars.iv11, 3 - %14 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %13 - %15 = load i32* %14, align 4 + %14 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %13 + %15 = load i32, i32* %14, align 4 %16 = add nsw i32 %15, %12 - %17 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv11 + %17 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv11 store i32 %16, i32* %17, align 4 %lftr.wideiv13 = trunc i64 %indvars.iv.next12 to i32 %exitcond14 = icmp eq i32 %lftr.wideiv13, %1 @@ -190,11 +190,11 @@ define void @example4(i32 %n, i32* noalias nocapture %p, i32* noalias nocapture .lr.ph: ; preds = %.preheader, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader ] - %18 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv - %19 = load i32* %18, align 4 + %18 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv + %19 = load i32, i32* %18, align 4 %20 = icmp sgt i32 %19, 4 %21 = select i1 %20, i32 4, i32 0 - %22 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv + %22 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv store i32 %21, i32* %22, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -223,7 +223,7 @@ define void @example8(i32 %x) nounwind uwtable ssp { ; <label>:1 ; preds = %1, %.preheader %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [32 x [1024 x i32]]* @G, i64 0, i64 %indvars.iv3, i64 %indvars.iv + %2 = getelementptr inbounds [32 x [1024 x i32]], [32 x [1024 x i32]]* @G, i64 0, i64 %indvars.iv3, i64 %indvars.iv store i32 %x, i32* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -249,10 +249,10 @@ define i32 @example9() nounwind uwtable readonly ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] %diff.01 = phi i32 [ 0, %0 ], [ %7, %1 ] - %2 = getelementptr inbounds [1024 x i32]* @ub, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds [1024 x i32]* @uc, i64 0, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds [1024 x i32], [1024 x i32]* @ub, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds [1024 x i32], [1024 x i32]* @uc, i64 0, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = add i32 %3, %diff.01 %7 = sub i32 %6, %5 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -276,19 +276,19 @@ define void @example10a(i16* noalias nocapture %sa, i16* noalias nocapture %sb, ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds i32* %ib, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds i32* %ic, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds i32, i32* %ib, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds i32, i32* %ic, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = add nsw i32 %5, %3 - %7 = getelementptr inbounds i32* %ia, i64 %indvars.iv + %7 = getelementptr inbounds i32, i32* %ia, i64 %indvars.iv store i32 %6, i32* %7, align 4 - %8 = getelementptr inbounds i16* %sb, i64 %indvars.iv - %9 = load i16* %8, align 2 - %10 = getelementptr inbounds i16* %sc, i64 %indvars.iv - %11 = load i16* %10, align 2 + %8 = getelementptr inbounds i16, i16* %sb, i64 %indvars.iv + %9 = load i16, i16* %8, align 2 + %10 = getelementptr inbounds i16, i16* %sc, i64 %indvars.iv + %11 = load i16, i16* %10, align 2 %12 = add i16 %11, %9 - %13 = getelementptr inbounds i16* %sa, i64 %indvars.iv + %13 = getelementptr inbounds i16, i16* %sa, i64 %indvars.iv store i16 %12, i16* %13, align 2 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -309,10 +309,10 @@ define void @example10b(i16* noalias nocapture %sa, i16* noalias nocapture %sb, ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds i16* %sb, i64 %indvars.iv - %3 = load i16* %2, align 2 + %2 = getelementptr inbounds i16, i16* %sb, i64 %indvars.iv + %3 = load i16, i16* %2, align 2 %4 = sext i16 %3 to i32 - %5 = getelementptr inbounds i32* %ia, i64 %indvars.iv + %5 = getelementptr inbounds i32, i32* %ia, i64 %indvars.iv store i32 %4, i32* %5, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -340,23 +340,23 @@ define void @example11() nounwind uwtable ssp { %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] %2 = shl nsw i64 %indvars.iv, 1 %3 = or i64 %2, 1 - %4 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %3 - %5 = load i32* %4, align 4 - %6 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %3 - %7 = load i32* %6, align 4 + %4 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %3 + %5 = load i32, i32* %4, align 4 + %6 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %3 + %7 = load i32, i32* %6, align 4 %8 = mul nsw i32 %7, %5 - %9 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %2 - %10 = load i32* %9, align 8 - %11 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %2 - %12 = load i32* %11, align 8 + %9 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %2 + %10 = load i32, i32* %9, align 8 + %11 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %2 + %12 = load i32, i32* %11, align 8 %13 = mul nsw i32 %12, %10 %14 = sub nsw i32 %8, %13 - %15 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %15 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv store i32 %14, i32* %15, align 4 %16 = mul nsw i32 %7, %10 %17 = mul nsw i32 %12, %5 %18 = add nsw i32 %17, %16 - %19 = getelementptr inbounds [2048 x i32]* @d, i64 0, i64 %indvars.iv + %19 = getelementptr inbounds [2048 x i32], [2048 x i32]* @d, i64 0, i64 %indvars.iv store i32 %18, i32* %19, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -376,7 +376,7 @@ define void @example12() nounwind uwtable ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv %3 = trunc i64 %indvars.iv to i32 store i32 %3, i32* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -396,19 +396,19 @@ define void @example13(i32** nocapture %A, i32** nocapture %B, i32* nocapture %o .preheader: ; preds = %14, %0 %indvars.iv4 = phi i64 [ 0, %0 ], [ %indvars.iv.next5, %14 ] - %1 = getelementptr inbounds i32** %A, i64 %indvars.iv4 - %2 = load i32** %1, align 8 - %3 = getelementptr inbounds i32** %B, i64 %indvars.iv4 - %4 = load i32** %3, align 8 + %1 = getelementptr inbounds i32*, i32** %A, i64 %indvars.iv4 + %2 = load i32*, i32** %1, align 8 + %3 = getelementptr inbounds i32*, i32** %B, i64 %indvars.iv4 + %4 = load i32*, i32** %3, align 8 br label %5 ; <label>:5 ; preds = %.preheader, %5 %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %5 ] %diff.02 = phi i32 [ 0, %.preheader ], [ %11, %5 ] - %6 = getelementptr inbounds i32* %2, i64 %indvars.iv - %7 = load i32* %6, align 4 - %8 = getelementptr inbounds i32* %4, i64 %indvars.iv - %9 = load i32* %8, align 4 + %6 = getelementptr inbounds i32, i32* %2, i64 %indvars.iv + %7 = load i32, i32* %6, align 4 + %8 = getelementptr inbounds i32, i32* %4, i64 %indvars.iv + %9 = load i32, i32* %8, align 4 %10 = add i32 %7, %diff.02 %11 = sub i32 %10, %9 %indvars.iv.next = add i64 %indvars.iv, 8 @@ -417,7 +417,7 @@ define void @example13(i32** nocapture %A, i32** nocapture %B, i32* nocapture %o br i1 %13, label %5, label %14 ; <label>:14 ; preds = %5 - %15 = getelementptr inbounds i32* %out, i64 %indvars.iv4 + %15 = getelementptr inbounds i32, i32* %out, i64 %indvars.iv4 store i32 %11, i32* %15, align 4 %indvars.iv.next5 = add i64 %indvars.iv4, 1 %lftr.wideiv = trunc i64 %indvars.iv.next5 to i32 @@ -444,14 +444,14 @@ define void @example14(i32** nocapture %in, i32** nocapture %coeff, i32* nocaptu ; <label>:0 ; preds = %0, %.preheader %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %0 ] %sum.12 = phi i32 [ %sum.05, %.preheader ], [ %10, %0 ] - %1 = getelementptr inbounds i32** %in, i64 %indvars.iv - %2 = load i32** %1, align 8 - %3 = getelementptr inbounds i32* %2, i64 %indvars.iv7 - %4 = load i32* %3, align 4 - %5 = getelementptr inbounds i32** %coeff, i64 %indvars.iv - %6 = load i32** %5, align 8 - %7 = getelementptr inbounds i32* %6, i64 %indvars.iv7 - %8 = load i32* %7, align 4 + %1 = getelementptr inbounds i32*, i32** %in, i64 %indvars.iv + %2 = load i32*, i32** %1, align 8 + %3 = getelementptr inbounds i32, i32* %2, i64 %indvars.iv7 + %4 = load i32, i32* %3, align 4 + %5 = getelementptr inbounds i32*, i32** %coeff, i64 %indvars.iv + %6 = load i32*, i32** %5, align 8 + %7 = getelementptr inbounds i32, i32* %6, i64 %indvars.iv7 + %8 = load i32, i32* %7, align 4 %9 = mul nsw i32 %8, %4 %10 = add nsw i32 %9, %sum.12 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -478,14 +478,14 @@ define void @example14(i32** nocapture %in, i32** nocapture %coeff, i32* nocaptu %indvars.iv.1 = phi i64 [ 0, %.preheader.1 ], [ %13, %12 ] %sum.12.1 = phi i32 [ %sum.05.1, %.preheader.1 ], [ %23, %12 ] %13 = add nsw i64 %indvars.iv.1, 1 - %14 = getelementptr inbounds i32** %in, i64 %13 - %15 = load i32** %14, align 8 - %16 = getelementptr inbounds i32* %15, i64 %indvars.iv7.1 - %17 = load i32* %16, align 4 - %18 = getelementptr inbounds i32** %coeff, i64 %indvars.iv.1 - %19 = load i32** %18, align 8 - %20 = getelementptr inbounds i32* %19, i64 %indvars.iv7.1 - %21 = load i32* %20, align 4 + %14 = getelementptr inbounds i32*, i32** %in, i64 %13 + %15 = load i32*, i32** %14, align 8 + %16 = getelementptr inbounds i32, i32* %15, i64 %indvars.iv7.1 + %17 = load i32, i32* %16, align 4 + %18 = getelementptr inbounds i32*, i32** %coeff, i64 %indvars.iv.1 + %19 = load i32*, i32** %18, align 8 + %20 = getelementptr inbounds i32, i32* %19, i64 %indvars.iv7.1 + %21 = load i32, i32* %20, align 4 %22 = mul nsw i32 %21, %17 %23 = add nsw i32 %22, %sum.12.1 %lftr.wideiv.1 = trunc i64 %13 to i32 @@ -499,7 +499,7 @@ define void @example14(i32** nocapture %in, i32** nocapture %coeff, i32* nocaptu br i1 %exitcond10.1, label %.preheader3.2, label %.preheader.1 .preheader3.2: ; preds = %24 - %25 = getelementptr inbounds i32* %out, i64 1 + %25 = getelementptr inbounds i32, i32* %out, i64 1 store i32 %23, i32* %25, align 4 br label %.preheader.2 @@ -512,14 +512,14 @@ define void @example14(i32** nocapture %in, i32** nocapture %coeff, i32* nocaptu %indvars.iv.2 = phi i64 [ 0, %.preheader.2 ], [ %indvars.iv.next.2, %26 ] %sum.12.2 = phi i32 [ %sum.05.2, %.preheader.2 ], [ %37, %26 ] %27 = add nsw i64 %indvars.iv.2, 2 - %28 = getelementptr inbounds i32** %in, i64 %27 - %29 = load i32** %28, align 8 - %30 = getelementptr inbounds i32* %29, i64 %indvars.iv7.2 - %31 = load i32* %30, align 4 - %32 = getelementptr inbounds i32** %coeff, i64 %indvars.iv.2 - %33 = load i32** %32, align 8 - %34 = getelementptr inbounds i32* %33, i64 %indvars.iv7.2 - %35 = load i32* %34, align 4 + %28 = getelementptr inbounds i32*, i32** %in, i64 %27 + %29 = load i32*, i32** %28, align 8 + %30 = getelementptr inbounds i32, i32* %29, i64 %indvars.iv7.2 + %31 = load i32, i32* %30, align 4 + %32 = getelementptr inbounds i32*, i32** %coeff, i64 %indvars.iv.2 + %33 = load i32*, i32** %32, align 8 + %34 = getelementptr inbounds i32, i32* %33, i64 %indvars.iv7.2 + %35 = load i32, i32* %34, align 4 %36 = mul nsw i32 %35, %31 %37 = add nsw i32 %36, %sum.12.2 %indvars.iv.next.2 = add i64 %indvars.iv.2, 1 @@ -534,7 +534,7 @@ define void @example14(i32** nocapture %in, i32** nocapture %coeff, i32* nocaptu br i1 %exitcond10.2, label %.preheader3.3, label %.preheader.2 .preheader3.3: ; preds = %38 - %39 = getelementptr inbounds i32* %out, i64 2 + %39 = getelementptr inbounds i32, i32* %out, i64 2 store i32 %37, i32* %39, align 4 br label %.preheader.3 @@ -547,14 +547,14 @@ define void @example14(i32** nocapture %in, i32** nocapture %coeff, i32* nocaptu %indvars.iv.3 = phi i64 [ 0, %.preheader.3 ], [ %indvars.iv.next.3, %40 ] %sum.12.3 = phi i32 [ %sum.05.3, %.preheader.3 ], [ %51, %40 ] %41 = add nsw i64 %indvars.iv.3, 3 - %42 = getelementptr inbounds i32** %in, i64 %41 - %43 = load i32** %42, align 8 - %44 = getelementptr inbounds i32* %43, i64 %indvars.iv7.3 - %45 = load i32* %44, align 4 - %46 = getelementptr inbounds i32** %coeff, i64 %indvars.iv.3 - %47 = load i32** %46, align 8 - %48 = getelementptr inbounds i32* %47, i64 %indvars.iv7.3 - %49 = load i32* %48, align 4 + %42 = getelementptr inbounds i32*, i32** %in, i64 %41 + %43 = load i32*, i32** %42, align 8 + %44 = getelementptr inbounds i32, i32* %43, i64 %indvars.iv7.3 + %45 = load i32, i32* %44, align 4 + %46 = getelementptr inbounds i32*, i32** %coeff, i64 %indvars.iv.3 + %47 = load i32*, i32** %46, align 8 + %48 = getelementptr inbounds i32, i32* %47, i64 %indvars.iv7.3 + %49 = load i32, i32* %48, align 4 %50 = mul nsw i32 %49, %45 %51 = add nsw i32 %50, %sum.12.3 %indvars.iv.next.3 = add i64 %indvars.iv.3, 1 @@ -569,7 +569,7 @@ define void @example14(i32** nocapture %in, i32** nocapture %coeff, i32* nocaptu br i1 %exitcond10.3, label %53, label %.preheader.3 ; <label>:53 ; preds = %52 - %54 = getelementptr inbounds i32* %out, i64 3 + %54 = getelementptr inbounds i32, i32* %out, i64 3 store i32 %51, i32* %54, align 4 ret void } @@ -590,8 +590,8 @@ define i32 @example21(i32* nocapture %b, i32 %n) nounwind uwtable readonly ssp { %indvars.iv = phi i64 [ %2, %.lr.ph ], [ %indvars.iv.next, %3 ] %a.02 = phi i32 [ 0, %.lr.ph ], [ %6, %3 ] %indvars.iv.next = add i64 %indvars.iv, -1 - %4 = getelementptr inbounds i32* %b, i64 %indvars.iv.next - %5 = load i32* %4, align 4 + %4 = getelementptr inbounds i32, i32* %b, i64 %indvars.iv.next + %5 = load i32, i32* %4, align 4 %6 = add nsw i32 %5, %a.02 %7 = trunc i64 %indvars.iv.next to i32 %8 = icmp sgt i32 %7, 0 @@ -612,11 +612,11 @@ define void @example23(i16* nocapture %src, i32* nocapture %dst) nounwind uwtabl %.04 = phi i16* [ %src, %0 ], [ %2, %1 ] %.013 = phi i32* [ %dst, %0 ], [ %6, %1 ] %i.02 = phi i32 [ 0, %0 ], [ %7, %1 ] - %2 = getelementptr inbounds i16* %.04, i64 1 - %3 = load i16* %.04, align 2 + %2 = getelementptr inbounds i16, i16* %.04, i64 1 + %3 = load i16, i16* %.04, align 2 %4 = zext i16 %3 to i32 %5 = shl nuw nsw i32 %4, 7 - %6 = getelementptr inbounds i32* %.013, i64 1 + %6 = getelementptr inbounds i32, i32* %.013, i64 1 store i32 %5, i32* %.013, align 4 %7 = add nsw i32 %i.02, 1 %exitcond = icmp eq i32 %7, 256 @@ -634,14 +634,14 @@ define void @example24(i16 signext %x, i16 signext %y) nounwind uwtable ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [1024 x float]* @fa, i64 0, i64 %indvars.iv - %3 = load float* %2, align 4 - %4 = getelementptr inbounds [1024 x float]* @fb, i64 0, i64 %indvars.iv - %5 = load float* %4, align 4 + %2 = getelementptr inbounds [1024 x float], [1024 x float]* @fa, i64 0, i64 %indvars.iv + %3 = load float, float* %2, align 4 + %4 = getelementptr inbounds [1024 x float], [1024 x float]* @fb, i64 0, i64 %indvars.iv + %5 = load float, float* %4, align 4 %6 = fcmp olt float %3, %5 %x.y = select i1 %6, i16 %x, i16 %y %7 = sext i16 %x.y to i32 - %8 = getelementptr inbounds [1024 x i32]* @ic, i64 0, i64 %indvars.iv + %8 = getelementptr inbounds [1024 x i32], [1024 x i32]* @ic, i64 0, i64 %indvars.iv store i32 %7, i32* %8, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -661,19 +661,19 @@ define void @example25() nounwind uwtable ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [1024 x float]* @da, i64 0, i64 %indvars.iv - %3 = load float* %2, align 4 - %4 = getelementptr inbounds [1024 x float]* @db, i64 0, i64 %indvars.iv - %5 = load float* %4, align 4 + %2 = getelementptr inbounds [1024 x float], [1024 x float]* @da, i64 0, i64 %indvars.iv + %3 = load float, float* %2, align 4 + %4 = getelementptr inbounds [1024 x float], [1024 x float]* @db, i64 0, i64 %indvars.iv + %5 = load float, float* %4, align 4 %6 = fcmp olt float %3, %5 - %7 = getelementptr inbounds [1024 x float]* @dc, i64 0, i64 %indvars.iv - %8 = load float* %7, align 4 - %9 = getelementptr inbounds [1024 x float]* @dd, i64 0, i64 %indvars.iv - %10 = load float* %9, align 4 + %7 = getelementptr inbounds [1024 x float], [1024 x float]* @dc, i64 0, i64 %indvars.iv + %8 = load float, float* %7, align 4 + %9 = getelementptr inbounds [1024 x float], [1024 x float]* @dd, i64 0, i64 %indvars.iv + %10 = load float, float* %9, align 4 %11 = fcmp olt float %8, %10 %12 = and i1 %6, %11 %13 = zext i1 %12 to i32 - %14 = getelementptr inbounds [1024 x i32]* @dj, i64 0, i64 %indvars.iv + %14 = getelementptr inbounds [1024 x i32], [1024 x i32]* @dj, i64 0, i64 %indvars.iv store i32 %13, i32* %14, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/global_alias.ll b/test/Transforms/LoopVectorize/global_alias.ll index 3f11ce8..84fa48c 100644 --- a/test/Transforms/LoopVectorize/global_alias.ll +++ b/test/Transforms/LoopVectorize/global_alias.ll @@ -35,31 +35,31 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %1 - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %1 = load i32, i32* %i, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %1 + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 - %arrayidx1 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %4 + %4 = load i32, i32* %i, align 4 + %arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %4 store i32 %add, i32* %arrayidx1, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx2 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx2, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx2, align 4 ret i32 %7 } @@ -83,32 +83,32 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 90 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %add = add nsw i32 %1, 10 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %add - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %add + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add1 = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 - %arrayidx2 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %4 + %4 = load i32, i32* %i, align 4 + %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %4 store i32 %add1, i32* %arrayidx2, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx3 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx3, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx3, align 4 ret i32 %7 } @@ -132,32 +132,32 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %1 - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %1 = load i32, i32* %i, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %1 + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %add1 = add nsw i32 %4, 10 - %arrayidx2 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %add1 + %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %add1 store i32 %add, i32* %arrayidx2, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx3 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx3, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx3, align 4 ret i32 %7 } @@ -184,34 +184,34 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32** @PB, align 4 - %2 = load i32* %i, align 4 - %add.ptr = getelementptr inbounds i32* %1, i32 %2 - %3 = load i32* %add.ptr, align 4 - %4 = load i32* %a.addr, align 4 + %1 = load i32*, i32** @PB, align 4 + %2 = load i32, i32* %i, align 4 + %add.ptr = getelementptr inbounds i32, i32* %1, i32 %2 + %3 = load i32, i32* %add.ptr, align 4 + %4 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %3, %4 - %5 = load i32** @PA, align 4 - %6 = load i32* %i, align 4 - %add.ptr1 = getelementptr inbounds i32* %5, i32 %6 + %5 = load i32*, i32** @PA, align 4 + %6 = load i32, i32* %i, align 4 + %add.ptr1 = getelementptr inbounds i32, i32* %5, i32 %6 store i32 %add, i32* %add.ptr1, align 4 br label %for.inc for.inc: ; preds = %for.body - %7 = load i32* %i, align 4 + %7 = load i32, i32* %i, align 4 %inc = add nsw i32 %7, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %8 = load i32** @PA, align 4 - %9 = load i32* %a.addr, align 4 - %add.ptr2 = getelementptr inbounds i32* %8, i32 %9 - %10 = load i32* %add.ptr2, align 4 + %8 = load i32*, i32** @PA, align 4 + %9 = load i32, i32* %a.addr, align 4 + %add.ptr2 = getelementptr inbounds i32, i32* %8, i32 %9 + %10 = load i32, i32* %add.ptr2, align 4 ret i32 %10 } @@ -237,37 +237,37 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 - %2 = load i32* %N, align 4 - %arrayidx = getelementptr inbounds [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0* @Bar, i32 0, i32 2), i32 0, i32 %2 - %arrayidx1 = getelementptr inbounds [100 x i32]* %arrayidx, i32 0, i32 %1 - %3 = load i32* %arrayidx1, align 4 - %4 = load i32* %a.addr, align 4 + %1 = load i32, i32* %i, align 4 + %2 = load i32, i32* %N, align 4 + %arrayidx = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @Bar, i32 0, i32 2), i32 0, i32 %2 + %arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* %arrayidx, i32 0, i32 %1 + %3 = load i32, i32* %arrayidx1, align 4 + %4 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %3, %4 - %5 = load i32* %i, align 4 - %6 = load i32* %N, align 4 - %arrayidx2 = getelementptr inbounds [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %6 - %arrayidx3 = getelementptr inbounds [100 x i32]* %arrayidx2, i32 0, i32 %5 + %5 = load i32, i32* %i, align 4 + %6 = load i32, i32* %N, align 4 + %arrayidx2 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %6 + %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %arrayidx2, i32 0, i32 %5 store i32 %add, i32* %arrayidx3, align 4 br label %for.inc for.inc: ; preds = %for.body - %7 = load i32* %i, align 4 + %7 = load i32, i32* %i, align 4 %inc = add nsw i32 %7, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %8 = load i32* %a.addr, align 4 - %9 = load i32* %N, align 4 - %arrayidx4 = getelementptr inbounds [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %9 - %arrayidx5 = getelementptr inbounds [100 x i32]* %arrayidx4, i32 0, i32 %8 - %10 = load i32* %arrayidx5, align 4 + %8 = load i32, i32* %a.addr, align 4 + %9 = load i32, i32* %N, align 4 + %arrayidx4 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %9 + %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %arrayidx4, i32 0, i32 %8 + %10 = load i32, i32* %arrayidx5, align 4 ret i32 %10 } @@ -293,38 +293,38 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 - %2 = load i32* %N, align 4 + %1 = load i32, i32* %i, align 4 + %2 = load i32, i32* %N, align 4 %add = add nsw i32 %2, 1 - %arrayidx = getelementptr inbounds [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %add - %arrayidx1 = getelementptr inbounds [100 x i32]* %arrayidx, i32 0, i32 %1 - %3 = load i32* %arrayidx1, align 4 - %4 = load i32* %a.addr, align 4 + %arrayidx = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %add + %arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* %arrayidx, i32 0, i32 %1 + %3 = load i32, i32* %arrayidx1, align 4 + %4 = load i32, i32* %a.addr, align 4 %add2 = add nsw i32 %3, %4 - %5 = load i32* %i, align 4 - %6 = load i32* %N, align 4 - %arrayidx3 = getelementptr inbounds [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %6 - %arrayidx4 = getelementptr inbounds [100 x i32]* %arrayidx3, i32 0, i32 %5 + %5 = load i32, i32* %i, align 4 + %6 = load i32, i32* %N, align 4 + %arrayidx3 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %6 + %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %arrayidx3, i32 0, i32 %5 store i32 %add2, i32* %arrayidx4, align 4 br label %for.inc for.inc: ; preds = %for.body - %7 = load i32* %i, align 4 + %7 = load i32, i32* %i, align 4 %inc = add nsw i32 %7, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %8 = load i32* %a.addr, align 4 - %9 = load i32* %N, align 4 - %arrayidx5 = getelementptr inbounds [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %9 - %arrayidx6 = getelementptr inbounds [100 x i32]* %arrayidx5, i32 0, i32 %8 - %10 = load i32* %arrayidx6, align 4 + %8 = load i32, i32* %a.addr, align 4 + %9 = load i32, i32* %N, align 4 + %arrayidx5 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %9 + %arrayidx6 = getelementptr inbounds [100 x i32], [100 x i32]* %arrayidx5, i32 0, i32 %8 + %10 = load i32, i32* %arrayidx6, align 4 ret i32 %10 } @@ -347,35 +347,35 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %sub = sub nsw i32 100, %1 %sub1 = sub nsw i32 %sub, 1 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %sub2 = sub nsw i32 100, %4 %sub3 = sub nsw i32 %sub2, 1 - %arrayidx4 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %sub3 + %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %sub3 store i32 %add, i32* %arrayidx4, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx5 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx5, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx5, align 4 ret i32 %7 } @@ -399,35 +399,35 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 90 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %sub = sub nsw i32 100, %1 %sub1 = sub nsw i32 %sub, 10 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %sub2 = sub nsw i32 100, %4 %sub3 = sub nsw i32 %sub2, 1 - %arrayidx4 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %sub3 + %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %sub3 store i32 %add, i32* %arrayidx4, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx5 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx5, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx5, align 4 ret i32 %7 } @@ -451,35 +451,35 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %sub = sub nsw i32 100, %1 %sub1 = sub nsw i32 %sub, 1 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %sub2 = sub nsw i32 100, %4 %sub3 = sub nsw i32 %sub2, 10 - %arrayidx4 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %sub3 + %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %sub3 store i32 %add, i32* %arrayidx4, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx5 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx5, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx5, align 4 ret i32 %7 } @@ -506,40 +506,40 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32** @PB, align 4 - %add.ptr = getelementptr inbounds i32* %1, i32 100 - %2 = load i32* %i, align 4 + %1 = load i32*, i32** @PB, align 4 + %add.ptr = getelementptr inbounds i32, i32* %1, i32 100 + %2 = load i32, i32* %i, align 4 %idx.neg = sub i32 0, %2 - %add.ptr1 = getelementptr inbounds i32* %add.ptr, i32 %idx.neg - %add.ptr2 = getelementptr inbounds i32* %add.ptr1, i32 -1 - %3 = load i32* %add.ptr2, align 4 - %4 = load i32* %a.addr, align 4 + %add.ptr1 = getelementptr inbounds i32, i32* %add.ptr, i32 %idx.neg + %add.ptr2 = getelementptr inbounds i32, i32* %add.ptr1, i32 -1 + %3 = load i32, i32* %add.ptr2, align 4 + %4 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %3, %4 - %5 = load i32** @PA, align 4 - %add.ptr3 = getelementptr inbounds i32* %5, i32 100 - %6 = load i32* %i, align 4 + %5 = load i32*, i32** @PA, align 4 + %add.ptr3 = getelementptr inbounds i32, i32* %5, i32 100 + %6 = load i32, i32* %i, align 4 %idx.neg4 = sub i32 0, %6 - %add.ptr5 = getelementptr inbounds i32* %add.ptr3, i32 %idx.neg4 - %add.ptr6 = getelementptr inbounds i32* %add.ptr5, i32 -1 + %add.ptr5 = getelementptr inbounds i32, i32* %add.ptr3, i32 %idx.neg4 + %add.ptr6 = getelementptr inbounds i32, i32* %add.ptr5, i32 -1 store i32 %add, i32* %add.ptr6, align 4 br label %for.inc for.inc: ; preds = %for.body - %7 = load i32* %i, align 4 + %7 = load i32, i32* %i, align 4 %inc = add nsw i32 %7, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %8 = load i32** @PA, align 4 - %9 = load i32* %a.addr, align 4 - %add.ptr7 = getelementptr inbounds i32* %8, i32 %9 - %10 = load i32* %add.ptr7, align 4 + %8 = load i32*, i32** @PA, align 4 + %9 = load i32, i32* %a.addr, align 4 + %add.ptr7 = getelementptr inbounds i32, i32* %8, i32 %9 + %10 = load i32, i32* %add.ptr7, align 4 ret i32 %10 } @@ -565,41 +565,41 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %sub = sub nsw i32 100, %1 %sub1 = sub nsw i32 %sub, 1 - %2 = load i32* %N, align 4 - %arrayidx = getelementptr inbounds [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0* @Bar, i32 0, i32 2), i32 0, i32 %2 - %arrayidx2 = getelementptr inbounds [100 x i32]* %arrayidx, i32 0, i32 %sub1 - %3 = load i32* %arrayidx2, align 4 - %4 = load i32* %a.addr, align 4 + %2 = load i32, i32* %N, align 4 + %arrayidx = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @Bar, i32 0, i32 2), i32 0, i32 %2 + %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %arrayidx, i32 0, i32 %sub1 + %3 = load i32, i32* %arrayidx2, align 4 + %4 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %3, %4 - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %sub3 = sub nsw i32 100, %5 %sub4 = sub nsw i32 %sub3, 1 - %6 = load i32* %N, align 4 - %arrayidx5 = getelementptr inbounds [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %6 - %arrayidx6 = getelementptr inbounds [100 x i32]* %arrayidx5, i32 0, i32 %sub4 + %6 = load i32, i32* %N, align 4 + %arrayidx5 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %6 + %arrayidx6 = getelementptr inbounds [100 x i32], [100 x i32]* %arrayidx5, i32 0, i32 %sub4 store i32 %add, i32* %arrayidx6, align 4 br label %for.inc for.inc: ; preds = %for.body - %7 = load i32* %i, align 4 + %7 = load i32, i32* %i, align 4 %inc = add nsw i32 %7, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %8 = load i32* %a.addr, align 4 - %9 = load i32* %N, align 4 - %arrayidx7 = getelementptr inbounds [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %9 - %arrayidx8 = getelementptr inbounds [100 x i32]* %arrayidx7, i32 0, i32 %8 - %10 = load i32* %arrayidx8, align 4 + %8 = load i32, i32* %a.addr, align 4 + %9 = load i32, i32* %N, align 4 + %arrayidx7 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %9 + %arrayidx8 = getelementptr inbounds [100 x i32], [100 x i32]* %arrayidx7, i32 0, i32 %8 + %10 = load i32, i32* %arrayidx8, align 4 ret i32 %10 } @@ -625,42 +625,42 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %sub = sub nsw i32 100, %1 %sub1 = sub nsw i32 %sub, 1 - %2 = load i32* %N, align 4 + %2 = load i32, i32* %N, align 4 %add = add nsw i32 %2, 1 - %arrayidx = getelementptr inbounds [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %add - %arrayidx2 = getelementptr inbounds [100 x i32]* %arrayidx, i32 0, i32 %sub1 - %3 = load i32* %arrayidx2, align 4 - %4 = load i32* %a.addr, align 4 + %arrayidx = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %add + %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %arrayidx, i32 0, i32 %sub1 + %3 = load i32, i32* %arrayidx2, align 4 + %4 = load i32, i32* %a.addr, align 4 %add3 = add nsw i32 %3, %4 - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %sub4 = sub nsw i32 100, %5 %sub5 = sub nsw i32 %sub4, 1 - %6 = load i32* %N, align 4 - %arrayidx6 = getelementptr inbounds [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %6 - %arrayidx7 = getelementptr inbounds [100 x i32]* %arrayidx6, i32 0, i32 %sub5 + %6 = load i32, i32* %N, align 4 + %arrayidx6 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %6 + %arrayidx7 = getelementptr inbounds [100 x i32], [100 x i32]* %arrayidx6, i32 0, i32 %sub5 store i32 %add3, i32* %arrayidx7, align 4 br label %for.inc for.inc: ; preds = %for.body - %7 = load i32* %i, align 4 + %7 = load i32, i32* %i, align 4 %inc = add nsw i32 %7, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %8 = load i32* %a.addr, align 4 - %9 = load i32* %N, align 4 - %arrayidx8 = getelementptr inbounds [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %9 - %arrayidx9 = getelementptr inbounds [100 x i32]* %arrayidx8, i32 0, i32 %8 - %10 = load i32* %arrayidx9, align 4 + %8 = load i32, i32* %a.addr, align 4 + %9 = load i32, i32* %N, align 4 + %arrayidx8 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @Bar, i32 0, i32 0), i32 0, i32 %9 + %arrayidx9 = getelementptr inbounds [100 x i32], [100 x i32]* %arrayidx8, i32 0, i32 %8 + %10 = load i32, i32* %arrayidx9, align 4 ret i32 %10 } @@ -684,32 +684,32 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %add = add nsw i32 %1, 4 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %add - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %add + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add1 = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 - %arrayidx2 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %4 + %4 = load i32, i32* %i, align 4 + %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %4 store i32 %add1, i32* %arrayidx2, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx3 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx3, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx3, align 4 ret i32 %7 } @@ -733,35 +733,35 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %sub = sub nsw i32 100, %1 %sub1 = sub nsw i32 %sub, 5 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %sub1 - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %sub1 + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %sub2 = sub nsw i32 100, %4 %sub3 = sub nsw i32 %sub2, 1 - %arrayidx4 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %sub3 + %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %sub3 store i32 %add, i32* %arrayidx4, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx5 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx5, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx5, align 4 ret i32 %7 } @@ -789,33 +789,33 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %sub = sub nsw i32 100, %1 %sub1 = sub nsw i32 %sub, 1 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 - %arrayidx2 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %4 + %4 = load i32, i32* %i, align 4 + %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %4 store i32 %add, i32* %arrayidx2, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx3 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx3, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx3, align 4 ret i32 %7 } @@ -839,33 +839,33 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %1 - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %1 = load i32, i32* %i, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %1 + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %sub = sub nsw i32 100, %4 %sub1 = sub nsw i32 %sub, 1 - %arrayidx2 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %sub1 + %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %sub1 store i32 %add, i32* %arrayidx2, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx3 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx3, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx3, align 4 ret i32 %7 } @@ -889,37 +889,37 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32** @PB, align 4 - %add.ptr = getelementptr inbounds i32* %1, i32 100 - %2 = load i32* %i, align 4 + %1 = load i32*, i32** @PB, align 4 + %add.ptr = getelementptr inbounds i32, i32* %1, i32 100 + %2 = load i32, i32* %i, align 4 %idx.neg = sub i32 0, %2 - %add.ptr1 = getelementptr inbounds i32* %add.ptr, i32 %idx.neg - %add.ptr2 = getelementptr inbounds i32* %add.ptr1, i32 -1 - %3 = load i32* %add.ptr2, align 4 - %4 = load i32* %a.addr, align 4 + %add.ptr1 = getelementptr inbounds i32, i32* %add.ptr, i32 %idx.neg + %add.ptr2 = getelementptr inbounds i32, i32* %add.ptr1, i32 -1 + %3 = load i32, i32* %add.ptr2, align 4 + %4 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %3, %4 - %5 = load i32** @PA, align 4 - %6 = load i32* %i, align 4 - %add.ptr3 = getelementptr inbounds i32* %5, i32 %6 + %5 = load i32*, i32** @PA, align 4 + %6 = load i32, i32* %i, align 4 + %add.ptr3 = getelementptr inbounds i32, i32* %5, i32 %6 store i32 %add, i32* %add.ptr3, align 4 br label %for.inc for.inc: ; preds = %for.body - %7 = load i32* %i, align 4 + %7 = load i32, i32* %i, align 4 %inc = add nsw i32 %7, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %8 = load i32** @PA, align 4 - %9 = load i32* %a.addr, align 4 - %add.ptr4 = getelementptr inbounds i32* %8, i32 %9 - %10 = load i32* %add.ptr4, align 4 + %8 = load i32*, i32** @PA, align 4 + %9 = load i32, i32* %a.addr, align 4 + %add.ptr4 = getelementptr inbounds i32, i32* %8, i32 %9 + %10 = load i32, i32* %add.ptr4, align 4 ret i32 %10 } @@ -946,34 +946,34 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %sub = sub nsw i32 100, %1 %sub1 = sub nsw i32 %sub, 1 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %add2 = add nsw i32 %4, 10 - %arrayidx3 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %add2 + %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %add2 store i32 %add, i32* %arrayidx3, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx4 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx4, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx4, align 4 ret i32 %7 } @@ -996,33 +996,33 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %sub = sub nsw i32 100, %1 %sub1 = sub nsw i32 %sub, 10 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 - %arrayidx2 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %4 + %4 = load i32, i32* %i, align 4 + %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %4 store i32 %add, i32* %arrayidx2, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx3 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx3, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx3, align 4 ret i32 %7 } @@ -1045,33 +1045,33 @@ entry: br label %for.cond for.cond: ; preds = %for.inc, %entry - %0 = load i32* %i, align 4 + %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 100 br i1 %cmp, label %for.body, label %for.end for.body: ; preds = %for.cond - %1 = load i32* %i, align 4 + %1 = load i32, i32* %i, align 4 %sub = sub nsw i32 100, %1 %sub1 = sub nsw i32 %sub, 10 - %arrayidx = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 - %2 = load i32* %arrayidx, align 4 - %3 = load i32* %a.addr, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 2), i32 0, i32 %sub1 + %2 = load i32, i32* %arrayidx, align 4 + %3 = load i32, i32* %a.addr, align 4 %add = add nsw i32 %2, %3 - %4 = load i32* %i, align 4 + %4 = load i32, i32* %i, align 4 %add2 = add nsw i32 %4, 10 - %arrayidx3 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %add2 + %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %add2 store i32 %add, i32* %arrayidx3, align 4 br label %for.inc for.inc: ; preds = %for.body - %5 = load i32* %i, align 4 + %5 = load i32, i32* %i, align 4 %inc = add nsw i32 %5, 1 store i32 %inc, i32* %i, align 4 br label %for.cond for.end: ; preds = %for.cond - %6 = load i32* %a.addr, align 4 - %arrayidx4 = getelementptr inbounds [100 x i32]* getelementptr inbounds (%struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 - %7 = load i32* %arrayidx4, align 4 + %6 = load i32, i32* %a.addr, align 4 + %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* getelementptr inbounds (%struct.anon, %struct.anon* @Foo, i32 0, i32 0), i32 0, i32 %6 + %7 = load i32, i32* %arrayidx4, align 4 ret i32 %7 } diff --git a/test/Transforms/LoopVectorize/hoist-loads.ll b/test/Transforms/LoopVectorize/hoist-loads.ll index d0b27f1..a20b0f6 100644 --- a/test/Transforms/LoopVectorize/hoist-loads.ll +++ b/test/Transforms/LoopVectorize/hoist-loads.ll @@ -14,14 +14,14 @@ entry: br label %for.body for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %if.end9 ] - %arrayidx = getelementptr inbounds [1024 x float]* @A, i64 0, i64 %indvars.iv - %arrayidx2 = getelementptr inbounds [1024 x float]* @B, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @A, i64 0, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds [1024 x float], [1024 x float]* @B, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx2, align 4 %cmp3 = fcmp oeq float %0, 0.000000e+00 br i1 %cmp3, label %if.end9, label %if.else if.else: - %1 = load float* %arrayidx, align 4 + %1 = load float, float* %arrayidx, align 4 br label %if.end9 if.end9: @@ -46,14 +46,14 @@ entry: br label %for.body for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %if.end9 ] - %arrayidx = getelementptr inbounds [1024 x float]* @A, i64 0, i64 %indvars.iv - %arrayidx2 = getelementptr inbounds [1024 x float]* @B, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @A, i64 0, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds [1024 x float], [1024 x float]* @B, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx2, align 4 %cmp3 = fcmp oeq float %0, 0.000000e+00 br i1 %cmp3, label %if.end9, label %if.else if.else: - %1 = load float* %arrayidx, align 4 + %1 = load float, float* %arrayidx, align 4 br label %if.end9 if.end9: diff --git a/test/Transforms/LoopVectorize/i8-induction.ll b/test/Transforms/LoopVectorize/i8-induction.ll index 90e3ec0..d9e8a43 100644 --- a/test/Transforms/LoopVectorize/i8-induction.ll +++ b/test/Transforms/LoopVectorize/i8-induction.ll @@ -9,7 +9,7 @@ target triple = "x86_64-apple-macosx10.8.0" define void @f() nounwind uwtable ssp { scalar.ph: store i8 0, i8* inttoptr (i64 1 to i8*), align 1 - %0 = load i8* @a, align 1 + %0 = load i8, i8* @a, align 1 br label %for.body for.body: diff --git a/test/Transforms/LoopVectorize/if-conversion-edgemasks.ll b/test/Transforms/LoopVectorize/if-conversion-edgemasks.ll index 8b8408b..8d435f5 100644 --- a/test/Transforms/LoopVectorize/if-conversion-edgemasks.ll +++ b/test/Transforms/LoopVectorize/if-conversion-edgemasks.ll @@ -20,15 +20,15 @@ entry: br i1 %cmp88, label %for.body.lr.ph, label %for.end for.body.lr.ph: - %0 = load i32** @b, align 8 - %1 = load i32** @a, align 8 - %2 = load i32** @c, align 8 + %0 = load i32*, i32** @b, align 8 + %1 = load i32*, i32** @a, align 8 + %2 = load i32*, i32** @c, align 8 br label %for.body for.body: %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %_ZL3fn3ii.exit58 ] - %arrayidx = getelementptr inbounds i32* %0, i64 %indvars.iv - %3 = load i32* %arrayidx, align 4 %4 = trunc i64 %indvars.iv to i32 + %arrayidx = getelementptr inbounds i32, i32* %0, i64 %indvars.iv + %3 = load i32, i32* %arrayidx, align 4 %4 = trunc i64 %indvars.iv to i32 %and.i = and i32 %4, 1 %tobool.i.i = icmp eq i32 %and.i, 0 br i1 %tobool.i.i, label %if.end.i, label %if.then.i @@ -134,9 +134,9 @@ if.then.i15.i: _ZL3fn3ii.exit: %p1.addr.0.i16.i = phi i32 [ %or.i14.i, %if.then.i15.i ], [ %p1.addr.3.i.i, %_Z3fn2iii.exit.i ] - %arrayidx2 = getelementptr inbounds i32* %1, i64 %indvars.iv - store i32 %p1.addr.0.i16.i, i32* %arrayidx2, align 4 %arrayidx4 = getelementptr inbounds i32* %0, i64 %indvars.iv - %10 = load i32* %arrayidx4, align 4 br i1 %tobool.i.i, label %_Z3fn1ii.exit.i26, label %if.then.i.i21 + %arrayidx2 = getelementptr inbounds i32, i32* %1, i64 %indvars.iv + store i32 %p1.addr.0.i16.i, i32* %arrayidx2, align 4 %arrayidx4 = getelementptr inbounds i32, i32* %0, i64 %indvars.iv + %10 = load i32, i32* %arrayidx4, align 4 br i1 %tobool.i.i, label %_Z3fn1ii.exit.i26, label %if.then.i.i21 if.then.i.i21: %and.i.i18 = lshr i32 %10, 2 @@ -232,7 +232,7 @@ if.then.i15.i56: _ZL3fn3ii.exit58: %p1.addr.0.i16.i57 = phi i32 [ %or.i14.i55, %if.then.i15.i56 ], [ %p1.addr.3.i.i50, %_Z3fn2iii.exit.i52 ] - %arrayidx7 = getelementptr inbounds i32* %2, i64 %indvars.iv + %arrayidx7 = getelementptr inbounds i32, i32* %2, i64 %indvars.iv store i32 %p1.addr.0.i16.i57, i32* %arrayidx7, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond = icmp ne i32 %lftr.wideiv, %p1 diff --git a/test/Transforms/LoopVectorize/if-conversion-nest.ll b/test/Transforms/LoopVectorize/if-conversion-nest.ll index b5ac8fc..3a581eb 100644 --- a/test/Transforms/LoopVectorize/if-conversion-nest.ll +++ b/test/Transforms/LoopVectorize/if-conversion-nest.ll @@ -19,10 +19,10 @@ entry: for.body: %indvars.iv = phi i64 [ %indvars.iv.next, %if.end14 ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds i32* %B, i64 %indvars.iv - %1 = load i32* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %B, i64 %indvars.iv + %1 = load i32, i32* %arrayidx2, align 4 %cmp3 = icmp sgt i32 %0, %1 br i1 %cmp3, label %if.then, label %if.end14 diff --git a/test/Transforms/LoopVectorize/if-conversion-reduction.ll b/test/Transforms/LoopVectorize/if-conversion-reduction.ll index 455699c..20333b9 100644 --- a/test/Transforms/LoopVectorize/if-conversion-reduction.ll +++ b/test/Transforms/LoopVectorize/if-conversion-reduction.ll @@ -14,8 +14,8 @@ entry: for.body: ; preds = %entry, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] %sum.011 = phi i32 [ %sum.1, %for.inc ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp1 = icmp sgt i32 %0, 30 br i1 %cmp1, label %if.then, label %for.inc diff --git a/test/Transforms/LoopVectorize/if-conversion.ll b/test/Transforms/LoopVectorize/if-conversion.ll index a220203..fb54169 100644 --- a/test/Transforms/LoopVectorize/if-conversion.ll +++ b/test/Transforms/LoopVectorize/if-conversion.ll @@ -35,10 +35,10 @@ for.body.lr.ph: for.body: %indvars.iv = phi i64 [ %0, %for.body.lr.ph ], [ %indvars.iv.next, %if.end ] - %arrayidx = getelementptr inbounds i32* %a, i64 %indvars.iv - %1 = load i32* %arrayidx, align 4 - %arrayidx4 = getelementptr inbounds i32* %b, i64 %indvars.iv - %2 = load i32* %arrayidx4, align 4 + %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv + %1 = load i32, i32* %arrayidx, align 4 + %arrayidx4 = getelementptr inbounds i32, i32* %b, i64 %indvars.iv + %2 = load i32, i32* %arrayidx4, align 4 %cmp5 = icmp sgt i32 %1, %2 br i1 %cmp5, label %if.then, label %if.end @@ -84,8 +84,8 @@ entry: for.body: ; preds = %entry, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] %sum.011 = phi i32 [ %sum.1, %for.inc ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp1 = icmp sgt i32 %0, 30 br i1 %cmp1, label %if.then, label %for.inc @@ -123,13 +123,13 @@ entry: for.body: %inc3 = phi i32 [ 0, %entry ], [ %inc, %cond.end ] %or2 = phi i32 [ 0, %entry ], [ %or, %cond.end ] - br i1 icmp eq (i32** getelementptr inbounds ([1 x i32*]* @a, i64 0, i64 0), i32** @c), label %cond.false, label %cond.end + br i1 icmp eq (i32** getelementptr inbounds ([1 x i32*], [1 x i32*]* @a, i64 0, i64 0), i32** @c), label %cond.false, label %cond.end cond.false: br label %cond.end cond.end: - %cond = phi i32 [ sdiv (i32 1, i32 zext (i1 icmp eq (i32** getelementptr inbounds ([1 x i32*]* @a, i64 0, i64 0), i32** @c) to i32)), %cond.false ], [ 0, %for.body ] + %cond = phi i32 [ sdiv (i32 1, i32 zext (i1 icmp eq (i32** getelementptr inbounds ([1 x i32*], [1 x i32*]* @a, i64 0, i64 0), i32** @c) to i32)), %cond.false ], [ 0, %for.body ] %or = or i32 %or2, %cond %inc = add nsw i32 %inc3, 1 %cmp = icmp slt i32 %inc, 128 @@ -153,10 +153,10 @@ entry: for.body: %inc3 = phi i32 [ 0, %entry ], [ %inc, %cond.end ] %or2 = phi i32 [ 0, %entry ], [ %or, %cond.end ] - br i1 icmp eq (i32** getelementptr inbounds ([1 x i32*]* @a, i64 0, i64 0), i32** @c), label %cond.false, label %cond.end + br i1 icmp eq (i32** getelementptr inbounds ([1 x i32*], [1 x i32*]* @a, i64 0, i64 0), i32** @c), label %cond.false, label %cond.end cond.false: - %cond.1 = or i32 %inc3, sdiv (i32 1, i32 zext (i1 icmp eq (i32** getelementptr inbounds ([1 x i32*]* @a, i64 0, i64 1), i32** @c) to i32)) + %cond.1 = or i32 %inc3, sdiv (i32 1, i32 zext (i1 icmp eq (i32** getelementptr inbounds ([1 x i32*], [1 x i32*]* @a, i64 0, i64 1), i32** @c) to i32)) br label %cond.end cond.end: diff --git a/test/Transforms/LoopVectorize/if-pred-stores.ll b/test/Transforms/LoopVectorize/if-pred-stores.ll index c6067e0..991d027 100644 --- a/test/Transforms/LoopVectorize/if-pred-stores.ll +++ b/test/Transforms/LoopVectorize/if-pred-stores.ll @@ -39,10 +39,10 @@ entry: ; UNROLL: vector.body: ; UNROLL: %[[IND:[a-zA-Z0-9]+]] = add i64 %{{.*}}, 0 ; UNROLL: %[[IND1:[a-zA-Z0-9]+]] = add i64 %{{.*}}, 1 -; UNROLL: %[[v0:[a-zA-Z0-9]+]] = getelementptr inbounds i32* %f, i64 %[[IND]] -; UNROLL: %[[v1:[a-zA-Z0-9]+]] = getelementptr inbounds i32* %f, i64 %[[IND1]] -; UNROLL: %[[v2:[a-zA-Z0-9]+]] = load i32* %[[v0]], align 4 -; UNROLL: %[[v3:[a-zA-Z0-9]+]] = load i32* %[[v1]], align 4 +; UNROLL: %[[v0:[a-zA-Z0-9]+]] = getelementptr inbounds i32, i32* %f, i64 %[[IND]] +; UNROLL: %[[v1:[a-zA-Z0-9]+]] = getelementptr inbounds i32, i32* %f, i64 %[[IND1]] +; UNROLL: %[[v2:[a-zA-Z0-9]+]] = load i32, i32* %[[v0]], align 4 +; UNROLL: %[[v3:[a-zA-Z0-9]+]] = load i32, i32* %[[v1]], align 4 ; UNROLL: %[[v4:[a-zA-Z0-9]+]] = icmp sgt i32 %[[v2]], 100 ; UNROLL: %[[v5:[a-zA-Z0-9]+]] = icmp sgt i32 %[[v3]], 100 ; UNROLL: %[[v6:[a-zA-Z0-9]+]] = add nsw i32 %[[v2]], 20 @@ -66,8 +66,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.inc ] - %arrayidx = getelementptr inbounds i32* %f, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %f, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp1 = icmp sgt i32 %0, 100 br i1 %cmp1, label %if.then, label %for.inc @@ -104,8 +104,8 @@ for.body9: for.body14: %indvars.iv3 = phi i64 [ %indvars.iv.next4, %for.inc23 ], [ undef, %for.body9 ] %iNewChunks.120 = phi i32 [ %iNewChunks.2, %for.inc23 ], [ undef, %for.body9 ] - %arrayidx16 = getelementptr inbounds [768 x i32]* undef, i64 0, i64 %indvars.iv3 - %tmp = load i32* %arrayidx16, align 4 + %arrayidx16 = getelementptr inbounds [768 x i32], [768 x i32]* undef, i64 0, i64 %indvars.iv3 + %tmp = load i32, i32* %arrayidx16, align 4 br i1 undef, label %if.then18, label %for.inc23 if.then18: diff --git a/test/Transforms/LoopVectorize/incorrect-dom-info.ll b/test/Transforms/LoopVectorize/incorrect-dom-info.ll index b8624fd..798793a 100644 --- a/test/Transforms/LoopVectorize/incorrect-dom-info.ll +++ b/test/Transforms/LoopVectorize/incorrect-dom-info.ll @@ -45,7 +45,7 @@ thread-pre-split.preheader: ; preds = %9 .thread-pre-split.loopexit_crit_edge: ; preds = %19 %scevgep.sum = xor i64 %umax, -1 - %scevgep45 = getelementptr i8* %d.020, i64 %scevgep.sum + %scevgep45 = getelementptr i8, i8* %d.020, i64 %scevgep.sum br label %thread-pre-split.loopexit thread-pre-split.loopexit: ; preds = %11, %.thread-pre-split.loopexit_crit_edge @@ -58,8 +58,8 @@ thread-pre-split.loopexit: ; preds = %11, %.thread-pre-sp br i1 undef, label %11, label %22 ; <label>:11 ; preds = %.lr.ph21 - %12 = getelementptr inbounds [0 x i8]* @PL_utf8skip, i64 0, i64 undef - %13 = load i8* %12, align 1 + %12 = getelementptr inbounds [0 x i8], [0 x i8]* @PL_utf8skip, i64 0, i64 undef + %13 = load i8, i8* %12, align 1 %14 = zext i8 %13 to i64 %15 = icmp ugt i64 %14, %10 %. = select i1 %15, i64 %10, i64 %14 @@ -91,7 +91,7 @@ thread-pre-split.loopexit: ; preds = %11, %.thread-pre-sp br label %26 ; <label>:26 ; preds = %25, %24, %23, %22 - %27 = load i64* %len, align 8 + %27 = load i64, i64* %len, align 8 %28 = add i64 %27, -1 br i1 undef, label %thread-pre-split._crit_edge, label %.lr.ph21 diff --git a/test/Transforms/LoopVectorize/increment.ll b/test/Transforms/LoopVectorize/increment.ll index 067a76b..d0b2509 100644 --- a/test/Transforms/LoopVectorize/increment.ll +++ b/test/Transforms/LoopVectorize/increment.ll @@ -20,8 +20,8 @@ define void @inc(i32 %n) nounwind uwtable noinline ssp { .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 %4 = trunc i64 %indvars.iv to i32 %5 = add nsw i32 %3, %4 store i32 %5, i32* %2, align 4 @@ -49,11 +49,11 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i32* %B, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %B, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %idxprom1 = sext i32 %0 to i64 - %arrayidx2 = getelementptr inbounds i32* %A, i64 %idxprom1 - %1 = load i32* %arrayidx2, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %idxprom1 + %1 = load i32, i32* %arrayidx2, align 4 %inc = add nsw i32 %1, 1 store i32 %inc, i32* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/induction.ll b/test/Transforms/LoopVectorize/induction.ll index 3f34918..2fbb2de 100644 --- a/test/Transforms/LoopVectorize/induction.ll +++ b/test/Transforms/LoopVectorize/induction.ll @@ -16,7 +16,7 @@ for.body.lr.ph: for.body: %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ] %count.09 = phi i32 [ 190, %for.body.lr.ph ], [ %inc, %for.body ] - %arrayidx2 = getelementptr inbounds i32* %A, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv store i32 %count.09, i32* %arrayidx2, align 4 %inc = add nsw i32 %count.09, 1 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -51,11 +51,11 @@ entry: for.body: %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ] %ind.sum = add i64 %iv, %offset - %arr.idx = getelementptr inbounds float* %a, i64 %ind.sum - %l1 = load float* %arr.idx, align 4 + %arr.idx = getelementptr inbounds float, float* %a, i64 %ind.sum + %l1 = load float, float* %arr.idx, align 4 %ind.sum2 = add i64 %iv, %offset2 - %arr.idx2 = getelementptr inbounds float* %a, i64 %ind.sum2 - %l2 = load float* %arr.idx2, align 4 + %arr.idx2 = getelementptr inbounds float, float* %a, i64 %ind.sum2 + %l2 = load float, float* %arr.idx2, align 4 %m = fmul fast float %b, %l2 %ad = fadd fast float %l1, %m store float %ad, float* %arr.idx, align 4 @@ -153,9 +153,9 @@ define i32 @max_i32_backedgetaken() nounwind readnone ssp uwtable { @c = common global i32 0, align 4 define i32 @testoverflowcheck() { entry: - %.pr.i = load i8* @e, align 1 - %0 = load i32* @d, align 4 - %c.promoted.i = load i32* @c, align 4 + %.pr.i = load i8, i8* @e, align 1 + %0 = load i32, i32* @d, align 4 + %c.promoted.i = load i32, i32* @c, align 4 br label %cond.end.i cond.end.i: diff --git a/test/Transforms/LoopVectorize/induction_plus.ll b/test/Transforms/LoopVectorize/induction_plus.ll index ce64c5b..7c4c8f2 100644 --- a/test/Transforms/LoopVectorize/induction_plus.ll +++ b/test/Transforms/LoopVectorize/induction_plus.ll @@ -16,7 +16,7 @@ define i32 @array_at_plus_one(i32 %n) nounwind uwtable ssp { .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] %2 = add nsw i64 %indvars.iv, 12 - %3 = getelementptr inbounds [1024 x i32]* @array, i64 0, i64 %2 + %3 = getelementptr inbounds [1024 x i32], [1024 x i32]* @array, i64 0, i64 %2 %4 = trunc i64 %indvars.iv to i32 store i32 %4, i32* %3, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/intrinsic.ll b/test/Transforms/LoopVectorize/intrinsic.ll index d48731a..fae6a8c 100644 --- a/test/Transforms/LoopVectorize/intrinsic.ll +++ b/test/Transforms/LoopVectorize/intrinsic.ll @@ -13,10 +13,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.sqrt.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -39,10 +39,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.sqrt.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -65,10 +65,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.sin.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -91,10 +91,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.sin.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -117,10 +117,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.cos.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -143,10 +143,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.cos.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -169,10 +169,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.exp.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -195,10 +195,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.exp.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -221,10 +221,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.exp2.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -247,10 +247,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.exp2.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -273,10 +273,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.log.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -299,10 +299,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.log.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -325,10 +325,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.log10.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -351,10 +351,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.log10.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -377,10 +377,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.log2.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -403,10 +403,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.log2.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -429,10 +429,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.fabs.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -452,10 +452,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.fabs(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -478,12 +478,12 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 - %arrayidx1 = getelementptr inbounds float* %z, i64 %indvars.iv - %1 = load float* %arrayidx1, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %arrayidx1 = getelementptr inbounds float, float* %z, i64 %indvars.iv + %1 = load float, float* %arrayidx1, align 4 %call = tail call float @llvm.copysign.f32(float %0, float %1) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -503,12 +503,12 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 - %arrayidx1 = getelementptr inbounds double* %z, i64 %indvars.iv - %1 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 + %arrayidx1 = getelementptr inbounds double, double* %z, i64 %indvars.iv + %1 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.copysign(double %0, double %1) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -531,10 +531,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.floor.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -557,10 +557,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.floor.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -583,10 +583,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.ceil.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -609,10 +609,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.ceil.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -635,10 +635,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.trunc.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -661,10 +661,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.trunc.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -687,10 +687,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.rint.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -713,10 +713,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.rint.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -739,10 +739,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.nearbyint.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -765,10 +765,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.nearbyint.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -791,10 +791,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @llvm.round.f32(float %0) nounwind readnone - %arrayidx2 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -817,10 +817,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.round.f64(double %0) nounwind readnone - %arrayidx2 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx2, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -843,14 +843,14 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds float* %w, i64 %indvars.iv - %1 = load float* %arrayidx2, align 4 - %arrayidx4 = getelementptr inbounds float* %z, i64 %indvars.iv - %2 = load float* %arrayidx4, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds float, float* %w, i64 %indvars.iv + %1 = load float, float* %arrayidx2, align 4 + %arrayidx4 = getelementptr inbounds float, float* %z, i64 %indvars.iv + %2 = load float, float* %arrayidx4, align 4 %3 = tail call float @llvm.fma.f32(float %0, float %2, float %1) - %arrayidx6 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx6 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %3, float* %arrayidx6, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -873,14 +873,14 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 - %arrayidx2 = getelementptr inbounds double* %w, i64 %indvars.iv - %1 = load double* %arrayidx2, align 8 - %arrayidx4 = getelementptr inbounds double* %z, i64 %indvars.iv - %2 = load double* %arrayidx4, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 + %arrayidx2 = getelementptr inbounds double, double* %w, i64 %indvars.iv + %1 = load double, double* %arrayidx2, align 8 + %arrayidx4 = getelementptr inbounds double, double* %z, i64 %indvars.iv + %2 = load double, double* %arrayidx4, align 8 %3 = tail call double @llvm.fma.f64(double %0, double %2, double %1) - %arrayidx6 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx6 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %3, double* %arrayidx6, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -903,14 +903,14 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds float* %w, i64 %indvars.iv - %1 = load float* %arrayidx2, align 4 - %arrayidx4 = getelementptr inbounds float* %z, i64 %indvars.iv - %2 = load float* %arrayidx4, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds float, float* %w, i64 %indvars.iv + %1 = load float, float* %arrayidx2, align 4 + %arrayidx4 = getelementptr inbounds float, float* %z, i64 %indvars.iv + %2 = load float, float* %arrayidx4, align 4 %3 = tail call float @llvm.fmuladd.f32(float %0, float %2, float %1) - %arrayidx6 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx6 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %3, float* %arrayidx6, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -933,14 +933,14 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 - %arrayidx2 = getelementptr inbounds double* %w, i64 %indvars.iv - %1 = load double* %arrayidx2, align 8 - %arrayidx4 = getelementptr inbounds double* %z, i64 %indvars.iv - %2 = load double* %arrayidx4, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 + %arrayidx2 = getelementptr inbounds double, double* %w, i64 %indvars.iv + %1 = load double, double* %arrayidx2, align 8 + %arrayidx4 = getelementptr inbounds double, double* %z, i64 %indvars.iv + %2 = load double, double* %arrayidx4, align 8 %3 = tail call double @llvm.fmuladd.f64(double %0, double %2, double %1) - %arrayidx6 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx6 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %3, double* %arrayidx6, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -963,12 +963,12 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds float* %z, i64 %indvars.iv - %1 = load float* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds float, float* %z, i64 %indvars.iv + %1 = load float, float* %arrayidx2, align 4 %call = tail call float @llvm.pow.f32(float %0, float %1) nounwind readnone - %arrayidx4 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx4, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -991,12 +991,12 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 - %arrayidx2 = getelementptr inbounds double* %z, i64 %indvars.iv - %1 = load double* %arrayidx2, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 + %arrayidx2 = getelementptr inbounds double, double* %z, i64 %indvars.iv + %1 = load double, double* %arrayidx2, align 8 %call = tail call double @llvm.pow.f64(double %0, double %1) nounwind readnone - %arrayidx4 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx4, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -1016,8 +1016,8 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds float* %x, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %x, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @fabsf(float %0) nounwind readnone store float %call, float* %arrayidx, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -1050,8 +1050,8 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds float* %x, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %x, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %call = tail call float @roundf(float %0) nounwind readnone store float %call, float* %arrayidx, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -1077,8 +1077,8 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds double* %x, i64 %indvars.iv - %0 = load double* %arrayidx, align 4 + %arrayidx = getelementptr inbounds double, double* %x, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 4 store double %0, double* %arrayidx, align 4 tail call void @round(double %0) nounwind readnone %indvars.iv.next = add i64 %indvars.iv, 1 @@ -1102,10 +1102,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %call = tail call double @llvm.powi.f64(double %0, i32 %P) nounwind readnone - %arrayidx4 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx4, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -1126,11 +1126,11 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds double* %y, i64 %indvars.iv - %0 = load double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 8 %1 = trunc i64 %indvars.iv to i32 %call = tail call double @llvm.powi.f64(double %0, i32 %1) nounwind readnone - %arrayidx4 = getelementptr inbounds double* %x, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds double, double* %x, i64 %indvars.iv store double %call, double* %arrayidx4, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -1153,10 +1153,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i64* %y, i64 %indvars.iv - %0 = load i64* %arrayidx, align 8 + %arrayidx = getelementptr inbounds i64, i64* %y, i64 %indvars.iv + %0 = load i64, i64* %arrayidx, align 8 %call = tail call i64 @llvm.cttz.i64(i64 %0, i1 true) nounwind readnone - %arrayidx4 = getelementptr inbounds i64* %x, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds i64, i64* %x, i64 %indvars.iv store i64 %call, i64* %arrayidx4, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -1179,10 +1179,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i64* %y, i64 %indvars.iv - %0 = load i64* %arrayidx, align 8 + %arrayidx = getelementptr inbounds i64, i64* %y, i64 %indvars.iv + %0 = load i64, i64* %arrayidx, align 8 %call = tail call i64 @llvm.ctlz.i64(i64 %0, i1 true) nounwind readnone - %arrayidx4 = getelementptr inbounds i64* %x, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds i64, i64* %x, i64 %indvars.iv store i64 %call, i64* %arrayidx4, align 8 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -1205,12 +1205,12 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds float* %z, i64 %indvars.iv - %1 = load float* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds float, float* %z, i64 %indvars.iv + %1 = load float, float* %arrayidx2, align 4 %call = tail call float @llvm.minnum.f32(float %0, float %1) nounwind readnone - %arrayidx4 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx4, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -1233,12 +1233,12 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %y, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds float* %z, i64 %indvars.iv - %1 = load float* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds float, float* %z, i64 %indvars.iv + %1 = load float, float* %arrayidx2, align 4 %call = tail call float @llvm.maxnum.f32(float %0, float %1) nounwind readnone - %arrayidx4 = getelementptr inbounds float* %x, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds float, float* %x, i64 %indvars.iv store float %call, float* %arrayidx4, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/lifetime.ll b/test/Transforms/LoopVectorize/lifetime.ll index ba36cc4..6e525ca 100644 --- a/test/Transforms/LoopVectorize/lifetime.ll +++ b/test/Transforms/LoopVectorize/lifetime.ll @@ -19,8 +19,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] call void @llvm.lifetime.end(i64 4096, i8* %0) #1 - %arrayidx = getelementptr inbounds i32* %d, i64 %indvars.iv - %1 = load i32* %arrayidx, align 8 + %arrayidx = getelementptr inbounds i32, i32* %d, i64 %indvars.iv + %1 = load i32, i32* %arrayidx, align 8 store i32 100, i32* %arrayidx, align 8 call void @llvm.lifetime.start(i64 4096, i8* %0) #1 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -49,8 +49,8 @@ for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %1 = bitcast [1024 x i32]* %arr to i8* call void @llvm.lifetime.end(i64 4096, i8* %1) #1 - %arrayidx = getelementptr inbounds i32* %d, i64 %indvars.iv - %2 = load i32* %arrayidx, align 8 + %arrayidx = getelementptr inbounds i32, i32* %d, i64 %indvars.iv + %2 = load i32, i32* %arrayidx, align 8 store i32 100, i32* %arrayidx, align 8 call void @llvm.lifetime.start(i64 4096, i8* %1) #1 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -75,11 +75,11 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %0 = getelementptr [1024 x i32]* %arr, i32 0, i64 %indvars.iv + %0 = getelementptr [1024 x i32], [1024 x i32]* %arr, i32 0, i64 %indvars.iv %1 = bitcast [1024 x i32]* %arr to i8* call void @llvm.lifetime.end(i64 4096, i8* %1) #1 - %arrayidx = getelementptr inbounds i32* %d, i64 %indvars.iv - %2 = load i32* %arrayidx, align 8 + %arrayidx = getelementptr inbounds i32, i32* %d, i64 %indvars.iv + %2 = load i32, i32* %arrayidx, align 8 store i32 100, i32* %arrayidx, align 8 call void @llvm.lifetime.start(i64 4096, i8* %1) #1 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/loop-form.ll b/test/Transforms/LoopVectorize/loop-form.ll index 138df1d..3bbe810 100644 --- a/test/Transforms/LoopVectorize/loop-form.ll +++ b/test/Transforms/LoopVectorize/loop-form.ll @@ -21,7 +21,7 @@ for.cond: for.body: %iprom = sext i32 %i to i64 - %b = getelementptr inbounds %struct.X* undef, i64 %iprom, i32 1 + %b = getelementptr inbounds %struct.X, %struct.X* undef, i64 %iprom, i32 1 store i16 0, i16* %b, align 4 %inc = add nsw i32 %i, 1 br label %for.cond diff --git a/test/Transforms/LoopVectorize/loop-vect-memdep.ll b/test/Transforms/LoopVectorize/loop-vect-memdep.ll index e2c7524..d9efaa5 100644 --- a/test/Transforms/LoopVectorize/loop-vect-memdep.ll +++ b/test/Transforms/LoopVectorize/loop-vect-memdep.ll @@ -6,16 +6,16 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" define void @test_loop_novect(double** %arr, i64 %n) { for.body.lr.ph: - %t = load double** %arr, align 8 + %t = load double*, double** %arr, align 8 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph %i = phi i64 [ 0, %for.body.lr.ph ], [ %i.next, %for.body ] - %a = getelementptr inbounds double* %t, i64 %i + %a = getelementptr inbounds double, double* %t, i64 %i %i.next = add nuw nsw i64 %i, 1 - %a.next = getelementptr inbounds double* %t, i64 %i.next - %t1 = load double* %a, align 8 - %t2 = load double* %a.next, align 8 + %a.next = getelementptr inbounds double, double* %t, i64 %i.next + %t1 = load double, double* %a, align 8 + %t2 = load double, double* %a.next, align 8 store double %t1, double* %a.next, align 8 store double %t2, double* %a, align 8 %c = icmp eq i64 %i, %n diff --git a/test/Transforms/LoopVectorize/memdep.ll b/test/Transforms/LoopVectorize/memdep.ll index f857e80..fb60883 100644 --- a/test/Transforms/LoopVectorize/memdep.ll +++ b/test/Transforms/LoopVectorize/memdep.ll @@ -19,10 +19,10 @@ entry: for.body: %indvars.iv = phi i32 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %indvars.iv.next = add i32 %indvars.iv, 1 - %arrayidx = getelementptr inbounds i32* %A, i32 %indvars.iv.next - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i32 %indvars.iv.next + %0 = load i32, i32* %arrayidx, align 4 %add1 = add nsw i32 %0, 1 - %arrayidx3 = getelementptr inbounds i32* %A, i32 %indvars.iv + %arrayidx3 = getelementptr inbounds i32, i32* %A, i32 %indvars.iv store i32 %add1, i32* %arrayidx3, align 4 %exitcond = icmp ne i32 %indvars.iv.next, 1024 br i1 %exitcond, label %for.body, label %for.end @@ -44,11 +44,11 @@ entry: for.body: %indvars.iv = phi i32 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds i32* %A, i32 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i32 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %add = add nsw i32 %0, 1 %indvars.iv.next = add i32 %indvars.iv, 1 - %arrayidx3 = getelementptr inbounds i32* %A, i32 %indvars.iv.next + %arrayidx3 = getelementptr inbounds i32, i32* %A, i32 %indvars.iv.next store i32 %add, i32* %arrayidx3, align 4 %exitcond = icmp ne i32 %indvars.iv.next, 1024 br i1 %exitcond, label %for.body, label %for.end @@ -74,12 +74,12 @@ entry: for.body: %i.01 = phi i32 [ 0, %entry ], [ %inc, %for.body ] %idxprom = sext i32 %i.01 to i64 - %arrayidx = getelementptr inbounds i32* %A, i64 %idxprom - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %idxprom + %0 = load i32, i32* %arrayidx, align 4 %add = add nsw i32 %0, 1 %add1 = add nsw i32 %i.01, 2 %idxprom2 = sext i32 %add1 to i64 - %arrayidx3 = getelementptr inbounds i32* %A, i64 %idxprom2 + %arrayidx3 = getelementptr inbounds i32, i32* %A, i64 %idxprom2 store i32 %add, i32* %arrayidx3, align 4 %inc = add nsw i32 %i.01, 1 %cmp = icmp slt i32 %inc, 1024 @@ -105,13 +105,13 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds i32* %B, i64 %indvars.iv + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %B, i64 %indvars.iv store i32 %0, i32* %arrayidx2, align 4 %indvars.iv.next = add nsw i64 %indvars.iv, 1 - %arrayidx4 = getelementptr inbounds i32* %B, i64 %indvars.iv.next - %1 = load i32* %arrayidx4, align 4 + %arrayidx4 = getelementptr inbounds i32, i32* %B, i64 %indvars.iv.next + %1 = load i32, i32* %arrayidx4, align 4 store i32 %1, i32* %arrayidx, align 4 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond = icmp ne i32 %lftr.wideiv, 1024 @@ -138,10 +138,10 @@ for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %tmp.addr.08 = phi i32 [ %tmp, %entry ], [ %0, %for.body ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 - %arrayidx = getelementptr inbounds i32* %a, i64 %indvars.iv.next + %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next store i32 %tmp.addr.08, i32* %arrayidx, align 4 - %arrayidx3 = getelementptr inbounds i32* %a, i64 %indvars.iv - %0 = load i32* %arrayidx3, align 4 + %arrayidx3 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv + %0 = load i32, i32* %arrayidx3, align 4 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond = icmp ne i32 %lftr.wideiv, 1024 br i1 %exitcond, label %for.body, label %for.end @@ -169,13 +169,13 @@ entry: for.body: %indvars.iv = phi i64 [ 16, %entry ], [ %indvars.iv.next, %for.body ] %0 = add nsw i64 %indvars.iv, -3 - %arrayidx = getelementptr inbounds i32* %A, i64 %0 - %1 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %0 + %1 = load i32, i32* %arrayidx, align 4 %2 = add nsw i64 %indvars.iv, 4 - %arrayidx2 = getelementptr inbounds i32* %A, i64 %2 - %3 = load i32* %arrayidx2, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %2 + %3 = load i32, i32* %arrayidx2, align 4 %add3 = add nsw i32 %3, %1 - %arrayidx5 = getelementptr inbounds i32* %A, i64 %indvars.iv + %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv store i32 %add3, i32* %arrayidx5, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -203,14 +203,14 @@ entry: for.body: %indvars.iv = phi i64 [ 16, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds i32* %B, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds i32* %A, i64 %indvars.iv + %arrayidx = getelementptr inbounds i32, i32* %B, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv store i32 %0, i32* %arrayidx2, align 4 %1 = add nsw i64 %indvars.iv, -3 - %arrayidx4 = getelementptr inbounds i32* %A, i64 %1 - %2 = load i32* %arrayidx4, align 4 - %arrayidx6 = getelementptr inbounds i32* %C, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 %1 + %2 = load i32, i32* %arrayidx4, align 4 + %arrayidx6 = getelementptr inbounds i32, i32* %C, i64 %indvars.iv store i32 %2, i32* %arrayidx6, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/metadata-unroll.ll b/test/Transforms/LoopVectorize/metadata-unroll.ll index 36a2314..3c80ae0 100644 --- a/test/Transforms/LoopVectorize/metadata-unroll.ll +++ b/test/Transforms/LoopVectorize/metadata-unroll.ll @@ -23,8 +23,8 @@ define void @inc(i32 %n) nounwind uwtable noinline ssp { .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 %4 = trunc i64 %indvars.iv to i32 %5 = add nsw i32 %3, %4 store i32 %5, i32* %2, align 4 diff --git a/test/Transforms/LoopVectorize/metadata-width.ll b/test/Transforms/LoopVectorize/metadata-width.ll index dee4fee..69d902f 100644 --- a/test/Transforms/LoopVectorize/metadata-width.ll +++ b/test/Transforms/LoopVectorize/metadata-width.ll @@ -13,7 +13,7 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i32* %a, i64 %indvars.iv + %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv %0 = trunc i64 %indvars.iv to i32 store i32 %0, i32* %arrayidx, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/metadata.ll b/test/Transforms/LoopVectorize/metadata.ll index a258f7c..9a791ae 100644 --- a/test/Transforms/LoopVectorize/metadata.ll +++ b/test/Transforms/LoopVectorize/metadata.ll @@ -9,10 +9,10 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds float* %b, i64 %indvars.iv - %0 = load float* %arrayidx, align 4, !tbaa !0 + %arrayidx = getelementptr inbounds float, float* %b, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4, !tbaa !0 %conv = fptosi float %0 to i32 - %arrayidx2 = getelementptr inbounds i32* %a, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv store i32 %conv, i32* %arrayidx2, align 4, !tbaa !4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 1600 @@ -23,7 +23,7 @@ for.end: ; preds = %for.body } ; CHECK-LABEL: @test1 -; CHECK: load <4 x float>* %{{.*}}, align 4, !tbaa ![[TFLT:[0-9]+]] +; CHECK: load <4 x float>, <4 x float>* %{{.*}}, align 4, !tbaa ![[TFLT:[0-9]+]] ; CHECK: store <4 x i32> %{{.*}}, <4 x i32>* %{{.*}}, align 4, !tbaa ![[TINT:[0-9]+]] ; CHECK: ret i32 0 diff --git a/test/Transforms/LoopVectorize/minmax_reduction.ll b/test/Transforms/LoopVectorize/minmax_reduction.ll index 1984cdd..5a0356f 100644 --- a/test/Transforms/LoopVectorize/minmax_reduction.ll +++ b/test/Transforms/LoopVectorize/minmax_reduction.ll @@ -26,8 +26,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp3 = icmp sgt i32 %0, %max.red.08 %max.red.0 = select i1 %cmp3, i32 %0, i32 %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -55,8 +55,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp3 = icmp slt i32 %max.red.08, %0 %max.red.0 = select i1 %cmp3, i32 %0, i32 %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -83,8 +83,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp3 = icmp slt i32 %0, %max.red.08 %max.red.0 = select i1 %cmp3, i32 %0, i32 %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -112,8 +112,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp3 = icmp sgt i32 %max.red.08, %0 %max.red.0 = select i1 %cmp3, i32 %0, i32 %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -142,8 +142,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp3 = icmp ugt i32 %0, %max.red.08 %max.red.0 = select i1 %cmp3, i32 %0, i32 %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -171,8 +171,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp3 = icmp ult i32 %max.red.08, %0 %max.red.0 = select i1 %cmp3, i32 %0, i32 %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -199,8 +199,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp3 = icmp ult i32 %0, %max.red.08 %max.red.0 = select i1 %cmp3, i32 %0, i32 %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -228,8 +228,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp3 = icmp ugt i32 %max.red.08, %0 %max.red.0 = select i1 %cmp3, i32 %0, i32 %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -257,8 +257,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp3 = icmp sge i32 %0, %max.red.08 %max.red.0 = select i1 %cmp3, i32 %max.red.08, i32 %0 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -286,8 +286,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp3 = icmp sle i32 %0, %max.red.08 %max.red.0 = select i1 %cmp3, i32 %max.red.08, i32 %0 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -315,8 +315,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp3 = icmp uge i32 %0, %max.red.08 %max.red.0 = select i1 %cmp3, i32 %max.red.08, i32 %0 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -344,8 +344,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %cmp3 = icmp ule i32 %0, %max.red.08 %max.red.0 = select i1 %cmp3, i32 %max.red.08, i32 %0 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -367,10 +367,10 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %arrayidx1 = getelementptr inbounds [1024 x i32]* @A, i64 1, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %1 = load i32* %arrayidx1, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %arrayidx1 = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 1, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %1 = load i32, i32* %arrayidx1, align 4 %cmp3 = icmp sgt i32 %0, %1 %max.red.0 = select i1 %cmp3, i32 %0, i32 %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -391,10 +391,10 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x i32]* @A, i64 0, i64 %indvars.iv - %arrayidx1 = getelementptr inbounds [1024 x i32]* @A, i64 1, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %1 = load i32* %arrayidx1, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv + %arrayidx1 = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 1, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %1 = load i32, i32* %arrayidx1, align 4 %cmp3 = icmp sgt i32 %0, %max.red.08 %max.red.0 = select i1 %cmp3, i32 %0, i32 %1 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -425,8 +425,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi float [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp ogt float %0, %max.red.08 %max.red.0 = select i1 %cmp3, float %0, float %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -451,8 +451,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi float [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp oge float %0, %max.red.08 %max.red.0 = select i1 %cmp3, float %0, float %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -477,8 +477,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi float [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp olt float %0, %max.red.08 %max.red.0 = select i1 %cmp3, float %max.red.08, float %0 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -503,8 +503,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi float [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp ole float %0, %max.red.08 %max.red.0 = select i1 %cmp3, float %max.red.08, float %0 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -529,8 +529,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi float [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp ugt float %0, %max.red.08 %max.red.0 = select i1 %cmp3, float %0, float %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -555,8 +555,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi float [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp uge float %0, %max.red.08 %max.red.0 = select i1 %cmp3, float %0, float %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -581,8 +581,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi float [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp ult float %0, %max.red.08 %max.red.0 = select i1 %cmp3, float %max.red.08, float %0 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -607,8 +607,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi float [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp ule float %0, %max.red.08 %max.red.0 = select i1 %cmp3, float %max.red.08, float %0 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -636,8 +636,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %min.red.08 = phi float [ %min, %entry ], [ %min.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp olt float %0, %min.red.08 %min.red.0 = select i1 %cmp3, float %0, float %min.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -662,8 +662,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %min.red.08 = phi float [ %min, %entry ], [ %min.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp ole float %0, %min.red.08 %min.red.0 = select i1 %cmp3, float %0, float %min.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -688,8 +688,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %min.red.08 = phi float [ %min, %entry ], [ %min.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp ogt float %0, %min.red.08 %min.red.0 = select i1 %cmp3, float %min.red.08, float %0 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -714,8 +714,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %min.red.08 = phi float [ %min, %entry ], [ %min.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp oge float %0, %min.red.08 %min.red.0 = select i1 %cmp3, float %min.red.08, float %0 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -740,8 +740,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %min.red.08 = phi float [ %min, %entry ], [ %min.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp ult float %0, %min.red.08 %min.red.0 = select i1 %cmp3, float %0, float %min.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -766,8 +766,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %min.red.08 = phi float [ %min, %entry ], [ %min.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp ule float %0, %min.red.08 %min.red.0 = select i1 %cmp3, float %0, float %min.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -792,8 +792,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %min.red.08 = phi float [ %min, %entry ], [ %min.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp ugt float %0, %min.red.08 %min.red.0 = select i1 %cmp3, float %min.red.08, float %0 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -818,8 +818,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %min.red.08 = phi float [ %min, %entry ], [ %min.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp uge float %0, %min.red.08 %min.red.0 = select i1 %cmp3, float %min.red.08, float %0 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -845,8 +845,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %min.red.08 = phi double [ %min, %entry ], [ %min.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x double]* @dA, i64 0, i64 %indvars.iv - %0 = load double* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x double], [1024 x double]* @dA, i64 0, i64 %indvars.iv + %0 = load double, double* %arrayidx, align 4 %cmp3 = fcmp olt double %0, %min.red.08 %min.red.0 = select i1 %cmp3, double %0, double %min.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -869,8 +869,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %max.red.08 = phi float [ %max, %entry ], [ %max.red.0, %for.body ] - %arrayidx = getelementptr inbounds [1024 x float]* @fA, i64 0, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x float], [1024 x float]* @fA, i64 0, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %cmp3 = fcmp ogt float %0, %max.red.08 %max.red.0 = select i1 %cmp3, float %0, float %max.red.08 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/multi-use-reduction-bug.ll b/test/Transforms/LoopVectorize/multi-use-reduction-bug.ll index cd022ad..9f7fb39 100644 --- a/test/Transforms/LoopVectorize/multi-use-reduction-bug.ll +++ b/test/Transforms/LoopVectorize/multi-use-reduction-bug.ll @@ -16,10 +16,10 @@ entry: %n = alloca i32, align 4 %k7 = alloca i32, align 4 %nf = alloca i32, align 4 - %0 = load i32* %k7, align 4 + %0 = load i32, i32* %k7, align 4 %.neg1 = sub i32 0, %0 - %n.promoted = load i32* %n, align 4 - %nf.promoted = load i32* %nf, align 4 + %n.promoted = load i32, i32* %n, align 4 + %nf.promoted = load i32, i32* %nf, align 4 br label %for.body for.body: diff --git a/test/Transforms/LoopVectorize/multiple-address-spaces.ll b/test/Transforms/LoopVectorize/multiple-address-spaces.ll index bb2af1e..e79c931 100644 --- a/test/Transforms/LoopVectorize/multiple-address-spaces.ll +++ b/test/Transforms/LoopVectorize/multiple-address-spaces.ll @@ -27,10 +27,10 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds [40000 x i8] addrspace(1)* @Y, i64 0, i64 %indvars.iv - %0 = load i8 addrspace(1)* %arrayidx, align 1 + %arrayidx = getelementptr inbounds [40000 x i8], [40000 x i8] addrspace(1)* @Y, i64 0, i64 %indvars.iv + %0 = load i8, i8 addrspace(1)* %arrayidx, align 1 %add = add i8 %0, 1 - %arrayidx3 = getelementptr inbounds [40000 x i8]* @X, i64 0, i64 %indvars.iv + %arrayidx3 = getelementptr inbounds [40000 x i8], [40000 x i8]* @X, i64 0, i64 %indvars.iv store i8 %add, i8* %arrayidx3, align 1 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/no_array_bounds.ll b/test/Transforms/LoopVectorize/no_array_bounds.ll index d3bd755..1a2fda1 100644 --- a/test/Transforms/LoopVectorize/no_array_bounds.ll +++ b/test/Transforms/LoopVectorize/no_array_bounds.ll @@ -33,11 +33,11 @@ for.body7.preheader: ; preds = %for.cond5.preheader for.body: ; preds = %for.body.preheader, %for.body %indvars.iv27 = phi i64 [ %indvars.iv.next28, %for.body ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds i32* %B, i64 %indvars.iv27, !dbg !14 - %0 = load i32* %arrayidx, align 4, !dbg !14, !tbaa !22 + %arrayidx = getelementptr inbounds i32, i32* %B, i64 %indvars.iv27, !dbg !14 + %0 = load i32, i32* %arrayidx, align 4, !dbg !14, !tbaa !22 %idxprom1 = sext i32 %0 to i64, !dbg !14 - %arrayidx2 = getelementptr inbounds i32* %A, i64 %idxprom1, !dbg !14 - %1 = load i32* %arrayidx2, align 4, !dbg !14, !tbaa !22 + %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %idxprom1, !dbg !14 + %1 = load i32, i32* %arrayidx2, align 4, !dbg !14, !tbaa !22 %inc = add nsw i32 %1, 1, !dbg !14 store i32 %inc, i32* %arrayidx2, align 4, !dbg !14, !tbaa !22 %indvars.iv.next28 = add nuw nsw i64 %indvars.iv27, 1, !dbg !10 @@ -47,11 +47,11 @@ for.body: ; preds = %for.body.preheader, for.body7: ; preds = %for.body7.preheader, %for.body7 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body7 ], [ 0, %for.body7.preheader ] - %arrayidx9 = getelementptr inbounds i32* %A, i64 %indvars.iv, !dbg !20 - %2 = load i32* %arrayidx9, align 4, !dbg !20, !tbaa !22 + %arrayidx9 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv, !dbg !20 + %2 = load i32, i32* %arrayidx9, align 4, !dbg !20, !tbaa !22 %idxprom10 = sext i32 %2 to i64, !dbg !20 - %arrayidx11 = getelementptr inbounds i32* %B, i64 %idxprom10, !dbg !20 - %3 = load i32* %arrayidx11, align 4, !dbg !20, !tbaa !22 + %arrayidx11 = getelementptr inbounds i32, i32* %B, i64 %idxprom10, !dbg !20 + %3 = load i32, i32* %arrayidx11, align 4, !dbg !20, !tbaa !22 %inc12 = add nsw i32 %3, 1, !dbg !20 store i32 %inc12, i32* %arrayidx11, align 4, !dbg !20, !tbaa !22 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1, !dbg !16 @@ -72,28 +72,28 @@ attributes #0 = { nounwind } !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = !{!"0x11\004\00clang version 3.5.0\001\00\000\00\002", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] -!1 = !{!"no_array_bounds.cpp", !"."} +!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, emissionKind: 2, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!1 = !MDFile(filename: "no_array_bounds.cpp", directory: ".") !2 = !{} !3 = !{!4} -!4 = !{!"0x2e\00test\00test\00\001\000\001\000\006\00256\001\002", !1, !5, !6, null, void (i32*, i32*, i32)* @_Z4testPiS_i, null, null, !2} ; [ DW_TAG_subprogram ] -!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] -!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] +!4 = !MDSubprogram(name: "test", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !5, type: !6, function: void (i32*, i32*, i32)* @_Z4testPiS_i, variables: !2) +!5 = !MDFile(filename: "no_array_bounds.cpp", directory: ".") +!6 = !MDSubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 2} -!8 = !{i32 2, !"Debug Info Version", i32 2} +!8 = !{i32 2, !"Debug Info Version", i32 3} !9 = !{!"clang version 3.5.0"} !10 = !MDLocation(line: 4, column: 8, scope: !11) -!11 = !{!"0xb\004\003\000", !1, !4} ; [ DW_TAG_lexical_block ] +!11 = distinct !MDLexicalBlock(line: 4, column: 3, file: !1, scope: !4) !12 = !{!12, !13} !13 = !{!"llvm.loop.vectorize.enable", i1 true} !14 = !MDLocation(line: 5, column: 5, scope: !15) -!15 = !{!"0xb\004\0036\000", !1, !11} ; [ DW_TAG_lexical_block ] +!15 = distinct !MDLexicalBlock(line: 4, column: 36, file: !1, scope: !11) !16 = !MDLocation(line: 9, column: 8, scope: !17) -!17 = !{!"0xb\009\003\000", !1, !4} ; [ DW_TAG_lexical_block ] +!17 = distinct !MDLexicalBlock(line: 9, column: 3, file: !1, scope: !4) !18 = !{!18, !13, !19} !19 = !{!"llvm.loop.vectorize.width", i32 1} !20 = !MDLocation(line: 10, column: 5, scope: !21) -!21 = !{!"0xb\009\0036\000", !1, !17} ; [ DW_TAG_lexical_block ] +!21 = distinct !MDLexicalBlock(line: 9, column: 36, file: !1, scope: !17) !22 = !{!23, !23, i64 0} !23 = !{!"int", !24, i64 0} !24 = !{!"omnipotent char", !25, i64 0} diff --git a/test/Transforms/LoopVectorize/no_idiv_reduction.ll b/test/Transforms/LoopVectorize/no_idiv_reduction.ll index 5c721a680..bfa48a2 100644 --- a/test/Transforms/LoopVectorize/no_idiv_reduction.ll +++ b/test/Transforms/LoopVectorize/no_idiv_reduction.ll @@ -11,8 +11,8 @@ for.body: ; CHECK-NOT: sdiv <2 x i32> %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %r.05 = phi i32 [ 80, %entry ], [ %div, %for.body ] - %arrayidx = getelementptr inbounds [128 x i32]* @a, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [128 x i32], [128 x i32]* @a, i64 0, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %div = sdiv i32 %r.05, %0 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/no_int_induction.ll b/test/Transforms/LoopVectorize/no_int_induction.ll index 1275915..7e6b26c 100644 --- a/test/Transforms/LoopVectorize/no_int_induction.ll +++ b/test/Transforms/LoopVectorize/no_int_induction.ll @@ -14,16 +14,16 @@ target datalayout = "e-p:64:64:64-p1:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:32:32- ;CHECK: ret i32 define i32 @sum_array(i32* %A, i32 %n) nounwind uwtable readonly noinline ssp { %1 = sext i32 %n to i64 - %2 = getelementptr inbounds i32* %A, i64 %1 + %2 = getelementptr inbounds i32, i32* %A, i64 %1 %3 = icmp eq i32 %n, 0 br i1 %3, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %.lr.ph.i .lr.ph.i: ; preds = %0, %.lr.ph.i %.03.i = phi i32* [ %6, %.lr.ph.i ], [ %A, %0 ] %.012.i = phi i32 [ %5, %.lr.ph.i ], [ 0, %0 ] - %4 = load i32* %.03.i, align 4 + %4 = load i32, i32* %.03.i, align 4 %5 = add nsw i32 %4, %.012.i - %6 = getelementptr inbounds i32* %.03.i, i64 1 + %6 = getelementptr inbounds i32, i32* %.03.i, i64 1 %7 = icmp eq i32* %6, %2 br i1 %7, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %.lr.ph.i @@ -41,16 +41,16 @@ _ZSt10accumulateIPiiET0_T_S2_S1_.exit: ; preds = %.lr.ph.i, %0 ;CHECK: ret i32 define i32 @sum_array_as1(i32 addrspace(1)* %A, i32 %n) nounwind uwtable readonly noinline ssp { %1 = sext i32 %n to i64 - %2 = getelementptr inbounds i32 addrspace(1)* %A, i64 %1 + %2 = getelementptr inbounds i32, i32 addrspace(1)* %A, i64 %1 %3 = icmp eq i32 %n, 0 br i1 %3, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %.lr.ph.i .lr.ph.i: ; preds = %0, %.lr.ph.i %.03.i = phi i32 addrspace(1)* [ %6, %.lr.ph.i ], [ %A, %0 ] %.012.i = phi i32 [ %5, %.lr.ph.i ], [ 0, %0 ] - %4 = load i32 addrspace(1)* %.03.i, align 4 + %4 = load i32, i32 addrspace(1)* %.03.i, align 4 %5 = add nsw i32 %4, %.012.i - %6 = getelementptr inbounds i32 addrspace(1)* %.03.i, i64 1 + %6 = getelementptr inbounds i32, i32 addrspace(1)* %.03.i, i64 1 %7 = icmp eq i32 addrspace(1)* %6, %2 br i1 %7, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %.lr.ph.i diff --git a/test/Transforms/LoopVectorize/no_outside_user.ll b/test/Transforms/LoopVectorize/no_outside_user.ll index bcd29c1..7030b6b 100644 --- a/test/Transforms/LoopVectorize/no_outside_user.ll +++ b/test/Transforms/LoopVectorize/no_outside_user.ll @@ -20,7 +20,7 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3 define i32 @main() { bb: - %b.promoted = load i32* @b, align 4 + %b.promoted = load i32, i32* @b, align 4 br label %.lr.ph.i .lr.ph.i: @@ -56,7 +56,7 @@ f1.exit.loopexit: define i32 @test2() { entry: store i32 0, i32* @x1, align 4 - %0 = load i32* @x0, align 4 + %0 = load i32, i32* @x0, align 4 br label %for.cond1.preheader for.cond1.preheader: diff --git a/test/Transforms/LoopVectorize/no_switch.ll b/test/Transforms/LoopVectorize/no_switch.ll index 64aab37..14d2fab 100644 --- a/test/Transforms/LoopVectorize/no_switch.ll +++ b/test/Transforms/LoopVectorize/no_switch.ll @@ -21,8 +21,8 @@ for.body.preheader: ; preds = %entry for.body: ; preds = %for.body.preheader, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv, !dbg !14 - %0 = load i32* %arrayidx, align 4, !dbg !14, !tbaa !16 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv, !dbg !14 + %0 = load i32, i32* %arrayidx, align 4, !dbg !14, !tbaa !16 switch i32 %0, label %for.inc [ i32 0, label %sw.bb i32 1, label %sw.bb3 @@ -59,28 +59,28 @@ attributes #0 = { nounwind } !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = !{!"0x11\004\00clang version 3.5.0\001\00\006\00\002", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [./source.cpp] [DW_LANG_C_plus_plus] -!1 = !{!"source.cpp", !"."} +!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, runtimeVersion: 6, emissionKind: 2, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!1 = !MDFile(filename: "source.cpp", directory: ".") !2 = !{} !3 = !{!4} -!4 = !{!"0x2e\00test_switch\00test_switch\00\001\000\001\000\006\00256\001\001", !1, !5, !6, null, void (i32*, i32)* @_Z11test_switchPii, null, null, !2} ; [ DW_TAG_subprogram ] [line 1] [def] [test_switch] -!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [./source.cpp] -!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!4 = !MDSubprogram(name: "test_switch", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, function: void (i32*, i32)* @_Z11test_switchPii, variables: !2) +!5 = !MDFile(filename: "source.cpp", directory: ".") +!6 = !MDSubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 2} -!8 = !{i32 2, !"Debug Info Version", i32 2} +!8 = !{i32 2, !"Debug Info Version", i32 3} !9 = !{!"clang version 3.5.0"} !10 = !MDLocation(line: 3, column: 8, scope: !11) -!11 = !{!"0xb\003\003\000", !1, !4} ; [ DW_TAG_lexical_block ] +!11 = distinct !MDLexicalBlock(line: 3, column: 3, file: !1, scope: !4) !12 = !{!12, !13, !13} !13 = !{!"llvm.loop.vectorize.enable", i1 true} !14 = !MDLocation(line: 4, column: 5, scope: !15) -!15 = !{!"0xb\003\0036\000", !1, !11} ; [ DW_TAG_lexical_block ] +!15 = distinct !MDLexicalBlock(line: 3, column: 36, file: !1, scope: !11) !16 = !{!17, !17, i64 0} !17 = !{!"int", !18, i64 0} !18 = !{!"omnipotent char", !19, i64 0} !19 = !{!"Simple C/C++ TBAA"} !20 = !MDLocation(line: 6, column: 7, scope: !21) -!21 = !{!"0xb\004\0018\000", !1, !15} ; [ DW_TAG_lexical_block ] +!21 = distinct !MDLexicalBlock(line: 4, column: 18, file: !1, scope: !15) !22 = !MDLocation(line: 7, column: 5, scope: !21) !23 = !MDLocation(line: 9, column: 7, scope: !21) !24 = !MDLocation(line: 14, column: 1, scope: !4) diff --git a/test/Transforms/LoopVectorize/nofloat.ll b/test/Transforms/LoopVectorize/nofloat.ll index e9f4c5f..6956bd9 100644 --- a/test/Transforms/LoopVectorize/nofloat.ll +++ b/test/Transforms/LoopVectorize/nofloat.ll @@ -15,7 +15,7 @@ define void @example12() noimplicitfloat { ; <--------- "noimplicitflo ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv %3 = trunc i64 %indvars.iv to i32 store i32 %3, i32* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/non-const-n.ll b/test/Transforms/LoopVectorize/non-const-n.ll index b03d4f0..9007b1b 100644 --- a/test/Transforms/LoopVectorize/non-const-n.ll +++ b/test/Transforms/LoopVectorize/non-const-n.ll @@ -20,12 +20,12 @@ define void @example1(i32 %n) nounwind uwtable ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = add nsw i32 %5, %3 - %7 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %7 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv store i32 %6, i32* %7, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/nsw-crash.ll b/test/Transforms/LoopVectorize/nsw-crash.ll index 68d9933..3631f0b 100644 --- a/test/Transforms/LoopVectorize/nsw-crash.ll +++ b/test/Transforms/LoopVectorize/nsw-crash.ll @@ -13,7 +13,7 @@ while.body.lr.ph: while.body: %it.sroa.0.091 = phi i32* [ undef, %while.body.lr.ph ], [ %incdec.ptr.i, %while.body ] - %incdec.ptr.i = getelementptr inbounds i32* %it.sroa.0.091, i64 1 + %incdec.ptr.i = getelementptr inbounds i32, i32* %it.sroa.0.091, i64 1 %inc32 = add i32 undef, 1 ; <------------- Make sure we don't set NSW flags to the undef. %cmp.i11 = icmp eq i32* %incdec.ptr.i, undef br i1 %cmp.i11, label %while.end, label %while.body diff --git a/test/Transforms/LoopVectorize/opt.ll b/test/Transforms/LoopVectorize/opt.ll index a9be80f..71b7e1f 100644 --- a/test/Transforms/LoopVectorize/opt.ll +++ b/test/Transforms/LoopVectorize/opt.ll @@ -16,8 +16,8 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %red.05 = phi i32 [ 0, %entry ], [ %add, %for.body ] - %arrayidx = getelementptr inbounds i32* %a, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %add = add nsw i32 %0, %red.05 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 255 diff --git a/test/Transforms/LoopVectorize/ptr_loops.ll b/test/Transforms/LoopVectorize/ptr_loops.ll index 3fb38fe..bc80413 100644 --- a/test/Transforms/LoopVectorize/ptr_loops.ll +++ b/test/Transforms/LoopVectorize/ptr_loops.ll @@ -15,14 +15,14 @@ define i32 @_Z5test1v() nounwind uwtable ssp { br label %1 ; <label>:1 ; preds = %0, %1 - %p.02 = phi i32* [ getelementptr inbounds ([36 x i32]* @A, i64 0, i64 18), %0 ], [ %4, %1 ] - %b.01 = phi i32* [ getelementptr inbounds ([36 x i32]* @B, i64 0, i64 0), %0 ], [ %5, %1 ] - %2 = load i32* %b.01, align 4 + %p.02 = phi i32* [ getelementptr inbounds ([36 x i32], [36 x i32]* @A, i64 0, i64 18), %0 ], [ %4, %1 ] + %b.01 = phi i32* [ getelementptr inbounds ([36 x i32], [36 x i32]* @B, i64 0, i64 0), %0 ], [ %5, %1 ] + %2 = load i32, i32* %b.01, align 4 %3 = shl nsw i32 %2, 1 store i32 %3, i32* %p.02, align 4 - %4 = getelementptr inbounds i32* %p.02, i64 -1 - %5 = getelementptr inbounds i32* %b.01, i64 1 - %6 = icmp eq i32* %4, getelementptr ([36 x i32]* @A, i64 128102389400760775, i64 3) + %4 = getelementptr inbounds i32, i32* %p.02, i64 -1 + %5 = getelementptr inbounds i32, i32* %b.01, i64 1 + %6 = icmp eq i32* %4, getelementptr ([36 x i32], [36 x i32]* @A, i64 128102389400760775, i64 3) br i1 %6, label %7, label %1 ; <label>:7 ; preds = %1 @@ -38,13 +38,13 @@ define i32 @_Z5test2v() nounwind uwtable ssp { br label %1 ; <label>:1 ; preds = %0, %1 - %p.02 = phi i32* [ getelementptr inbounds ([36 x i32]* @A, i64 0, i64 25), %0 ], [ %3, %1 ] - %b.01 = phi i32* [ getelementptr inbounds ([36 x i32]* @B, i64 0, i64 2), %0 ], [ %4, %1 ] - %2 = load i32* %b.01, align 4 + %p.02 = phi i32* [ getelementptr inbounds ([36 x i32], [36 x i32]* @A, i64 0, i64 25), %0 ], [ %3, %1 ] + %b.01 = phi i32* [ getelementptr inbounds ([36 x i32], [36 x i32]* @B, i64 0, i64 2), %0 ], [ %4, %1 ] + %2 = load i32, i32* %b.01, align 4 store i32 %2, i32* %p.02, align 4 - %3 = getelementptr inbounds i32* %p.02, i64 -1 - %4 = getelementptr inbounds i32* %b.01, i64 1 - %5 = icmp eq i32* %4, getelementptr inbounds ([36 x i32]* @A, i64 0, i64 18) + %3 = getelementptr inbounds i32, i32* %p.02, i64 -1 + %4 = getelementptr inbounds i32, i32* %b.01, i64 1 + %5 = icmp eq i32* %4, getelementptr inbounds ([36 x i32], [36 x i32]* @A, i64 0, i64 18) br i1 %5, label %6, label %1 ; <label>:6 ; preds = %1 @@ -60,13 +60,13 @@ define i32 @_Z5test3v() nounwind uwtable ssp { br label %1 ; <label>:1 ; preds = %0, %1 - %p.02 = phi i32* [ getelementptr inbounds ([36 x i32]* @A, i64 0, i64 29), %0 ], [ %3, %1 ] - %b.01 = phi i32* [ getelementptr inbounds ([36 x i32]* @B, i64 0, i64 5), %0 ], [ %4, %1 ] - %2 = load i32* %b.01, align 4 + %p.02 = phi i32* [ getelementptr inbounds ([36 x i32], [36 x i32]* @A, i64 0, i64 29), %0 ], [ %3, %1 ] + %b.01 = phi i32* [ getelementptr inbounds ([36 x i32], [36 x i32]* @B, i64 0, i64 5), %0 ], [ %4, %1 ] + %2 = load i32, i32* %b.01, align 4 store i32 %2, i32* %p.02, align 4 - %3 = getelementptr inbounds i32* %p.02, i64 -1 - %4 = getelementptr inbounds i32* %b.01, i64 1 - %5 = icmp eq i32* %3, getelementptr ([36 x i32]* @A, i64 128102389400760775, i64 3) + %3 = getelementptr inbounds i32, i32* %p.02, i64 -1 + %4 = getelementptr inbounds i32, i32* %b.01, i64 1 + %5 = icmp eq i32* %3, getelementptr ([36 x i32], [36 x i32]* @A, i64 128102389400760775, i64 3) br i1 %5, label %6, label %1 ; <label>:6 ; preds = %1 diff --git a/test/Transforms/LoopVectorize/read-only.ll b/test/Transforms/LoopVectorize/read-only.ll index 2f7a96a..f81afd6 100644 --- a/test/Transforms/LoopVectorize/read-only.ll +++ b/test/Transforms/LoopVectorize/read-only.ll @@ -13,11 +13,11 @@ define i32 @read_only_func(i32* nocapture %A, i32* nocapture %B, i32 %n) nounwin .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] %sum.02 = phi i32 [ %9, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds i32* %A, i64 %indvars.iv - %3 = load i32* %2, align 4 + %2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 %4 = add nsw i64 %indvars.iv, 13 - %5 = getelementptr inbounds i32* %B, i64 %4 - %6 = load i32* %5, align 4 + %5 = getelementptr inbounds i32, i32* %B, i64 %4 + %6 = load i32, i32* %5, align 4 %7 = shl i32 %6, 1 %8 = add i32 %3, %sum.02 %9 = add i32 %8, %7 diff --git a/test/Transforms/LoopVectorize/reduction.ll b/test/Transforms/LoopVectorize/reduction.ll index 5e6b7fa..647e58a 100644 --- a/test/Transforms/LoopVectorize/reduction.ll +++ b/test/Transforms/LoopVectorize/reduction.ll @@ -20,10 +20,10 @@ define i32 @reduction_sum(i32 %n, i32* noalias nocapture %A, i32* noalias nocapt .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] %sum.02 = phi i32 [ %9, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds i32* %A, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds i32* %B, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds i32, i32* %B, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = trunc i64 %indvars.iv to i32 %7 = add i32 %sum.02, %6 %8 = add i32 %7, %3 @@ -55,10 +55,10 @@ define i32 @reduction_prod(i32 %n, i32* noalias nocapture %A, i32* noalias nocap .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] %prod.02 = phi i32 [ %9, %.lr.ph ], [ 1, %0 ] - %2 = getelementptr inbounds i32* %A, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds i32* %B, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds i32, i32* %B, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = trunc i64 %indvars.iv to i32 %7 = mul i32 %prod.02, %6 %8 = mul i32 %7, %3 @@ -90,10 +90,10 @@ define i32 @reduction_mix(i32 %n, i32* noalias nocapture %A, i32* noalias nocapt .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] %sum.02 = phi i32 [ %9, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds i32* %A, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds i32* %B, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds i32, i32* %B, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = mul nsw i32 %5, %3 %7 = trunc i64 %indvars.iv to i32 %8 = add i32 %sum.02, %7 @@ -123,10 +123,10 @@ define i32 @reduction_mul(i32 %n, i32* noalias nocapture %A, i32* noalias nocapt .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] %sum.02 = phi i32 [ %9, %.lr.ph ], [ 19, %0 ] - %2 = getelementptr inbounds i32* %A, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds i32* %B, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds i32, i32* %B, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = trunc i64 %indvars.iv to i32 %7 = add i32 %3, %6 %8 = add i32 %7, %5 @@ -158,10 +158,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %sum.09 = phi i32 [ %add, %for.body ], [ 120, %entry ] - %arrayidx = getelementptr inbounds i32* %in, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds i32* %coeff, i64 %indvars.iv - %1 = load i32* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds i32, i32* %in, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %coeff, i64 %indvars.iv + %1 = load i32, i32* %arrayidx2, align 4 %mul = mul nsw i32 %1, %0 %add = add nsw i32 %mul, %sum.09 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -191,10 +191,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %result.08 = phi i32 [ %and, %for.body ], [ -1, %entry ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds i32* %B, i64 %indvars.iv - %1 = load i32* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %B, i64 %indvars.iv + %1 = load i32, i32* %arrayidx2, align 4 %add = add nsw i32 %1, %0 %and = and i32 %add, %result.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -223,10 +223,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %result.08 = phi i32 [ %or, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds i32* %B, i64 %indvars.iv - %1 = load i32* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %B, i64 %indvars.iv + %1 = load i32, i32* %arrayidx2, align 4 %add = add nsw i32 %1, %0 %or = or i32 %add, %result.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -255,10 +255,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %result.08 = phi i32 [ %xor, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds i32* %B, i64 %indvars.iv - %1 = load i32* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %B, i64 %indvars.iv + %1 = load i32, i32* %arrayidx2, align 4 %add = add nsw i32 %1, %0 %xor = xor i32 %add, %result.08 %indvars.iv.next = add i64 %indvars.iv, 1 @@ -284,8 +284,8 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %x.05 = phi i32 [ %sub, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %sub = sub nsw i32 %0, %x.05 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -311,8 +311,8 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %x.05 = phi i32 [ %sub, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i32* %A, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 %sub = sub nsw i32 %x.05, %0 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -335,10 +335,10 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.inc ] %sum.033 = phi float [ %S, %entry ], [ %sum.1, %for.inc ] - %arrayidx = getelementptr inbounds float* %A, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds float* %B, i64 %indvars.iv - %1 = load float* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds float, float* %A, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds float, float* %B, i64 %indvars.iv + %1 = load float, float* %arrayidx2, align 4 %cmp3 = fcmp ogt float %0, %1 br i1 %cmp3, label %if.then, label %for.inc @@ -380,10 +380,10 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.inc ] %sum.033 = phi float [ %S, %entry ], [ %sum.1, %for.inc ] - %arrayidx = getelementptr inbounds float* %A, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds float* %B, i64 %indvars.iv - %1 = load float* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds float, float* %A, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds float, float* %B, i64 %indvars.iv + %1 = load float, float* %arrayidx2, align 4 %cmp3 = fcmp ogt float %0, %1 br i1 %cmp3, label %if.then, label %for.inc @@ -427,8 +427,8 @@ for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %sum2.09 = phi float [ 0.000000e+00, %entry ], [ %add1, %for.body ] %sum.08 = phi float [ %S, %entry ], [ %add, %for.body ] - %arrayidx = getelementptr inbounds float* %B, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %B, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %add = fadd fast float %sum.08, %0 %add1 = fadd fast float %sum2.09, %add %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/reverse_induction.ll b/test/Transforms/LoopVectorize/reverse_induction.ll index d379606..6b63a0d 100644 --- a/test/Transforms/LoopVectorize/reverse_induction.ll +++ b/test/Transforms/LoopVectorize/reverse_induction.ll @@ -18,8 +18,8 @@ for.body: %i.06 = phi i32 [ 0, %entry ], [ %inc4, %for.body ] %redux5 = phi i32 [ 0, %entry ], [ %inc.redux, %for.body ] %add.i = add i64 %add.i7, -1 - %kind_.i = getelementptr inbounds i32* %ptr, i64 %add.i - %tmp.i1 = load i32* %kind_.i, align 4 + %kind_.i = getelementptr inbounds i32, i32* %ptr, i64 %add.i + %tmp.i1 = load i32, i32* %kind_.i, align 4 %inc.redux = add i32 %tmp.i1, %redux5 %inc4 = add i32 %i.06, 1 %exitcond = icmp ne i32 %inc4, 1024 @@ -41,8 +41,8 @@ for.body: %i.06 = phi i32 [ 0, %entry ], [ %inc4, %for.body ] %redux5 = phi i32 [ 0, %entry ], [ %inc.redux, %for.body ] %add.i = add i128 %add.i7, -1 - %kind_.i = getelementptr inbounds i32* %ptr, i128 %add.i - %tmp.i1 = load i32* %kind_.i, align 4 + %kind_.i = getelementptr inbounds i32, i32* %ptr, i128 %add.i + %tmp.i1 = load i32, i32* %kind_.i, align 4 %inc.redux = add i32 %tmp.i1, %redux5 %inc4 = add i32 %i.06, 1 %exitcond = icmp ne i32 %inc4, 1024 @@ -65,8 +65,8 @@ for.body: %i.06 = phi i32 [ 0, %entry ], [ %inc4, %for.body ] %redux5 = phi i32 [ 0, %entry ], [ %inc.redux, %for.body ] %add.i = add i16 %add.i7, -1 - %kind_.i = getelementptr inbounds i32* %ptr, i16 %add.i - %tmp.i1 = load i32* %kind_.i, align 4 + %kind_.i = getelementptr inbounds i32, i32* %ptr, i16 %add.i + %tmp.i1 = load i32, i32* %kind_.i, align 4 %inc.redux = add i32 %tmp.i1, %redux5 %inc4 = add i32 %i.06, 1 %exitcond = icmp ne i32 %inc4, 1024 @@ -109,7 +109,7 @@ while.body: %forward_induction.05 = phi i8 [ 0, %entry ], [ %inc, %while.body ] %inc = add i8 %forward_induction.05, 1 %conv = zext i8 %inc to i32 - %arrayidx = getelementptr inbounds [1024 x i32]* @a, i64 0, i64 %indvars.iv + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @a, i64 0, i64 %indvars.iv store i32 %conv, i32* %arrayidx, align 4 %indvars.iv.next = add i64 %indvars.iv, -1 %0 = trunc i64 %indvars.iv to i32 @@ -136,7 +136,7 @@ while.body: %forward_induction.05 = phi i8 [ -127, %entry ], [ %inc, %while.body ] %inc = add i8 %forward_induction.05, 1 %conv = sext i8 %inc to i32 - %arrayidx = getelementptr inbounds [1024 x i32]* @a, i64 0, i64 %indvars.iv + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @a, i64 0, i64 %indvars.iv store i32 %conv, i32* %arrayidx, align 4 %indvars.iv.next = add i64 %indvars.iv, -1 %0 = trunc i64 %indvars.iv to i32 diff --git a/test/Transforms/LoopVectorize/reverse_iter.ll b/test/Transforms/LoopVectorize/reverse_iter.ll index 13172bb..5bbc769 100644 --- a/test/Transforms/LoopVectorize/reverse_iter.ll +++ b/test/Transforms/LoopVectorize/reverse_iter.ll @@ -30,8 +30,8 @@ define i32 @foo(i32 %n, i32* nocapture %A) { %4 = trunc i64 %indvars.iv to i32 %5 = shl nsw i32 %4, 1 %6 = sext i32 %5 to i64 - %7 = getelementptr inbounds i32* %A, i64 %6 - %8 = load i32* %7, align 4 + %7 = getelementptr inbounds i32, i32* %A, i64 %6 + %8 = load i32, i32* %7, align 4 %9 = add nsw i32 %8, %sum.01 %indvars.iv.next = add i64 %indvars.iv, -1 %10 = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/runtime-check-address-space.ll b/test/Transforms/LoopVectorize/runtime-check-address-space.ll index ec56f80..8e7ac1f 100644 --- a/test/Transforms/LoopVectorize/runtime-check-address-space.ll +++ b/test/Transforms/LoopVectorize/runtime-check-address-space.ll @@ -37,11 +37,11 @@ entry: for.body: ; preds = %entry, %for.body %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %idxprom = sext i32 %i.02 to i64 - %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %idxprom - %0 = load i32 addrspace(1)* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %b, i64 %idxprom + %0 = load i32, i32 addrspace(1)* %arrayidx, align 4 %mul = mul nsw i32 %0, 3 %idxprom1 = sext i32 %i.02 to i64 - %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %idxprom1 + %arrayidx2 = getelementptr inbounds i32, i32 addrspace(1)* %a, i64 %idxprom1 store i32 %mul, i32 addrspace(1)* %arrayidx2, align 4 %inc = add nsw i32 %i.02, 1 %cmp = icmp slt i32 %inc, %n @@ -64,11 +64,11 @@ entry: for.body: ; preds = %entry, %for.body %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %idxprom = sext i32 %i.02 to i64 - %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %idxprom - %0 = load i32 addrspace(1)* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %b, i64 %idxprom + %0 = load i32, i32 addrspace(1)* %arrayidx, align 4 %mul = mul nsw i32 %0, 3 %idxprom1 = sext i32 %i.02 to i64 - %arrayidx2 = getelementptr inbounds i32* %a, i64 %idxprom1 + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %idxprom1 store i32 %mul, i32* %arrayidx2, align 4 %inc = add nsw i32 %i.02, 1 %cmp = icmp slt i32 %inc, %n @@ -91,11 +91,11 @@ entry: for.body: ; preds = %entry, %for.body %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %idxprom = sext i32 %i.02 to i64 - %arrayidx = getelementptr inbounds i32* %b, i64 %idxprom - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %b, i64 %idxprom + %0 = load i32, i32* %arrayidx, align 4 %mul = mul nsw i32 %0, 3 %idxprom1 = sext i32 %i.02 to i64 - %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %idxprom1 + %arrayidx2 = getelementptr inbounds i32, i32 addrspace(1)* %a, i64 %idxprom1 store i32 %mul, i32 addrspace(1)* %arrayidx2, align 4 %inc = add nsw i32 %i.02, 1 %cmp = icmp slt i32 %inc, %n @@ -119,11 +119,11 @@ entry: for.body: ; preds = %entry, %for.body %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %idxprom = sext i32 %i.02 to i64 - %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %idxprom - %0 = load i32 addrspace(1)* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %b, i64 %idxprom + %0 = load i32, i32 addrspace(1)* %arrayidx, align 4 %mul = mul nsw i32 %0, 3 %idxprom1 = sext i32 %i.02 to i64 - %arrayidx2 = getelementptr inbounds i32* %a, i64 %idxprom1 + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %idxprom1 store i32 %mul, i32* %arrayidx2, align 4 %inc = add nsw i32 %i.02, 1 %cmp = icmp slt i32 %inc, %n @@ -147,11 +147,11 @@ entry: for.body: ; preds = %entry, %for.body %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %idxprom = sext i32 %i.02 to i64 - %arrayidx = getelementptr inbounds i32* %b, i64 %idxprom - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %b, i64 %idxprom + %0 = load i32, i32* %arrayidx, align 4 %mul = mul nsw i32 %0, 3 %idxprom1 = sext i32 %i.02 to i64 - %arrayidx2 = getelementptr inbounds [1024 x i32] addrspace(1)* @g_as1, i64 0, i64 %idxprom1 + %arrayidx2 = getelementptr inbounds [1024 x i32], [1024 x i32] addrspace(1)* @g_as1, i64 0, i64 %idxprom1 store i32 %mul, i32 addrspace(1)* %arrayidx2, align 4 %inc = add nsw i32 %i.02, 1 %cmp = icmp slt i32 %inc, %n @@ -176,11 +176,11 @@ entry: for.body: ; preds = %entry, %for.body %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %idxprom = sext i32 %i.02 to i64 - %arrayidx = getelementptr inbounds [1024 x i32] addrspace(1)* @g_as1, i64 0, i64 %idxprom - %0 = load i32 addrspace(1)* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32] addrspace(1)* @g_as1, i64 0, i64 %idxprom + %0 = load i32, i32 addrspace(1)* %arrayidx, align 4 %mul = mul nsw i32 %0, 3 %idxprom1 = sext i32 %i.02 to i64 - %arrayidx2 = getelementptr inbounds i32* %b, i64 %idxprom1 + %arrayidx2 = getelementptr inbounds i32, i32* %b, i64 %idxprom1 store i32 %mul, i32* %arrayidx2, align 4 %inc = add nsw i32 %i.02, 1 %cmp = icmp slt i32 %inc, %n @@ -204,11 +204,11 @@ entry: for.body: ; preds = %entry, %for.body %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %idxprom = sext i32 %i.02 to i64 - %arrayidx = getelementptr inbounds [1024 x i32] addrspace(2)* @q_as2, i64 0, i64 %idxprom - %0 = load i32 addrspace(2)* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32] addrspace(2)* @q_as2, i64 0, i64 %idxprom + %0 = load i32, i32 addrspace(2)* %arrayidx, align 4 %mul = mul nsw i32 %0, 3 %idxprom1 = sext i32 %i.02 to i64 - %arrayidx2 = getelementptr inbounds [1024 x i32] addrspace(1)* @g_as1, i64 0, i64 %idxprom1 + %arrayidx2 = getelementptr inbounds [1024 x i32], [1024 x i32] addrspace(1)* @g_as1, i64 0, i64 %idxprom1 store i32 %mul, i32 addrspace(1)* %arrayidx2, align 4 %inc = add nsw i32 %i.02, 1 %cmp = icmp slt i32 %inc, %n diff --git a/test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll b/test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll index 12ba3ce..6ee983d 100644 --- a/test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll +++ b/test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll @@ -14,12 +14,12 @@ entry: for.body: ; preds = %entry, %for.body %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] - %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.01 - %0 = load i32 addrspace(1)* %arrayidx, align 4 - %arrayidx1 = getelementptr inbounds i32 addrspace(1)* %c, i64 %i.01 - %1 = load i32 addrspace(1)* %arrayidx1, align 4 + %arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %b, i64 %i.01 + %0 = load i32, i32 addrspace(1)* %arrayidx, align 4 + %arrayidx1 = getelementptr inbounds i32, i32 addrspace(1)* %c, i64 %i.01 + %1 = load i32, i32 addrspace(1)* %arrayidx1, align 4 %add = add nsw i32 %0, %1 - %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %i.01 + %arrayidx2 = getelementptr inbounds i32, i32 addrspace(1)* %a, i64 %i.01 store i32 %add, i32 addrspace(1)* %arrayidx2, align 4 %inc = add i64 %i.01, 1 %cmp = icmp ult i64 %inc, 200 @@ -39,12 +39,12 @@ entry: for.body: ; preds = %entry, %for.body %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] - %arrayidx = getelementptr inbounds i32* %b, i64 %i.01 - %0 = load i32* %arrayidx, align 4 - %arrayidx1 = getelementptr inbounds i32* %c, i64 %i.01 - %1 = load i32* %arrayidx1, align 4 + %arrayidx = getelementptr inbounds i32, i32* %b, i64 %i.01 + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx1 = getelementptr inbounds i32, i32* %c, i64 %i.01 + %1 = load i32, i32* %arrayidx1, align 4 %add = add nsw i32 %0, %1 - %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %i.01 + %arrayidx2 = getelementptr inbounds i32, i32 addrspace(1)* %a, i64 %i.01 store i32 %add, i32 addrspace(1)* %arrayidx2, align 4 %inc = add i64 %i.01, 1 %cmp = icmp ult i64 %inc, 200 @@ -64,12 +64,12 @@ entry: for.body: ; preds = %entry, %for.body %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] - %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.01 - %0 = load i32 addrspace(1)* %arrayidx, align 4 - %arrayidx1 = getelementptr inbounds i32* %c, i64 %i.01 - %1 = load i32* %arrayidx1, align 4 + %arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %b, i64 %i.01 + %0 = load i32, i32 addrspace(1)* %arrayidx, align 4 + %arrayidx1 = getelementptr inbounds i32, i32* %c, i64 %i.01 + %1 = load i32, i32* %arrayidx1, align 4 %add = add nsw i32 %0, %1 - %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.01 + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %i.01 store i32 %add, i32* %arrayidx2, align 4 %inc = add i64 %i.01, 1 %cmp = icmp ult i64 %inc, 200 @@ -89,12 +89,12 @@ entry: for.body: ; preds = %entry, %for.body %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] - %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.01 - %0 = load i32 addrspace(1)* %arrayidx, align 4 - %arrayidx1 = getelementptr inbounds i32 addrspace(1)* %c, i64 %i.01 - %1 = load i32 addrspace(1)* %arrayidx1, align 4 + %arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %b, i64 %i.01 + %0 = load i32, i32 addrspace(1)* %arrayidx, align 4 + %arrayidx1 = getelementptr inbounds i32, i32 addrspace(1)* %c, i64 %i.01 + %1 = load i32, i32 addrspace(1)* %arrayidx1, align 4 %add = add nsw i32 %0, %1 - %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.01 + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %i.01 store i32 %add, i32* %arrayidx2, align 4 %inc = add i64 %i.01, 1 %cmp = icmp ult i64 %inc, 200 @@ -114,12 +114,12 @@ entry: for.body: ; preds = %entry, %for.body %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] - %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.01 - %0 = load i32 addrspace(1)* %arrayidx, align 4 - %arrayidx1 = getelementptr inbounds i32 addrspace(2)* %c, i64 %i.01 - %1 = load i32 addrspace(2)* %arrayidx1, align 4 + %arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %b, i64 %i.01 + %0 = load i32, i32 addrspace(1)* %arrayidx, align 4 + %arrayidx1 = getelementptr inbounds i32, i32 addrspace(2)* %c, i64 %i.01 + %1 = load i32, i32 addrspace(2)* %arrayidx1, align 4 %add = add nsw i32 %0, %1 - %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.01 + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %i.01 store i32 %add, i32* %arrayidx2, align 4 %inc = add i64 %i.01, 1 %cmp = icmp ult i64 %inc, 200 diff --git a/test/Transforms/LoopVectorize/runtime-check-readonly.ll b/test/Transforms/LoopVectorize/runtime-check-readonly.ll index 9d02a6a..a3b5a59 100644 --- a/test/Transforms/LoopVectorize/runtime-check-readonly.ll +++ b/test/Transforms/LoopVectorize/runtime-check-readonly.ll @@ -22,12 +22,12 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds i32* %B, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 - %arrayidx2 = getelementptr inbounds i32* %C, i64 %indvars.iv - %1 = load i32* %arrayidx2, align 4 + %arrayidx = getelementptr inbounds i32, i32* %B, i64 %indvars.iv + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %C, i64 %indvars.iv + %1 = load i32, i32* %arrayidx2, align 4 %add = add nsw i32 %1, %0 - %arrayidx4 = getelementptr inbounds i32* %A, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv store i32 %add, i32* %arrayidx4, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/runtime-check.ll b/test/Transforms/LoopVectorize/runtime-check.ll index 1edafb4..b1c5d40 100644 --- a/test/Transforms/LoopVectorize/runtime-check.ll +++ b/test/Transforms/LoopVectorize/runtime-check.ll @@ -21,10 +21,10 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %b, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %b, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4 %mul = fmul float %0, 3.000000e+00 - %arrayidx2 = getelementptr inbounds float* %a, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds float, float* %a, i64 %indvars.iv store float %mul, float* %arrayidx2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -47,11 +47,11 @@ entry: for.body: %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ] %ind.sum = add i64 %iv, %offset - %arr.idx = getelementptr inbounds float* %a, i64 %ind.sum - %l1 = load float* %arr.idx, align 4 + %arr.idx = getelementptr inbounds float, float* %a, i64 %ind.sum + %l1 = load float, float* %arr.idx, align 4 %ind.sum2 = add i64 %iv, %offset2 - %arr.idx2 = getelementptr inbounds float* %a, i64 %ind.sum2 - %l2 = load float* %arr.idx2, align 4 + %arr.idx2 = getelementptr inbounds float, float* %a, i64 %ind.sum2 + %l2 = load float, float* %arr.idx2, align 4 %m = fmul fast float %b, %l2 %ad = fadd fast float %l1, %m store float %ad, float* %arr.idx, align 4 diff --git a/test/Transforms/LoopVectorize/runtime-limit.ll b/test/Transforms/LoopVectorize/runtime-limit.ll index 324949d..6bc71e1 100644 --- a/test/Transforms/LoopVectorize/runtime-limit.ll +++ b/test/Transforms/LoopVectorize/runtime-limit.ll @@ -13,21 +13,21 @@ entry: for.body: ; preds = %for.body, %entry %i.016 = phi i64 [ 0, %entry ], [ %inc, %for.body ] - %arrayidx = getelementptr inbounds i32* %A, i64 %i.016 - %0 = load i32* %arrayidx, align 4 - %arrayidx1 = getelementptr inbounds i32* %B, i64 %i.016 - %1 = load i32* %arrayidx1, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %i.016 + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx1 = getelementptr inbounds i32, i32* %B, i64 %i.016 + %1 = load i32, i32* %arrayidx1, align 4 %add = add nsw i32 %1, %0 - %arrayidx2 = getelementptr inbounds i32* %C, i64 %i.016 - %2 = load i32* %arrayidx2, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %C, i64 %i.016 + %2 = load i32, i32* %arrayidx2, align 4 %add3 = add nsw i32 %add, %2 - %arrayidx4 = getelementptr inbounds i32* %E, i64 %i.016 - %3 = load i32* %arrayidx4, align 4 + %arrayidx4 = getelementptr inbounds i32, i32* %E, i64 %i.016 + %3 = load i32, i32* %arrayidx4, align 4 %add5 = add nsw i32 %add3, %3 - %arrayidx6 = getelementptr inbounds i32* %F, i64 %i.016 - %4 = load i32* %arrayidx6, align 4 + %arrayidx6 = getelementptr inbounds i32, i32* %F, i64 %i.016 + %4 = load i32, i32* %arrayidx6, align 4 %add7 = add nsw i32 %add5, %4 - %arrayidx8 = getelementptr inbounds i32* %out, i64 %i.016 + %arrayidx8 = getelementptr inbounds i32, i32* %out, i64 %i.016 store i32 %add7, i32* %arrayidx8, align 4 %inc = add i64 %i.016, 1 %exitcond = icmp eq i64 %inc, 256 @@ -47,32 +47,32 @@ entry: for.body: ; preds = %for.body, %entry %i.037 = phi i64 [ 0, %entry ], [ %inc, %for.body ] - %arrayidx = getelementptr inbounds i32* %A, i64 %i.037 - %0 = load i32* %arrayidx, align 4 - %arrayidx1 = getelementptr inbounds i32* %B, i64 %i.037 - %1 = load i32* %arrayidx1, align 4 + %arrayidx = getelementptr inbounds i32, i32* %A, i64 %i.037 + %0 = load i32, i32* %arrayidx, align 4 + %arrayidx1 = getelementptr inbounds i32, i32* %B, i64 %i.037 + %1 = load i32, i32* %arrayidx1, align 4 %add = add nsw i32 %1, %0 - %arrayidx2 = getelementptr inbounds i32* %C, i64 %i.037 - %2 = load i32* %arrayidx2, align 4 + %arrayidx2 = getelementptr inbounds i32, i32* %C, i64 %i.037 + %2 = load i32, i32* %arrayidx2, align 4 %add3 = add nsw i32 %add, %2 - %arrayidx4 = getelementptr inbounds i32* %E, i64 %i.037 - %3 = load i32* %arrayidx4, align 4 + %arrayidx4 = getelementptr inbounds i32, i32* %E, i64 %i.037 + %3 = load i32, i32* %arrayidx4, align 4 %add5 = add nsw i32 %add3, %3 - %arrayidx6 = getelementptr inbounds i32* %F, i64 %i.037 - %4 = load i32* %arrayidx6, align 4 + %arrayidx6 = getelementptr inbounds i32, i32* %F, i64 %i.037 + %4 = load i32, i32* %arrayidx6, align 4 %add7 = add nsw i32 %add5, %4 - %arrayidx8 = getelementptr inbounds i32* %out, i64 %i.037 + %arrayidx8 = getelementptr inbounds i32, i32* %out, i64 %i.037 store i32 %add7, i32* %arrayidx8, align 4 - %5 = load i32* %arrayidx, align 4 - %6 = load i32* %arrayidx1, align 4 + %5 = load i32, i32* %arrayidx, align 4 + %6 = load i32, i32* %arrayidx1, align 4 %add11 = add nsw i32 %6, %5 - %7 = load i32* %arrayidx2, align 4 + %7 = load i32, i32* %arrayidx2, align 4 %add13 = add nsw i32 %add11, %7 - %8 = load i32* %arrayidx4, align 4 + %8 = load i32, i32* %arrayidx4, align 4 %add15 = add nsw i32 %add13, %8 - %9 = load i32* %arrayidx6, align 4 + %9 = load i32, i32* %arrayidx6, align 4 %add17 = add nsw i32 %add15, %9 - %arrayidx18 = getelementptr inbounds i32* %out2, i64 %i.037 + %arrayidx18 = getelementptr inbounds i32, i32* %out2, i64 %i.037 store i32 %add17, i32* %arrayidx18, align 4 %inc = add i64 %i.037, 1 %exitcond = icmp eq i64 %inc, 256 diff --git a/test/Transforms/LoopVectorize/safegep.ll b/test/Transforms/LoopVectorize/safegep.ll index f853afd..ecef813 100644 --- a/test/Transforms/LoopVectorize/safegep.ll +++ b/test/Transforms/LoopVectorize/safegep.ll @@ -17,10 +17,10 @@ entry: "<bb 3>": %i_15 = phi i32 [ 0, %entry ], [ %i_19, %"<bb 3>" ] - %pp3 = getelementptr float* %A, i32 %i_15 - %D.1396_10 = load float* %pp3, align 4 - %pp24 = getelementptr float* %B, i32 %i_15 - %D.1398_15 = load float* %pp24, align 4 + %pp3 = getelementptr float, float* %A, i32 %i_15 + %D.1396_10 = load float, float* %pp3, align 4 + %pp24 = getelementptr float, float* %B, i32 %i_15 + %D.1398_15 = load float, float* %pp24, align 4 %D.1399_17 = fadd float %D.1398_15, %K %D.1400_18 = fmul float %D.1396_10, %D.1399_17 store float %D.1400_18, float* %pp3, align 4 @@ -43,10 +43,10 @@ entry: "<bb 3>": %i_15 = phi i32 [ 0, %entry ], [ %i_19, %"<bb 3>" ] - %pp3 = getelementptr float addrspace(5) * %A, i32 %i_15 - %D.1396_10 = load float addrspace(5) * %pp3, align 4 - %pp24 = getelementptr float* %B, i32 %i_15 - %D.1398_15 = load float* %pp24, align 4 + %pp3 = getelementptr float, float addrspace(5) * %A, i32 %i_15 + %D.1396_10 = load float, float addrspace(5) * %pp3, align 4 + %pp24 = getelementptr float, float* %B, i32 %i_15 + %D.1398_15 = load float, float* %pp24, align 4 %D.1399_17 = fadd float %D.1398_15, %K %D.1400_18 = fmul float %D.1396_10, %D.1399_17 store float %D.1400_18, float addrspace(5) * %pp3, align 4 diff --git a/test/Transforms/LoopVectorize/same-base-access.ll b/test/Transforms/LoopVectorize/same-base-access.ll index d19458f..31cff0e 100644 --- a/test/Transforms/LoopVectorize/same-base-access.ll +++ b/test/Transforms/LoopVectorize/same-base-access.ll @@ -26,33 +26,33 @@ define i32 @kernel11(double* %x, double* %y, i32 %n) nounwind uwtable ssp { br label %4 ; <label>:4 ; preds = %25, %0 - %5 = load i32* %k, align 4 - %6 = load i32* %3, align 4 + %5 = load i32, i32* %k, align 4 + %6 = load i32, i32* %3, align 4 %7 = icmp slt i32 %5, %6 br i1 %7, label %8, label %28 ; <label>:8 ; preds = %4 - %9 = load i32* %k, align 4 + %9 = load i32, i32* %k, align 4 %10 = sub nsw i32 %9, 1 %11 = sext i32 %10 to i64 - %12 = load double** %1, align 8 - %13 = getelementptr inbounds double* %12, i64 %11 - %14 = load double* %13, align 8 - %15 = load i32* %k, align 4 + %12 = load double*, double** %1, align 8 + %13 = getelementptr inbounds double, double* %12, i64 %11 + %14 = load double, double* %13, align 8 + %15 = load i32, i32* %k, align 4 %16 = sext i32 %15 to i64 - %17 = load double** %2, align 8 - %18 = getelementptr inbounds double* %17, i64 %16 - %19 = load double* %18, align 8 + %17 = load double*, double** %2, align 8 + %18 = getelementptr inbounds double, double* %17, i64 %16 + %19 = load double, double* %18, align 8 %20 = fadd double %14, %19 - %21 = load i32* %k, align 4 + %21 = load i32, i32* %k, align 4 %22 = sext i32 %21 to i64 - %23 = load double** %1, align 8 - %24 = getelementptr inbounds double* %23, i64 %22 + %23 = load double*, double** %1, align 8 + %24 = getelementptr inbounds double, double* %23, i64 %22 store double %20, double* %24, align 8 br label %25 ; <label>:25 ; preds = %8 - %26 = load i32* %k, align 4 + %26 = load i32, i32* %k, align 4 %27 = add nsw i32 %26, 1 store i32 %27, i32* %k, align 4 br label %4 @@ -86,8 +86,8 @@ define i32 @func2(i32* nocapture %a) nounwind uwtable ssp { ; <label>:1 ; preds = %7, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %7 ] %2 = mul nsw i64 %indvars.iv, 7 - %3 = getelementptr inbounds i32* %a, i64 %2 - %4 = load i32* %3, align 4 + %3 = getelementptr inbounds i32, i32* %a, i64 %2 + %4 = load i32, i32* %3, align 4 %5 = icmp sgt i32 %4, 3 br i1 %5, label %6, label %7 diff --git a/test/Transforms/LoopVectorize/scalar-select.ll b/test/Transforms/LoopVectorize/scalar-select.ll index 6b37cc2..b17b202 100644 --- a/test/Transforms/LoopVectorize/scalar-select.ll +++ b/test/Transforms/LoopVectorize/scalar-select.ll @@ -18,12 +18,12 @@ define void @example1(i1 %cond) nounwind uwtable ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = add nsw i32 %5, %3 - %7 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %7 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv %sel = select i1 %cond, i32 %6, i32 zeroinitializer store i32 %sel, i32* %7, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/scev-exitlim-crash.ll b/test/Transforms/LoopVectorize/scev-exitlim-crash.ll index 5154771..cfc1d6d 100644 --- a/test/Transforms/LoopVectorize/scev-exitlim-crash.ll +++ b/test/Transforms/LoopVectorize/scev-exitlim-crash.ll @@ -29,14 +29,14 @@ for.cond4.preheader: ; preds = %for.cond br i1 %cmp514, label %for.cond7.preheader.lr.ph, label %for.end26 for.cond7.preheader.lr.ph: ; preds = %for.cond4.preheader - %0 = load i32** @e, align 8, !tbaa !4 + %0 = load i32*, i32** @e, align 8, !tbaa !4 br label %for.cond7.preheader for.cond7.preheader: ; preds = %for.cond7.preheader.lr.ph, %for.inc23 %y.017 = phi i32 [ 0, %for.cond7.preheader.lr.ph ], [ %inc24, %for.inc23 ] %i.116 = phi i32 [ 0, %for.cond7.preheader.lr.ph ], [ %i.2.lcssa, %for.inc23 ] %n.015 = phi i32 [ undef, %for.cond7.preheader.lr.ph ], [ %inc25, %for.inc23 ] - %1 = load i32* @b, align 4, !tbaa !5 + %1 = load i32, i32* @b, align 4, !tbaa !5 %tobool11 = icmp eq i32 %1, 0 br i1 %tobool11, label %for.inc23, label %for.body8.lr.ph @@ -51,7 +51,7 @@ for.body8: ; preds = %for.body8.lr.ph, %f %add10 = add i32 %add9, %2 store i32 %add10, i32* @f, align 4, !tbaa !5 %idx.ext = sext i32 %add10 to i64 - %add.ptr = getelementptr inbounds i32* @a, i64 %idx.ext + %add.ptr = getelementptr inbounds i32, i32* @a, i64 %idx.ext %tobool129 = icmp eq i32 %i.213, 0 br i1 %tobool129, label %for.inc19, label %for.body13.lr.ph @@ -62,9 +62,9 @@ for.body13.lr.ph: ; preds = %for.body8 for.body13: ; preds = %for.body13.lr.ph, %for.body13 %indvars.iv = phi i64 [ %3, %for.body13.lr.ph ], [ %indvars.iv.next, %for.body13 ] %add.ptr.sum = add i64 %idx.ext, %indvars.iv - %arrayidx = getelementptr inbounds i32* @a, i64 %add.ptr.sum - %4 = load i32* %arrayidx, align 4, !tbaa !5 - %arrayidx15 = getelementptr inbounds i32* %0, i64 %indvars.iv + %arrayidx = getelementptr inbounds i32, i32* @a, i64 %add.ptr.sum + %4 = load i32, i32* %arrayidx, align 4, !tbaa !5 + %arrayidx15 = getelementptr inbounds i32, i32* %0, i64 %indvars.iv store i32 %4, i32* %arrayidx15, align 4, !tbaa !5 %indvars.iv.next = add i64 %indvars.iv, 1 %5 = trunc i64 %indvars.iv.next to i32 @@ -75,11 +75,11 @@ for.cond11.for.inc19_crit_edge: ; preds = %for.body13 br label %for.inc19 for.inc19: ; preds = %for.cond11.for.inc19_crit_edge, %for.body8 - %6 = load i32* @c, align 4, !tbaa !5 + %6 = load i32, i32* @c, align 4, !tbaa !5 %inc20 = add nsw i32 %6, 1 store i32 %inc20, i32* @c, align 4, !tbaa !5 %indvars.iv.next20 = add i64 %indvars.iv19, 1 - %7 = load i32* @b, align 4, !tbaa !5 + %7 = load i32, i32* @b, align 4, !tbaa !5 %tobool = icmp eq i32 %7, 0 br i1 %tobool, label %for.cond7.for.inc23_crit_edge, label %for.body8 diff --git a/test/Transforms/LoopVectorize/simple-unroll.ll b/test/Transforms/LoopVectorize/simple-unroll.ll index 8bf680a..fc996ed 100644 --- a/test/Transforms/LoopVectorize/simple-unroll.ll +++ b/test/Transforms/LoopVectorize/simple-unroll.ll @@ -23,8 +23,8 @@ define void @inc(i32 %n) nounwind uwtable noinline ssp { .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 %4 = trunc i64 %indvars.iv to i32 %5 = add nsw i32 %3, %4 store i32 %5, i32* %2, align 4 diff --git a/test/Transforms/LoopVectorize/small-loop.ll b/test/Transforms/LoopVectorize/small-loop.ll index 1d30102..ce606d1 100644 --- a/test/Transforms/LoopVectorize/small-loop.ll +++ b/test/Transforms/LoopVectorize/small-loop.ll @@ -15,12 +15,12 @@ define void @example1() nounwind uwtable ssp { ; <label>:1 ; preds = %1, %0 %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ] - %2 = getelementptr inbounds [2048 x i32]* @b, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 - %4 = getelementptr inbounds [2048 x i32]* @c, i64 0, i64 %indvars.iv - %5 = load i32* %4, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds [2048 x i32], [2048 x i32]* @c, i64 0, i64 %indvars.iv + %5 = load i32, i32* %4, align 4 %6 = add nsw i32 %5, %3 - %7 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv + %7 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv store i32 %6, i32* %7, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/start-non-zero.ll b/test/Transforms/LoopVectorize/start-non-zero.ll index cc47494..b444a69 100644 --- a/test/Transforms/LoopVectorize/start-non-zero.ll +++ b/test/Transforms/LoopVectorize/start-non-zero.ll @@ -17,8 +17,8 @@ for.body.lr.ph: ; preds = %entry for.body: ; preds = %for.body.lr.ph, %for.body %indvars.iv = phi i64 [ %0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds i32* %a, i64 %indvars.iv - %1 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv + %1 = load i32, i32* %arrayidx, align 4 %mul = mul nuw i32 %1, 333 store i32 %mul, i32* %arrayidx, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/store-shuffle-bug.ll b/test/Transforms/LoopVectorize/store-shuffle-bug.ll index 6d3d113..4d62df1 100644 --- a/test/Transforms/LoopVectorize/store-shuffle-bug.ll +++ b/test/Transforms/LoopVectorize/store-shuffle-bug.ll @@ -30,14 +30,14 @@ entry: for.body: %indvars.iv = phi i64 [ 93, %entry ], [ %indvars.iv.next, %for.body ] %0 = add i64 %indvars.iv, 1 - %arrayidx = getelementptr inbounds [100 x i32]* @uf, i64 0, i64 %0 - %arrayidx3 = getelementptr inbounds [100 x i32]* @xi, i64 0, i64 %0 - %1 = load i32* %arrayidx3, align 4 - %2 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* @uf, i64 0, i64 %0 + %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* @xi, i64 0, i64 %0 + %1 = load i32, i32* %arrayidx3, align 4 + %2 = load i32, i32* %arrayidx, align 4 %add4 = add nsw i32 %2, %1 store i32 %add4, i32* %arrayidx, align 4 - %arrayidx7 = getelementptr inbounds [100 x i32]* @q, i64 0, i64 %0 - %3 = load i32* %arrayidx7, align 4 + %arrayidx7 = getelementptr inbounds [100 x i32], [100 x i32]* @q, i64 0, i64 %0 + %3 = load i32, i32* %arrayidx7, align 4 %add8 = add nsw i32 %add4, %3 store i32 %add8, i32* %arrayidx, align 4 %indvars.iv.next = add i64 %indvars.iv, -1 diff --git a/test/Transforms/LoopVectorize/struct_access.ll b/test/Transforms/LoopVectorize/struct_access.ll index cf6f325..1e4019a 100644 --- a/test/Transforms/LoopVectorize/struct_access.ll +++ b/test/Transforms/LoopVectorize/struct_access.ll @@ -32,8 +32,8 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %sum.05 = phi i32 [ %add, %for.body ], [ 0, %entry ] - %x = getelementptr inbounds %struct.coordinate* %A, i64 %indvars.iv, i32 0 - %0 = load i32* %x, align 4 + %x = getelementptr inbounds %struct.coordinate, %struct.coordinate* %A, i64 %indvars.iv, i32 0 + %0 = load i32, i32* %x, align 4 %add = add nsw i32 %0, %sum.05 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -74,8 +74,8 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %sum.05 = phi i32 [ %add, %for.body ], [ 0, %entry ] - %x = getelementptr inbounds %struct.lit* %A, i64 %indvars.iv, i32 0 - %0 = load i32* %x, align 4 + %x = getelementptr inbounds %struct.lit, %struct.lit* %A, i64 %indvars.iv, i32 0 + %0 = load i32, i32* %x, align 4 %add = add nsw i32 %0, %sum.05 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/tbaa-nodep.ll b/test/Transforms/LoopVectorize/tbaa-nodep.ll index be3e74f..06d0002 100644 --- a/test/Transforms/LoopVectorize/tbaa-nodep.ll +++ b/test/Transforms/LoopVectorize/tbaa-nodep.ll @@ -10,10 +10,10 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds float* %b, i64 %indvars.iv - %0 = load float* %arrayidx, align 4, !tbaa !0 + %arrayidx = getelementptr inbounds float, float* %b, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4, !tbaa !0 %conv = fptosi float %0 to i32 - %arrayidx2 = getelementptr inbounds i32* %a, i64 %indvars.iv + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv store i32 %conv, i32* %arrayidx2, align 4, !tbaa !4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 1600 @@ -30,7 +30,7 @@ for.end: ; preds = %for.body ; CHECK-NEXT: br label %vector.body ; CHECK: vector.body: -; CHECK: load <4 x float>* %{{.*}}, align 4, !tbaa +; CHECK: load <4 x float>, <4 x float>* %{{.*}}, align 4, !tbaa ; CHECK: store <4 x i32> %{{.*}}, <4 x i32>* %{{.*}}, align 4, !tbaa ; CHECK: ret i32 0 @@ -38,7 +38,7 @@ for.end: ; preds = %for.body ; CHECK-NOTBAA-LABEL: @test1 ; CHECK-NOTBAA: icmp uge i32* -; CHECK-NOTBAA: load <4 x float>* %{{.*}}, align 4, !tbaa +; CHECK-NOTBAA: load <4 x float>, <4 x float>* %{{.*}}, align 4, !tbaa ; CHECK-NOTBAA: store <4 x i32> %{{.*}}, <4 x i32>* %{{.*}}, align 4, !tbaa ; CHECK-NOTBAA: ret i32 0 @@ -51,13 +51,13 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - %arrayidx = getelementptr inbounds float* %b, i64 %indvars.iv - %0 = load float* %arrayidx, align 4, !tbaa !0 - %arrayidx2 = getelementptr inbounds i32* %a, i64 %indvars.iv - %1 = load i32* %arrayidx2, align 4, !tbaa !4 + %arrayidx = getelementptr inbounds float, float* %b, i64 %indvars.iv + %0 = load float, float* %arrayidx, align 4, !tbaa !0 + %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv + %1 = load i32, i32* %arrayidx2, align 4, !tbaa !4 %conv = sitofp i32 %1 to float %mul = fmul float %0, %conv - %arrayidx4 = getelementptr inbounds float* %c, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds float, float* %c, i64 %indvars.iv store float %mul, float* %arrayidx4, align 4, !tbaa !0 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 1600 @@ -74,7 +74,7 @@ for.end: ; preds = %for.body ; CHECK: icmp uge float* ; CHECK-NOT: icmp uge i32* -; CHECK: load <4 x float>* %{{.*}}, align 4, !tbaa +; CHECK: load <4 x float>, <4 x float>* %{{.*}}, align 4, !tbaa ; CHECK: store <4 x float> %{{.*}}, <4 x float>* %{{.*}}, align 4, !tbaa ; CHECK: ret i32 0 @@ -85,7 +85,7 @@ for.end: ; preds = %for.body ; CHECK-NOTBAA-DAG: icmp uge float* ; CHECK-NOTBAA-DAG: icmp uge i32* -; CHECK-NOTBAA: load <4 x float>* %{{.*}}, align 4, !tbaa +; CHECK-NOTBAA: load <4 x float>, <4 x float>* %{{.*}}, align 4, !tbaa ; CHECK-NOTBAA: store <4 x float> %{{.*}}, <4 x float>* %{{.*}}, align 4, !tbaa ; CHECK-NOTBAA: ret i32 0 diff --git a/test/Transforms/LoopVectorize/undef-inst-bug.ll b/test/Transforms/LoopVectorize/undef-inst-bug.ll index 0444fe8..e9d053c 100644 --- a/test/Transforms/LoopVectorize/undef-inst-bug.ll +++ b/test/Transforms/LoopVectorize/undef-inst-bug.ll @@ -24,7 +24,7 @@ for.body: ; Loop invariant anchored in loop. %idxprom21 = zext i32 undef to i64 - %arrayidx23 = getelementptr inbounds [100 x [100 x i32]]* undef, i64 0, i64 %idxprom21, i64 %indvars.iv17 + %arrayidx23 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* undef, i64 0, i64 %idxprom21, i64 %indvars.iv17 store i32 undef, i32* %arrayidx23, align 4 %indvars.next= add i64 %indvars.iv17, -1 %0 = trunc i64 %indvars.next to i32 diff --git a/test/Transforms/LoopVectorize/unroll_novec.ll b/test/Transforms/LoopVectorize/unroll_novec.ll index 257b4e6..c23ad77 100644 --- a/test/Transforms/LoopVectorize/unroll_novec.ll +++ b/test/Transforms/LoopVectorize/unroll_novec.ll @@ -10,11 +10,11 @@ target triple = "x86_64-apple-macosx10.8.0" ; a[i] += i; ; } ;CHECK-LABEL: @inc( -;CHECK: load i32* -;CHECK: load i32* -;CHECK: load i32* -;CHECK: load i32* -;CHECK-NOT: load i32* +;CHECK: load i32, i32* +;CHECK: load i32, i32* +;CHECK: load i32, i32* +;CHECK: load i32, i32* +;CHECK-NOT: load i32, i32* ;CHECK: add nsw i32 ;CHECK: add nsw i32 ;CHECK: add nsw i32 @@ -33,8 +33,8 @@ define void @inc(i32 %n) nounwind uwtable noinline ssp { .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds [2048 x i32]* @a, i64 0, i64 %indvars.iv - %3 = load i32* %2, align 4 + %2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %indvars.iv + %3 = load i32, i32* %2, align 4 %4 = trunc i64 %indvars.iv to i32 %5 = add nsw i32 %3, %4 store i32 %5, i32* %2, align 4 diff --git a/test/Transforms/LoopVectorize/unsized-pointee-crash.ll b/test/Transforms/LoopVectorize/unsized-pointee-crash.ll index 5cc9837..7763c9c 100644 --- a/test/Transforms/LoopVectorize/unsized-pointee-crash.ll +++ b/test/Transforms/LoopVectorize/unsized-pointee-crash.ll @@ -11,10 +11,10 @@ for.body: %b.05 = phi i32 (...)* [ undef, %entry ], [ %1, %for.body ] %a.04 = phi i32 [ 0, %entry ], [ %inc, %for.body ] %0 = bitcast i32 (...)* %b.05 to i8* - %add.ptr = getelementptr i8* %0, i64 1 + %add.ptr = getelementptr i8, i8* %0, i64 1 %1 = bitcast i8* %add.ptr to i32 (...)* ; CHECK: %[[cst:.*]] = bitcast i32 (...)* {{.*}} to i8* -; CHECK-NEXT: %[[gep:.*]] = getelementptr i8* %[[cst]], i64 1 +; CHECK-NEXT: %[[gep:.*]] = getelementptr i8, i8* %[[cst]], i64 1 %inc = add nsw i32 %a.04, 1 %exitcond = icmp eq i32 %a.04, 63 br i1 %exitcond, label %for.end, label %for.body diff --git a/test/Transforms/LoopVectorize/value-ptr-bug.ll b/test/Transforms/LoopVectorize/value-ptr-bug.ll index 7fb9095..ce4601f 100644 --- a/test/Transforms/LoopVectorize/value-ptr-bug.ll +++ b/test/Transforms/LoopVectorize/value-ptr-bug.ll @@ -19,8 +19,8 @@ entry: loop: %inc = phi i32 [ %sub267, %entry ], [ %add, %loop] %ext.inc = sext i32 %inc to i64 - %add.ptr265 = getelementptr inbounds i32* %ptr265, i64 %ext.inc - %add.ptr266 = getelementptr inbounds i32* %ptr266, i64 %ext.inc + %add.ptr265 = getelementptr inbounds i32, i32* %ptr265, i64 %ext.inc + %add.ptr266 = getelementptr inbounds i32, i32* %ptr266, i64 %ext.inc %add = add i32 %inc, 9 %cmp = icmp slt i32 %add, 140 br i1 %cmp, label %block1, label %loop @@ -37,9 +37,9 @@ do.body272: %row_width.5 = phi i32 [ %sub267.lcssa, %block1 ], [ %dec, %do.body272 ] %sp.4 = phi i8* [ %tmp30, %block1 ], [ %incdec.ptr273, %do.body272 ] %dp.addr.4 = phi i8* [ %tmp29, %block1 ], [ %incdec.ptr274, %do.body272 ] - %incdec.ptr273 = getelementptr inbounds i8* %sp.4, i64 1 - %tmp31 = load i8* %sp.4, align 1 - %incdec.ptr274 = getelementptr inbounds i8* %dp.addr.4, i64 1 + %incdec.ptr273 = getelementptr inbounds i8, i8* %sp.4, i64 1 + %tmp31 = load i8, i8* %sp.4, align 1 + %incdec.ptr274 = getelementptr inbounds i8, i8* %dp.addr.4, i64 1 store i8 %tmp31, i8* %dp.addr.4, align 1 %dec = add i32 %row_width.5, -1 %cmp276 = icmp eq i32 %dec, 0 diff --git a/test/Transforms/LoopVectorize/vect.omp.persistence.ll b/test/Transforms/LoopVectorize/vect.omp.persistence.ll index ea7be9c..0d7f8b9 100644 --- a/test/Transforms/LoopVectorize/vect.omp.persistence.ll +++ b/test/Transforms/LoopVectorize/vect.omp.persistence.ll @@ -45,13 +45,13 @@ for.header: for.body: %0 = add nsw i64 %indvars.iv, -5 - %arrayidx = getelementptr inbounds float* %a, i64 %0 - %1 = load float* %arrayidx, align 4, !llvm.mem.parallel_loop_access !1 + %arrayidx = getelementptr inbounds float, float* %a, i64 %0 + %1 = load float, float* %arrayidx, align 4, !llvm.mem.parallel_loop_access !1 %2 = add nsw i64 %indvars.iv, 2 - %arrayidx2 = getelementptr inbounds float* %a, i64 %2 - %3 = load float* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !1 + %arrayidx2 = getelementptr inbounds float, float* %a, i64 %2 + %3 = load float, float* %arrayidx2, align 4, !llvm.mem.parallel_loop_access !1 %mul = fmul float %1, %3 - %arrayidx4 = getelementptr inbounds float* %a, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds float, float* %a, i64 %indvars.iv store float %mul, float* %arrayidx4, align 4, !llvm.mem.parallel_loop_access !1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 diff --git a/test/Transforms/LoopVectorize/vect.stats.ll b/test/Transforms/LoopVectorize/vect.stats.ll index c5b6e64..7bf5a60 100644 --- a/test/Transforms/LoopVectorize/vect.stats.ll +++ b/test/Transforms/LoopVectorize/vect.stats.ll @@ -20,8 +20,8 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv2 = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] - %arrayidx = getelementptr inbounds float* %a, i64 %indvars.iv2 - %0 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %a, i64 %indvars.iv2 + %0 = load float, float* %arrayidx, align 4 %mul = fmul float %0, %0 store float %mul, float* %arrayidx, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv2, 1 @@ -42,13 +42,13 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv2 = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %0 = add nsw i64 %indvars.iv2, -5 - %arrayidx = getelementptr inbounds float* %a, i64 %0 - %1 = load float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, float* %a, i64 %0 + %1 = load float, float* %arrayidx, align 4 %2 = add nsw i64 %indvars.iv2, 2 - %arrayidx2 = getelementptr inbounds float* %a, i64 %2 - %3 = load float* %arrayidx2, align 4 + %arrayidx2 = getelementptr inbounds float, float* %a, i64 %2 + %3 = load float, float* %arrayidx2, align 4 %mul = fmul float %1, %3 - %arrayidx4 = getelementptr inbounds float* %a, i64 %indvars.iv2 + %arrayidx4 = getelementptr inbounds float, float* %a, i64 %indvars.iv2 store float %mul, float* %arrayidx4, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv2, 1 %cmp2 = icmp sgt i64 %indvars.iv.next, %size diff --git a/test/Transforms/LoopVectorize/vectorize-once.ll b/test/Transforms/LoopVectorize/vectorize-once.ll index a9b2a53..9a91250 100644 --- a/test/Transforms/LoopVectorize/vectorize-once.ll +++ b/test/Transforms/LoopVectorize/vectorize-once.ll @@ -22,16 +22,16 @@ target triple = "x86_64-apple-macosx10.8.0" define i32 @_Z4foo1Pii(i32* %A, i32 %n) #0 { entry: %idx.ext = sext i32 %n to i64 - %add.ptr = getelementptr inbounds i32* %A, i64 %idx.ext + %add.ptr = getelementptr inbounds i32, i32* %A, i64 %idx.ext %cmp3.i = icmp eq i32 %n, 0 br i1 %cmp3.i, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %for.body.i for.body.i: ; preds = %entry, %for.body.i %__init.addr.05.i = phi i32 [ %add.i, %for.body.i ], [ 0, %entry ] %__first.addr.04.i = phi i32* [ %incdec.ptr.i, %for.body.i ], [ %A, %entry ] - %0 = load i32* %__first.addr.04.i, align 4 + %0 = load i32, i32* %__first.addr.04.i, align 4 %add.i = add nsw i32 %0, %__init.addr.05.i - %incdec.ptr.i = getelementptr inbounds i32* %__first.addr.04.i, i64 1 + %incdec.ptr.i = getelementptr inbounds i32, i32* %__first.addr.04.i, i64 1 %cmp.i = icmp eq i32* %incdec.ptr.i, %add.ptr br i1 %cmp.i, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %for.body.i @@ -48,16 +48,16 @@ _ZSt10accumulateIPiiET0_T_S2_S1_.exit: ; preds = %for.body.i, %entry define i32 @_Z4foo2Pii(i32* %A, i32 %n) #0 { entry: %idx.ext = sext i32 %n to i64 - %add.ptr = getelementptr inbounds i32* %A, i64 %idx.ext + %add.ptr = getelementptr inbounds i32, i32* %A, i64 %idx.ext %cmp3.i = icmp eq i32 %n, 0 br i1 %cmp3.i, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %for.body.i for.body.i: ; preds = %entry, %for.body.i %__init.addr.05.i = phi i32 [ %add.i, %for.body.i ], [ 0, %entry ] %__first.addr.04.i = phi i32* [ %incdec.ptr.i, %for.body.i ], [ %A, %entry ] - %0 = load i32* %__first.addr.04.i, align 4 + %0 = load i32, i32* %__first.addr.04.i, align 4 %add.i = add nsw i32 %0, %__init.addr.05.i - %incdec.ptr.i = getelementptr inbounds i32* %__first.addr.04.i, i64 1 + %incdec.ptr.i = getelementptr inbounds i32, i32* %__first.addr.04.i, i64 1 %cmp.i = icmp eq i32* %incdec.ptr.i, %add.ptr br i1 %cmp.i, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %for.body.i, !llvm.loop !0 @@ -71,7 +71,8 @@ attributes #0 = { nounwind readonly ssp uwtable "fp-contract-model"="standard" " ; CHECK: !0 = distinct !{!0, !1, !2} ; CHECK: !1 = !{!"llvm.loop.vectorize.width", i32 1} ; CHECK: !2 = !{!"llvm.loop.interleave.count", i32 1} -; CHECK: !3 = distinct !{!3, !1, !2} +; CHECK: !3 = distinct !{!3, !4, !1, !2} +; CHECK: !4 = !{!"llvm.loop.unroll.runtime.disable"} !0 = !{!0, !1} !1 = !{!"llvm.loop.vectorize.width", i32 1} diff --git a/test/Transforms/LoopVectorize/version-mem-access.ll b/test/Transforms/LoopVectorize/version-mem-access.ll index 37145aa..a9d319e 100644 --- a/test/Transforms/LoopVectorize/version-mem-access.ll +++ b/test/Transforms/LoopVectorize/version-mem-access.ll @@ -34,14 +34,14 @@ for.body: %iv.trunc = trunc i64 %indvars.iv to i32 %mul = mul i32 %iv.trunc, %BStride %mul64 = zext i32 %mul to i64 - %arrayidx = getelementptr inbounds i32* %B, i64 %mul64 - %0 = load i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, i32* %B, i64 %mul64 + %0 = load i32, i32* %arrayidx, align 4 %mul2 = mul nsw i64 %indvars.iv, %CStride - %arrayidx3 = getelementptr inbounds i32* %C, i64 %mul2 - %1 = load i32* %arrayidx3, align 4 + %arrayidx3 = getelementptr inbounds i32, i32* %C, i64 %mul2 + %1 = load i32, i32* %arrayidx3, align 4 %mul4 = mul nsw i32 %1, %0 %mul3 = mul nsw i64 %indvars.iv, %AStride - %arrayidx7 = getelementptr inbounds i32* %A, i64 %mul3 + %arrayidx7 = getelementptr inbounds i32, i32* %A, i64 %mul3 store i32 %mul4, i32* %arrayidx7, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 @@ -76,9 +76,9 @@ for.body: %0 = trunc i64 %indvars.iv to i32 %mul = mul nsw i32 %0, %conv %idxprom = sext i32 %mul to i64 - %arrayidx = getelementptr inbounds double* %x, i64 %idxprom - %1 = load double* %arrayidx, align 8 - %arrayidx3 = getelementptr inbounds double* %c, i64 %indvars.iv + %arrayidx = getelementptr inbounds double, double* %x, i64 %idxprom + %1 = load double, double* %arrayidx, align 8 + %arrayidx3 = getelementptr inbounds double, double* %c, i64 %indvars.iv store double %1, double* %arrayidx3, align 8 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 diff --git a/test/Transforms/LoopVectorize/write-only.ll b/test/Transforms/LoopVectorize/write-only.ll index 2f100de..b2bc045 100644 --- a/test/Transforms/LoopVectorize/write-only.ll +++ b/test/Transforms/LoopVectorize/write-only.ll @@ -12,8 +12,8 @@ define i32 @read_mod_write_single_ptr(float* nocapture %a, i32 %n) nounwind uwta .lr.ph: ; preds = %0, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ] - %2 = getelementptr inbounds float* %a, i64 %indvars.iv - %3 = load float* %2, align 4 + %2 = getelementptr inbounds float, float* %a, i64 %indvars.iv + %3 = load float, float* %2, align 4 %4 = fmul float %3, 3.000000e+00 store float %4, float* %2, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 |