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/CodeGen/AArch64/arm64-addr-mode-folding.ll | |
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/CodeGen/AArch64/arm64-addr-mode-folding.ll')
-rw-r--r-- | llvm/test/CodeGen/AArch64/arm64-addr-mode-folding.ll | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/llvm/test/CodeGen/AArch64/arm64-addr-mode-folding.ll b/llvm/test/CodeGen/AArch64/arm64-addr-mode-folding.ll index 17676472c87..3197f5bd27e 100644 --- a/llvm/test/CodeGen/AArch64/arm64-addr-mode-folding.ll +++ b/llvm/test/CodeGen/AArch64/arm64-addr-mode-folding.ll @@ -11,12 +11,12 @@ define i32 @fct(i32 %i1, i32 %i2) { ; _CHECK-NOT_: , sxtw] entry: %idxprom = sext i32 %i1 to i64 - %0 = load i8** @block, align 8 + %0 = load i8*, i8** @block, align 8 %arrayidx = getelementptr inbounds i8, i8* %0, i64 %idxprom - %1 = load i8* %arrayidx, align 1 + %1 = load i8, i8* %arrayidx, align 1 %idxprom1 = sext i32 %i2 to i64 %arrayidx2 = getelementptr inbounds i8, i8* %0, i64 %idxprom1 - %2 = load i8* %arrayidx2, align 1 + %2 = load i8, i8* %arrayidx2, align 1 %cmp = icmp eq i8 %1, %2 br i1 %cmp, label %if.end, label %if.then @@ -30,10 +30,10 @@ if.end: ; preds = %entry %inc9 = add nsw i32 %i2, 1 %idxprom10 = sext i32 %inc to i64 %arrayidx11 = getelementptr inbounds i8, i8* %0, i64 %idxprom10 - %3 = load i8* %arrayidx11, align 1 + %3 = load i8, i8* %arrayidx11, align 1 %idxprom12 = sext i32 %inc9 to i64 %arrayidx13 = getelementptr inbounds i8, i8* %0, i64 %idxprom12 - %4 = load i8* %arrayidx13, align 1 + %4 = load i8, i8* %arrayidx13, align 1 %cmp16 = icmp eq i8 %3, %4 br i1 %cmp16, label %if.end23, label %if.then18 @@ -47,10 +47,10 @@ if.end23: ; preds = %if.end %inc25 = add nsw i32 %i2, 2 %idxprom26 = sext i32 %inc24 to i64 %arrayidx27 = getelementptr inbounds i8, i8* %0, i64 %idxprom26 - %5 = load i8* %arrayidx27, align 1 + %5 = load i8, i8* %arrayidx27, align 1 %idxprom28 = sext i32 %inc25 to i64 %arrayidx29 = getelementptr inbounds i8, i8* %0, i64 %idxprom28 - %6 = load i8* %arrayidx29, align 1 + %6 = load i8, i8* %arrayidx29, align 1 %cmp32 = icmp eq i8 %5, %6 br i1 %cmp32, label %return, label %if.then34 @@ -71,12 +71,12 @@ define i32 @fct1(i32 %i1, i32 %i2) optsize { ; CHECK: , sxtw] entry: %idxprom = sext i32 %i1 to i64 - %0 = load i8** @block, align 8 + %0 = load i8*, i8** @block, align 8 %arrayidx = getelementptr inbounds i8, i8* %0, i64 %idxprom - %1 = load i8* %arrayidx, align 1 + %1 = load i8, i8* %arrayidx, align 1 %idxprom1 = sext i32 %i2 to i64 %arrayidx2 = getelementptr inbounds i8, i8* %0, i64 %idxprom1 - %2 = load i8* %arrayidx2, align 1 + %2 = load i8, i8* %arrayidx2, align 1 %cmp = icmp eq i8 %1, %2 br i1 %cmp, label %if.end, label %if.then @@ -90,10 +90,10 @@ if.end: ; preds = %entry %inc9 = add nsw i32 %i2, 1 %idxprom10 = sext i32 %inc to i64 %arrayidx11 = getelementptr inbounds i8, i8* %0, i64 %idxprom10 - %3 = load i8* %arrayidx11, align 1 + %3 = load i8, i8* %arrayidx11, align 1 %idxprom12 = sext i32 %inc9 to i64 %arrayidx13 = getelementptr inbounds i8, i8* %0, i64 %idxprom12 - %4 = load i8* %arrayidx13, align 1 + %4 = load i8, i8* %arrayidx13, align 1 %cmp16 = icmp eq i8 %3, %4 br i1 %cmp16, label %if.end23, label %if.then18 @@ -107,10 +107,10 @@ if.end23: ; preds = %if.end %inc25 = add nsw i32 %i2, 2 %idxprom26 = sext i32 %inc24 to i64 %arrayidx27 = getelementptr inbounds i8, i8* %0, i64 %idxprom26 - %5 = load i8* %arrayidx27, align 1 + %5 = load i8, i8* %arrayidx27, align 1 %idxprom28 = sext i32 %inc25 to i64 %arrayidx29 = getelementptr inbounds i8, i8* %0, i64 %idxprom28 - %6 = load i8* %arrayidx29, align 1 + %6 = load i8, i8* %arrayidx29, align 1 %cmp32 = icmp eq i8 %5, %6 br i1 %cmp32, label %return, label %if.then34 @@ -136,8 +136,8 @@ entry: if.then: ; preds = %entry %idxprom = zext i8 %c to i64 %arrayidx = getelementptr inbounds i32, i32* %array, i64 %idxprom - %0 = load volatile i32* %arrayidx, align 4 - %1 = load volatile i32* %arrayidx, align 4 + %0 = load volatile i32, i32* %arrayidx, align 4 + %1 = load volatile i32, i32* %arrayidx, align 4 %add3 = add nsw i32 %1, %0 br label %if.end @@ -160,8 +160,8 @@ entry: if.then: ; preds = %entry %idxprom = zext i8 %c to i64 %arrayidx = getelementptr inbounds i32, i32* %array, i64 %idxprom - %0 = load volatile i32* %arrayidx, align 4 - %1 = load volatile i32* %arrayidx, align 4 + %0 = load volatile i32, i32* %arrayidx, align 4 + %1 = load volatile i32, i32* %arrayidx, align 4 %add3 = add nsw i32 %1, %0 br label %if.end |