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/LoopRotate | |
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/LoopRotate')
-rw-r--r-- | llvm/test/Transforms/LoopRotate/PhiRename-1.ll | 28 | ||||
-rw-r--r-- | llvm/test/Transforms/LoopRotate/alloca.ll | 2 | ||||
-rw-r--r-- | llvm/test/Transforms/LoopRotate/dbgvalue.ll | 6 | ||||
-rw-r--r-- | llvm/test/Transforms/LoopRotate/indirectbr.ll | 2 | ||||
-rw-r--r-- | llvm/test/Transforms/LoopRotate/multiple-exits.ll | 2 | ||||
-rw-r--r-- | llvm/test/Transforms/LoopRotate/nosimplifylatch.ll | 4 | ||||
-rw-r--r-- | llvm/test/Transforms/LoopRotate/phi-duplicate.ll | 4 | ||||
-rw-r--r-- | llvm/test/Transforms/LoopRotate/simplifylatch.ll | 8 |
8 files changed, 28 insertions, 28 deletions
diff --git a/llvm/test/Transforms/LoopRotate/PhiRename-1.ll b/llvm/test/Transforms/LoopRotate/PhiRename-1.ll index 098fd98275c..8ec0fbf789d 100644 --- a/llvm/test/Transforms/LoopRotate/PhiRename-1.ll +++ b/llvm/test/Transforms/LoopRotate/PhiRename-1.ll @@ -36,59 +36,59 @@ entry: %op = alloca %struct.operator*, align 4 ; <%struct.operator**> [#uses=3] store i32 %arity, i32* %arity_addr store i32 0, i32* %c - %tmp1 = load %struct.list** @operators ; <%struct.list*> [#uses=1] + %tmp1 = load %struct.list*, %struct.list** @operators ; <%struct.list*> [#uses=1] store %struct.list* %tmp1, %struct.list** %l br label %bb21 bb: ; preds = %bb21 %tmp3 = getelementptr %struct.list, %struct.list* %tmp22, i32 0, i32 0 ; <i8**> [#uses=1] - %tmp4 = load i8** %tmp3 ; <i8*> [#uses=1] + %tmp4 = load i8*, i8** %tmp3 ; <i8*> [#uses=1] %tmp45 = bitcast i8* %tmp4 to %struct.operator* ; <%struct.operator*> [#uses=1] store %struct.operator* %tmp45, %struct.operator** %op - %tmp6 = load %struct.operator** %op ; <%struct.operator*> [#uses=1] + %tmp6 = load %struct.operator*, %struct.operator** %op ; <%struct.operator*> [#uses=1] %tmp7 = getelementptr %struct.operator, %struct.operator* %tmp6, i32 0, i32 5 ; <i32*> [#uses=1] - %tmp8 = load i32* %tmp7 ; <i32> [#uses=1] - %tmp9 = load i32* %arity_addr ; <i32> [#uses=1] + %tmp8 = load i32, i32* %tmp7 ; <i32> [#uses=1] + %tmp9 = load i32, i32* %arity_addr ; <i32> [#uses=1] icmp eq i32 %tmp8, %tmp9 ; <i1>:0 [#uses=1] zext i1 %0 to i8 ; <i8>:1 [#uses=1] icmp ne i8 %1, 0 ; <i1>:2 [#uses=1] br i1 %2, label %cond_true, label %cond_next cond_true: ; preds = %bb - %tmp10 = load %struct.operator** %op ; <%struct.operator*> [#uses=1] + %tmp10 = load %struct.operator*, %struct.operator** %op ; <%struct.operator*> [#uses=1] %tmp11 = getelementptr %struct.operator, %struct.operator* %tmp10, i32 0, i32 2 ; <i32*> [#uses=1] - %tmp12 = load i32* %tmp11 ; <i32> [#uses=1] - %tmp13 = load %struct.FILE** @outfile ; <%struct.FILE*> [#uses=1] + %tmp12 = load i32, i32* %tmp11 ; <i32> [#uses=1] + %tmp13 = load %struct.FILE*, %struct.FILE** @outfile ; <%struct.FILE*> [#uses=1] %tmp14 = getelementptr [11 x i8], [11 x i8]* @str1, i32 0, i32 0 ; <i8*> [#uses=1] %tmp15 = call i32 (%struct.FILE*, i8*, ...)* @fprintf( %struct.FILE* %tmp13, i8* %tmp14, i32 %tmp12 ) ; <i32> [#uses=0] - %tmp16 = load i32* %c ; <i32> [#uses=1] + %tmp16 = load i32, i32* %c ; <i32> [#uses=1] %tmp17 = add i32 %tmp16, 1 ; <i32> [#uses=1] store i32 %tmp17, i32* %c br label %cond_next cond_next: ; preds = %cond_true, %bb %tmp19 = getelementptr %struct.list, %struct.list* %tmp22, i32 0, i32 1 ; <%struct.list**> [#uses=1] - %tmp20 = load %struct.list** %tmp19 ; <%struct.list*> [#uses=1] + %tmp20 = load %struct.list*, %struct.list** %tmp19 ; <%struct.list*> [#uses=1] store %struct.list* %tmp20, %struct.list** %l br label %bb21 bb21: ; preds = %cond_next, %entry %l.in = phi %struct.list** [ @operators, %entry ], [ %tmp19, %cond_next ] - %tmp22 = load %struct.list** %l.in ; <%struct.list*> [#uses=1] + %tmp22 = load %struct.list*, %struct.list** %l.in ; <%struct.list*> [#uses=1] icmp ne %struct.list* %tmp22, null ; <i1>:3 [#uses=1] zext i1 %3 to i8 ; <i8>:4 [#uses=1] icmp ne i8 %4, 0 ; <i1>:5 [#uses=1] br i1 %5, label %bb, label %bb23 bb23: ; preds = %bb21 - %tmp24 = load i32* %c ; <i32> [#uses=1] + %tmp24 = load i32, i32* %c ; <i32> [#uses=1] store i32 %tmp24, i32* %tmp - %tmp25 = load i32* %tmp ; <i32> [#uses=1] + %tmp25 = load i32, i32* %tmp ; <i32> [#uses=1] store i32 %tmp25, i32* %retval br label %return return: ; preds = %bb23 - %retval26 = load i32* %retval ; <i32> [#uses=1] + %retval26 = load i32, i32* %retval ; <i32> [#uses=1] ret i32 %retval26 } diff --git a/llvm/test/Transforms/LoopRotate/alloca.ll b/llvm/test/Transforms/LoopRotate/alloca.ll index fd217ea8dcf..bbcfb39c372 100644 --- a/llvm/test/Transforms/LoopRotate/alloca.ll +++ b/llvm/test/Transforms/LoopRotate/alloca.ll @@ -14,7 +14,7 @@ declare void @use(i8*) define void @test() { entry: - %end = load i16* @e + %end = load i16, i16* @e br label %loop loop: diff --git a/llvm/test/Transforms/LoopRotate/dbgvalue.ll b/llvm/test/Transforms/LoopRotate/dbgvalue.ll index 1b9e9bfe621..1d6a864c1d5 100644 --- a/llvm/test/Transforms/LoopRotate/dbgvalue.ll +++ b/llvm/test/Transforms/LoopRotate/dbgvalue.ll @@ -61,12 +61,12 @@ for.cond: br i1 %cmp, label %for.end, label %for.body for.body: - %0 = load i64* @channelColumns, align 8 + %0 = load i64, i64* @channelColumns, align 8 %mul = mul i64 %0, %row %add = add i64 %mul, %i.0 - %1 = load i8** @horzPlane, align 8 + %1 = load i8*, i8** @horzPlane, align 8 %arrayidx = getelementptr inbounds i8, i8* %1, i64 %add - %2 = load i8* %arrayidx, align 1 + %2 = load i8, i8* %arrayidx, align 1 %tobool = icmp eq i8 %2, 0 br i1 %tobool, label %for.inc, label %for.end diff --git a/llvm/test/Transforms/LoopRotate/indirectbr.ll b/llvm/test/Transforms/LoopRotate/indirectbr.ll index 9c82aa88346..2ccc54697ae 100644 --- a/llvm/test/Transforms/LoopRotate/indirectbr.ll +++ b/llvm/test/Transforms/LoopRotate/indirectbr.ll @@ -12,7 +12,7 @@ while.body: ; preds = %while.cond br label %indirectgoto run_opcode: ; preds = %indirectgoto - %tmp276 = load i8* undef ; <i8> [#uses=1] + %tmp276 = load i8, i8* undef ; <i8> [#uses=1] br label %indirectgoto if.else295: ; preds = %divide_late diff --git a/llvm/test/Transforms/LoopRotate/multiple-exits.ll b/llvm/test/Transforms/LoopRotate/multiple-exits.ll index e97d3df2ae8..f31ed7f1c5b 100644 --- a/llvm/test/Transforms/LoopRotate/multiple-exits.ll +++ b/llvm/test/Transforms/LoopRotate/multiple-exits.ll @@ -22,7 +22,7 @@ for.cond1: ; preds = %for.cond, %land.rhs land.rhs: ; preds = %for.cond1 %conv = zext i32 %i.1 to i64 %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* %a, i64 0, i64 %conv - %0 = load i32* %arrayidx, align 4 + %0 = load i32, i32* %arrayidx, align 4 %add = add i32 %0, %sum.1 %cmp4 = icmp ugt i32 %add, 1000 %inc = add i32 %i.1, 1 diff --git a/llvm/test/Transforms/LoopRotate/nosimplifylatch.ll b/llvm/test/Transforms/LoopRotate/nosimplifylatch.ll index da3ec553114..07ff6643c6d 100644 --- a/llvm/test/Transforms/LoopRotate/nosimplifylatch.ll +++ b/llvm/test/Transforms/LoopRotate/nosimplifylatch.ll @@ -18,8 +18,8 @@ for.cond: ; preds = %for.inc, %entry br i1 %lnot.i, label %for.end, label %for.body for.body: ; preds = %for.cond - %0 = load i32* %coerce.val.ip9, align 4 - %1 = load i32* %__value_, align 4 + %0 = load i32, i32* %coerce.val.ip9, align 4 + %1 = load i32, i32* %__value_, align 4 %cmp = icmp eq i32 %0, %1 br i1 %cmp, label %for.end, label %for.inc diff --git a/llvm/test/Transforms/LoopRotate/phi-duplicate.ll b/llvm/test/Transforms/LoopRotate/phi-duplicate.ll index 88170d6bc60..46ee5961ba5 100644 --- a/llvm/test/Transforms/LoopRotate/phi-duplicate.ll +++ b/llvm/test/Transforms/LoopRotate/phi-duplicate.ll @@ -14,10 +14,10 @@ for.cond: ; preds = %for.body, %entry for.body: ; preds = %for.cond %arrayidx = getelementptr inbounds double, double* %G, i64 %j.0 ; <double*> [#uses=1] - %tmp3 = load double* %arrayidx ; <double> [#uses=1] + %tmp3 = load double, double* %arrayidx ; <double> [#uses=1] %sub = sub i64 %j.0, 1 ; <i64> [#uses=1] %arrayidx6 = getelementptr inbounds double, double* %G, i64 %sub ; <double*> [#uses=1] - %tmp7 = load double* %arrayidx6 ; <double> [#uses=1] + %tmp7 = load double, double* %arrayidx6 ; <double> [#uses=1] %add = fadd double %tmp3, %tmp7 ; <double> [#uses=1] %arrayidx10 = getelementptr inbounds double, double* %G, i64 %j.0 ; <double*> [#uses=1] store double %add, double* %arrayidx10 diff --git a/llvm/test/Transforms/LoopRotate/simplifylatch.ll b/llvm/test/Transforms/LoopRotate/simplifylatch.ll index 4bb3c79fb18..215622fe302 100644 --- a/llvm/test/Transforms/LoopRotate/simplifylatch.ll +++ b/llvm/test/Transforms/LoopRotate/simplifylatch.ll @@ -14,7 +14,7 @@ bb: ; preds = %bb4, %entry %mode.0 = phi i8 [ 0, %entry ], [ %indvar.next, %bb4 ] ; <i8> [#uses=4] zext i8 %mode.0 to i32 ; <i32>:1 [#uses=1] getelementptr [4 x i32], [4 x i32]* @mode_table, i32 0, i32 %1 ; <i32*>:2 [#uses=1] - load i32* %2, align 4 ; <i32>:3 [#uses=1] + load i32, i32* %2, align 4 ; <i32>:3 [#uses=1] icmp eq i32 %3, %0 ; <i1>:4 [#uses=1] br i1 %4, label %bb1, label %bb2 @@ -40,7 +40,7 @@ declare void @raise_exception() noreturn ;CHECK: for.body.lr.ph: ;CHECK-NEXT: %arrayidx1 = getelementptr inbounds i8, i8* %CurPtr, i64 0 -;CHECK-NEXT: %0 = load i8* %arrayidx1, align 1 +;CHECK-NEXT: %0 = load i8, i8* %arrayidx1, align 1 ;CHECK-NEXT: %conv2 = sext i8 %0 to i32 ;CHECK-NEXT: br label %for.body @@ -56,10 +56,10 @@ for.cond: ; preds = %for.inc, %entry for.body: ; preds = %for.cond %idxprom = zext i32 %i.0 to i64 %arrayidx = getelementptr inbounds i8, i8* %CurPtr, i64 %idxprom - %0 = load i8* %arrayidx, align 1 + %0 = load i8, i8* %arrayidx, align 1 %conv = sext i8 %0 to i32 %arrayidx1 = getelementptr inbounds i8, i8* %CurPtr, i64 0 - %1 = load i8* %arrayidx1, align 1 + %1 = load i8, i8* %arrayidx1, align 1 %conv2 = sext i8 %1 to i32 %cmp3 = icmp ne i32 %conv, %conv2 br i1 %cmp3, label %return, label %for.inc |