diff options
| author | David Blaikie <dblaikie@gmail.com> | 2015-02-27 21:17:42 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2015-02-27 21:17:42 +0000 |
| commit | a79ac14fa68297f9888bc70a10df5ed9b8864e38 (patch) | |
| tree | 8d8217a8928e3ee599bdde405e2e178b3a55b645 /llvm/test/Transforms/LoopSimplify | |
| parent | 83687fb9e654c9d0086e7f6b728c26fa0b729e71 (diff) | |
| download | bcm5719-llvm-a79ac14fa68297f9888bc70a10df5ed9b8864e38.tar.gz bcm5719-llvm-a79ac14fa68297f9888bc70a10df5ed9b8864e38.zip | |
[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
Diffstat (limited to 'llvm/test/Transforms/LoopSimplify')
6 files changed, 23 insertions, 23 deletions
diff --git a/llvm/test/Transforms/LoopSimplify/2003-08-15-PreheadersFail.ll b/llvm/test/Transforms/LoopSimplify/2003-08-15-PreheadersFail.ll index 772cbb3cd3b..c33652896c4 100644 --- a/llvm/test/Transforms/LoopSimplify/2003-08-15-PreheadersFail.ll +++ b/llvm/test/Transforms/LoopSimplify/2003-08-15-PreheadersFail.ll @@ -9,28 +9,28 @@ define i32 @_yylex() { br label %loopentry.0 loopentry.0: ; preds = %else.26, %0 store i32* getelementptr ([16386 x i32]* @yy_state_buf, i64 0, i64 0), i32** @yy_state_ptr - %tmp.35 = load i32** @yy_state_ptr ; <i32*> [#uses=2] + %tmp.35 = load i32*, i32** @yy_state_ptr ; <i32*> [#uses=2] %inc.0 = getelementptr i32, i32* %tmp.35, i64 1 ; <i32*> [#uses=1] store i32* %inc.0, i32** @yy_state_ptr - %tmp.36 = load i32* null ; <i32> [#uses=1] + %tmp.36 = load i32, i32* null ; <i32> [#uses=1] store i32 %tmp.36, i32* %tmp.35 br label %loopexit.2 loopexit.2: ; preds = %else.26, %loopexit.2, %loopentry.0 store i8* null, i8** null - %tmp.91 = load i32* null ; <i32> [#uses=1] + %tmp.91 = load i32, i32* null ; <i32> [#uses=1] %tmp.92 = sext i32 %tmp.91 to i64 ; <i64> [#uses=1] %tmp.93 = getelementptr [787 x i16], [787 x i16]* @yy_base, i64 0, i64 %tmp.92 ; <i16*> [#uses=1] - %tmp.94 = load i16* %tmp.93 ; <i16> [#uses=1] + %tmp.94 = load i16, i16* %tmp.93 ; <i16> [#uses=1] %tmp.95 = icmp ne i16 %tmp.94, 4394 ; <i1> [#uses=1] br i1 %tmp.95, label %loopexit.2, label %yy_find_action yy_find_action: ; preds = %else.26, %loopexit.2 br label %loopentry.3 loopentry.3: ; preds = %then.9, %shortcirc_done.0, %yy_find_action - %tmp.105 = load i32* @yy_lp ; <i32> [#uses=1] + %tmp.105 = load i32, i32* @yy_lp ; <i32> [#uses=1] %tmp.106 = icmp ne i32 %tmp.105, 0 ; <i1> [#uses=1] br i1 %tmp.106, label %shortcirc_next.0, label %shortcirc_done.0 shortcirc_next.0: ; preds = %loopentry.3 - %tmp.114 = load i16* null ; <i16> [#uses=1] + %tmp.114 = load i16, i16* null ; <i16> [#uses=1] %tmp.115 = sext i16 %tmp.114 to i32 ; <i32> [#uses=1] %tmp.116 = icmp slt i32 0, %tmp.115 ; <i1> [#uses=1] br label %shortcirc_done.0 @@ -38,7 +38,7 @@ shortcirc_done.0: ; preds = %shortcirc_next.0, %loopentry.3 %shortcirc_val.0 = phi i1 [ false, %loopentry.3 ], [ %tmp.116, %shortcirc_next.0 ] ; <i1> [#uses=1] br i1 %shortcirc_val.0, label %else.0, label %loopentry.3 else.0: ; preds = %shortcirc_done.0 - %tmp.144 = load i32* null ; <i32> [#uses=1] + %tmp.144 = load i32, i32* null ; <i32> [#uses=1] %tmp.145 = and i32 %tmp.144, 8192 ; <i32> [#uses=1] %tmp.146 = icmp ne i32 %tmp.145, 0 ; <i1> [#uses=1] br i1 %tmp.146, label %then.9, label %else.26 diff --git a/llvm/test/Transforms/LoopSimplify/2003-12-10-ExitBlocksProblem.ll b/llvm/test/Transforms/LoopSimplify/2003-12-10-ExitBlocksProblem.ll index fb39f05c6db..32b632220d3 100644 --- a/llvm/test/Transforms/LoopSimplify/2003-12-10-ExitBlocksProblem.ll +++ b/llvm/test/Transforms/LoopSimplify/2003-12-10-ExitBlocksProblem.ll @@ -14,15 +14,15 @@ entry: store i32 123, i32* @G br label %loopentry.i loopentry.i: ; preds = %endif.1.i, %entry - %tmp.0.i = load i32* @G ; <i32> [#uses=1] + %tmp.0.i = load i32, i32* @G ; <i32> [#uses=1] %tmp.1.i = icmp eq i32 %tmp.0.i, 123 ; <i1> [#uses=1] br i1 %tmp.1.i, label %Out.i, label %endif.0.i endif.0.i: ; preds = %loopentry.i - %tmp.3.i = load i32* @G ; <i32> [#uses=1] + %tmp.3.i = load i32, i32* @G ; <i32> [#uses=1] %tmp.4.i = icmp eq i32 %tmp.3.i, 126 ; <i1> [#uses=1] br i1 %tmp.4.i, label %ExitBlock.i, label %endif.1.i endif.1.i: ; preds = %endif.0.i - %tmp.6.i = load i32* @G ; <i32> [#uses=1] + %tmp.6.i = load i32, i32* @G ; <i32> [#uses=1] %inc.i = add i32 %tmp.6.i, 1 ; <i32> [#uses=1] store i32 %inc.i, i32* @G br label %loopentry.i @@ -30,7 +30,7 @@ Out.i: ; preds = %loopentry.i store i32 0, i32* @G br label %ExitBlock.i ExitBlock.i: ; preds = %Out.i, %endif.0.i - %tmp.7.i = load i32* @G ; <i32> [#uses=1] + %tmp.7.i = load i32, i32* @G ; <i32> [#uses=1] ret i32 %tmp.7.i } diff --git a/llvm/test/Transforms/LoopSimplify/ashr-crash.ll b/llvm/test/Transforms/LoopSimplify/ashr-crash.ll index c58903d49d5..b5cc1449cec 100644 --- a/llvm/test/Transforms/LoopSimplify/ashr-crash.ll +++ b/llvm/test/Transforms/LoopSimplify/ashr-crash.ll @@ -51,10 +51,10 @@ for.cond1: ; preds = %for.cond, %for.body br i1 %cmp2, label %for.body3, label %for.inc7 for.body3: ; preds = %for.cond1 - %0 = load i32* @c, align 4 + %0 = load i32, i32* @c, align 4 %cmp4 = icmp sge i32 %storemerge1, %0 %conv = zext i1 %cmp4 to i32 - %1 = load i32* @d, align 4 + %1 = load i32, i32* @d, align 4 %add = add nsw i32 %conv, %1 %sext = shl i32 %add, 16 %conv6 = ashr exact i32 %sext, 16 @@ -63,7 +63,7 @@ for.body3: ; preds = %for.cond1 br label %for.cond1 for.inc7: ; preds = %for.cond1 - %2 = load i32* @d, align 4 + %2 = load i32, i32* @d, align 4 %inc8 = add nsw i32 %2, 1 br label %for.cond diff --git a/llvm/test/Transforms/LoopSimplify/merge-exits.ll b/llvm/test/Transforms/LoopSimplify/merge-exits.ll index 0e1f0be87ce..5cdf8148778 100644 --- a/llvm/test/Transforms/LoopSimplify/merge-exits.ll +++ b/llvm/test/Transforms/LoopSimplify/merge-exits.ll @@ -15,18 +15,18 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 define float @test1(float* %pTmp1, float* %peakWeight, i32 %bandEdgeIndex) nounwind { entry: - %t0 = load float* %peakWeight, align 4 + %t0 = load float, float* %peakWeight, align 4 br label %bb1 bb: ; preds = %bb2 %t1 = sext i32 %hiPart.0 to i64 %t2 = getelementptr float, float* %pTmp1, i64 %t1 - %t3 = load float* %t2, align 4 + %t3 = load float, float* %t2, align 4 %t4 = fadd float %t3, %distERBhi.0 %t5 = add i32 %hiPart.0, 1 %t6 = sext i32 %t5 to i64 %t7 = getelementptr float, float* %peakWeight, i64 %t6 - %t8 = load float* %t7, align 4 + %t8 = load float, float* %t7, align 4 %t9 = fadd float %t8, %peakCount.0 br label %bb1 diff --git a/llvm/test/Transforms/LoopSimplify/phi-node-simplify.ll b/llvm/test/Transforms/LoopSimplify/phi-node-simplify.ll index 52b7aa58aef..676f467e1b4 100644 --- a/llvm/test/Transforms/LoopSimplify/phi-node-simplify.ll +++ b/llvm/test/Transforms/LoopSimplify/phi-node-simplify.ll @@ -28,13 +28,13 @@ no_exit.2: ; preds = %loopexit.2, %no_exit.2, %loopentry.1 %b.1.4 = getelementptr i32, i32* %b.1.4.ph, i64 %gep.upgrd.3 ; <i32*> [#uses=1] %inc.0.rec = add i32 %b.1.4.rec, 1 ; <i32> [#uses=2] %inc.0 = getelementptr i32, i32* %a.0.4.ph, i32 %inc.0.rec ; <i32*> [#uses=2] - %tmp.13 = load i32* %a.0.4 ; <i32> [#uses=1] + %tmp.13 = load i32, i32* %a.0.4 ; <i32> [#uses=1] %inc.1 = getelementptr i32, i32* %b.1.4.ph, i32 %inc.0.rec ; <i32*> [#uses=1] - %tmp.15 = load i32* %b.1.4 ; <i32> [#uses=1] - %tmp.18 = load i32* %c.2.4 ; <i32> [#uses=1] + %tmp.15 = load i32, i32* %b.1.4 ; <i32> [#uses=1] + %tmp.18 = load i32, i32* %c.2.4 ; <i32> [#uses=1] %tmp.16 = mul i32 %tmp.15, %tmp.13 ; <i32> [#uses=1] %tmp.19 = mul i32 %tmp.16, %tmp.18 ; <i32> [#uses=1] - %tmp.20 = load i32* @Z ; <i32> [#uses=1] + %tmp.20 = load i32, i32* @Z ; <i32> [#uses=1] %tmp.21 = add i32 %tmp.19, %tmp.20 ; <i32> [#uses=1] store i32 %tmp.21, i32* @Z %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=2] diff --git a/llvm/test/Transforms/LoopSimplify/preserve-scev.ll b/llvm/test/Transforms/LoopSimplify/preserve-scev.ll index 89626b2af51..bc6d35c3d72 100644 --- a/llvm/test/Transforms/LoopSimplify/preserve-scev.ll +++ b/llvm/test/Transforms/LoopSimplify/preserve-scev.ll @@ -15,7 +15,7 @@ for.cond: ; preds = %if.then5, %if.end, %0 = phi i32 [ 0, %entry ], [ %add, %if.end ], [ %add, %if.then5 ] %add = add i32 %0, 1 %cmp = icmp slt i32 %0, 1 - %tmp1 = load i32* @maxStat, align 4 + %tmp1 = load i32, i32* @maxStat, align 4 br i1 %cmp, label %for.body, label %for.cond14.preheader for.cond14.preheader: ; preds = %for.cond @@ -39,7 +39,7 @@ for.body18: ; preds = %for.body18, %for.co %i13.027 = phi i32 [ %1, %for.body18 ], [ 0, %for.cond14.preheader ] call void @foo() nounwind %1 = add nsw i32 %i13.027, 1 - %tmp16 = load i32* @maxStat, align 4 + %tmp16 = load i32, i32* @maxStat, align 4 %cmp17 = icmp slt i32 %1, %tmp16 br i1 %cmp17, label %for.body18, label %return |

