From a79ac14fa68297f9888bc70a10df5ed9b8864e38 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 27 Feb 2015 21:17:42 +0000 Subject: [opaque pointer type] Add textual IR support for explicit type parameter to load instruction Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 llvm-svn: 230794 --- .../LoopVectorize/X86/already-vectorized.ll | 2 +- llvm/test/Transforms/LoopVectorize/X86/assume.ll | 8 +- llvm/test/Transforms/LoopVectorize/X86/avx1.ll | 4 +- .../LoopVectorize/X86/constant-vector-operand.ll | 2 +- .../Transforms/LoopVectorize/X86/cost-model.ll | 6 +- .../LoopVectorize/X86/fp32_to_uint32-cost-model.ll | 2 +- .../LoopVectorize/X86/fp64_to_uint32-cost-model.ll | 4 +- .../LoopVectorize/X86/fp_to_sint8-cost-model.ll | 2 +- .../Transforms/LoopVectorize/X86/gather-cost.ll | 14 +- .../Transforms/LoopVectorize/X86/gcc-examples.ll | 6 +- .../X86/illegal-parallel-loop-uniform-write.ll | 4 +- .../LoopVectorize/X86/masked_load_store.ll | 150 ++++++++++----------- .../LoopVectorize/X86/metadata-enable.ll | 12 +- .../LoopVectorize/X86/min-trip-count-switch.ll | 2 +- .../test/Transforms/LoopVectorize/X86/no-vector.ll | 2 +- .../X86/parallel-loops-after-reg2mem.ll | 14 +- .../Transforms/LoopVectorize/X86/parallel-loops.ll | 18 +-- .../test/Transforms/LoopVectorize/X86/powof2div.ll | 4 +- .../LoopVectorize/X86/reduction-crash.ll | 4 +- .../Transforms/LoopVectorize/X86/small-size.ll | 16 +-- .../test/Transforms/LoopVectorize/X86/tripcount.ll | 2 +- .../LoopVectorize/X86/uint64_to_fp64-cost-model.ll | 2 +- .../test/Transforms/LoopVectorize/X86/unroll-pm.ll | 2 +- .../LoopVectorize/X86/unroll-small-loops.ll | 10 +- .../LoopVectorize/X86/unroll_selection.ll | 4 +- .../Transforms/LoopVectorize/X86/vect.omp.force.ll | 4 +- .../LoopVectorize/X86/vect.omp.force.small-tc.ll | 8 +- .../LoopVectorize/X86/vector-scalar-select-cost.ll | 8 +- .../LoopVectorize/X86/vector_ptr_load_store.ll | 8 +- .../X86/vectorization-remarks-missed.ll | 4 +- .../LoopVectorize/X86/vectorization-remarks.ll | 4 +- 31 files changed, 166 insertions(+), 166 deletions(-) (limited to 'llvm/test/Transforms/LoopVectorize/X86') diff --git a/llvm/test/Transforms/LoopVectorize/X86/already-vectorized.ll b/llvm/test/Transforms/LoopVectorize/X86/already-vectorized.ll index dcf2c6e70c4..248d6dc90bd 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/already-vectorized.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/already-vectorized.ll @@ -22,7 +22,7 @@ for.body: ; preds = %for.body, %entry %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], [255 x i32]* @a, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %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/llvm/test/Transforms/LoopVectorize/X86/assume.ll b/llvm/test/Transforms/LoopVectorize/X86/assume.ll index c036bba07ce..4fd378d1a0a 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/assume.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/assume.ll @@ -23,7 +23,7 @@ entry: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds float, float* %b, i64 %indvars.iv - %0 = load float* %arrayidx, align 4 + %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 @@ -49,12 +49,12 @@ attributes #1 = { nounwind } define void @test2(%struct.data* nocapture readonly %d) #0 { entry: %b = getelementptr inbounds %struct.data, %struct.data* %d, i64 0, i32 1 - %0 = load float** %b, align 8 + %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, %struct.data* %d, i64 0, i32 0 - %1 = load float** %a, align 8 + %1 = load float*, float** %a, align 8 %ptrint2 = ptrtoint float* %1 to i64 %maskedptr3 = and i64 %ptrint2, 31 %maskcond4 = icmp eq i64 %maskedptr3, 0 @@ -85,7 +85,7 @@ 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, float* %0, i64 %indvars.iv - %2 = load float* %arrayidx, align 4 + %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, float* %1, i64 %indvars.iv diff --git a/llvm/test/Transforms/LoopVectorize/X86/avx1.ll b/llvm/test/Transforms/LoopVectorize/X86/avx1.ll index 95088df5c3f..37977c43ac3 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/avx1.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/avx1.ll @@ -13,7 +13,7 @@ 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, float* %a, i64 %indvars.iv - %3 = load float* %2, align 4 + %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 @@ -36,7 +36,7 @@ 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, i64* %a, i64 %indvars.iv - %3 = load i64* %2, align 4 + %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/llvm/test/Transforms/LoopVectorize/X86/constant-vector-operand.ll b/llvm/test/Transforms/LoopVectorize/X86/constant-vector-operand.ll index 106bd84fc7c..d75b1d940ae 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/constant-vector-operand.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/constant-vector-operand.ll @@ -16,7 +16,7 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @B, i64 0, i64 %indvars.iv - %0 = load i32* %arrayidx, align 4 + %0 = load i32, i32* %arrayidx, align 4 %shl = ashr i32 %0, 3 %arrayidx2 = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv store i32 %shl, i32* %arrayidx2, align 4 diff --git a/llvm/test/Transforms/LoopVectorize/X86/cost-model.ll b/llvm/test/Transforms/LoopVectorize/X86/cost-model.ll index 190e130b609..013657102e6 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/cost-model.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/cost-model.ll @@ -22,12 +22,12 @@ 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], [2048 x i32]* @c, i64 0, i64 %0 - %1 = load i32* %arrayidx, align 8 + %1 = load i32, i32* %arrayidx, align 8 %idxprom1 = sext i32 %1 to i64 %arrayidx2 = getelementptr inbounds [2048 x i32], [2048 x i32]* @b, i64 0, i64 %idxprom1 - %2 = load i32* %arrayidx2, align 4 + %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* %arrayidx4, align 4 + %3 = load i32, i32* %arrayidx4, align 4 %idxprom5 = sext i32 %3 to i64 %arrayidx6 = getelementptr inbounds [2048 x i32], [2048 x i32]* @a, i64 0, i64 %idxprom5 store i32 %2, i32* %arrayidx6, align 4 diff --git a/llvm/test/Transforms/LoopVectorize/X86/fp32_to_uint32-cost-model.ll b/llvm/test/Transforms/LoopVectorize/X86/fp32_to_uint32-cost-model.ll index 627ae0076b0..4a56d6b5ebf 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/fp32_to_uint32-cost-model.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/fp32_to_uint32-cost-model.ll @@ -21,7 +21,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 [10000 x float], [10000 x float]* @float_array, i64 0, i64 %indvars.iv - %1 = load float* %arrayidx, align 4 + %1 = load float, float* %arrayidx, align 4 %conv = fptoui float %1 to i32 %arrayidx2 = getelementptr inbounds [10000 x i32], [10000 x i32]* @unsigned_array, i64 0, i64 %indvars.iv store i32 %conv, i32* %arrayidx2, align 4 diff --git a/llvm/test/Transforms/LoopVectorize/X86/fp64_to_uint32-cost-model.ll b/llvm/test/Transforms/LoopVectorize/X86/fp64_to_uint32-cost-model.ll index 7c1dfe39236..c066afcfa63 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/fp64_to_uint32-cost-model.ll +++ b/llvm/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 @@ -23,7 +23,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 [10000 x double], [10000 x double]* @double_array, i64 0, i64 %indvars.iv - %1 = load double* %arrayidx, align 8 + %1 = load double, double* %arrayidx, align 8 %conv = fptoui double %1 to i32 %arrayidx2 = getelementptr inbounds [10000 x i32], [10000 x i32]* @unsigned_array, i64 0, i64 %indvars.iv store i32 %conv, i32* %arrayidx2, align 4 diff --git a/llvm/test/Transforms/LoopVectorize/X86/fp_to_sint8-cost-model.ll b/llvm/test/Transforms/LoopVectorize/X86/fp_to_sint8-cost-model.ll index 106c9d66623..b3a0710545d 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/fp_to_sint8-cost-model.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/fp_to_sint8-cost-model.ll @@ -12,7 +12,7 @@ entry: for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds float, float* %b, i64 %indvars.iv - %tmp = load float* %arrayidx, align 4 + %tmp = load float, float* %arrayidx, align 4 %conv = fptosi float %tmp to i8 %arrayidx2 = getelementptr inbounds i8, i8* %a, i64 %indvars.iv store i8 %conv, i8* %arrayidx2, align 4 diff --git a/llvm/test/Transforms/LoopVectorize/X86/gather-cost.ll b/llvm/test/Transforms/LoopVectorize/X86/gather-cost.ll index 8c9cb653da0..f0e6c8f205c 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/gather-cost.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/gather-cost.ll @@ -32,23 +32,23 @@ for.body: %add = add i64 %v.055, %offset %mul = mul i64 %add, 3 %arrayidx = getelementptr inbounds [1536 x float], [1536 x float]* @src_data, i64 0, i64 %mul - %0 = load float* %arrayidx, align 4 + %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* %arrayidx2, align 4 + %1 = load float, float* %arrayidx2, align 4 %mul3 = fmul fast float %0, %1 %arrayidx4 = getelementptr inbounds [512 x float], [512 x float]* @kernel2, i64 0, i64 %v.055 - %2 = load float* %arrayidx4, align 4 + %2 = load float, float* %arrayidx4, align 4 %mul5 = fmul fast float %mul3, %2 %arrayidx6 = getelementptr inbounds [512 x float], [512 x float]* @kernel3, i64 0, i64 %v.055 - %3 = load float* %arrayidx6, align 4 + %3 = load float, float* %arrayidx6, align 4 %mul7 = fmul fast float %mul5, %3 %arrayidx8 = getelementptr inbounds [512 x float], [512 x float]* @kernel4, i64 0, i64 %v.055 - %4 = load float* %arrayidx8, align 4 + %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], [1536 x float]* @src_data, i64 0, i64 %arrayidx.sum - %5 = load float* %arrayidx11, align 4 + %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 @@ -56,7 +56,7 @@ for.body: %add20 = fadd fast float %g.056, %mul19 %arrayidx.sum52 = add i64 %mul, 2 %arrayidx21 = getelementptr inbounds [1536 x float], [1536 x float]* @src_data, i64 0, i64 %arrayidx.sum52 - %6 = load float* %arrayidx21, align 4 + %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/llvm/test/Transforms/LoopVectorize/X86/gcc-examples.ll b/llvm/test/Transforms/LoopVectorize/X86/gcc-examples.ll index eb846622262..c581f4bf2a6 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/gcc-examples.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/gcc-examples.ll @@ -29,9 +29,9 @@ define void @example1() nounwind uwtable ssp { ;