summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/ScalarRepl/union-pointer.ll
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-02-27 21:17:42 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-02-27 21:17:42 +0000
commita79ac14fa68297f9888bc70a10df5ed9b8864e38 (patch)
tree8d8217a8928e3ee599bdde405e2e178b3a55b645 /llvm/test/Transforms/ScalarRepl/union-pointer.ll
parent83687fb9e654c9d0086e7f6b728c26fa0b729e71 (diff)
downloadbcm5719-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/ScalarRepl/union-pointer.ll')
-rw-r--r--llvm/test/Transforms/ScalarRepl/union-pointer.ll12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/test/Transforms/ScalarRepl/union-pointer.ll b/llvm/test/Transforms/ScalarRepl/union-pointer.ll
index 82a2c3b2092..6a5db1c4d6b 100644
--- a/llvm/test/Transforms/ScalarRepl/union-pointer.ll
+++ b/llvm/test/Transforms/ScalarRepl/union-pointer.ll
@@ -14,7 +14,7 @@ define i8* @test(i16* %X) {
%X_addr = alloca i16* ; <i16**> [#uses=2]
store i16* %X, i16** %X_addr
%X_addr.upgrd.1 = bitcast i16** %X_addr to i8** ; <i8**> [#uses=1]
- %tmp = load i8** %X_addr.upgrd.1 ; <i8*> [#uses=1]
+ %tmp = load i8*, i8** %X_addr.upgrd.1 ; <i8*> [#uses=1]
ret i8* %tmp
}
@@ -26,7 +26,7 @@ define i8 addrspace(1)* @test_as1(i16 addrspace(1)* %x) {
%x_addr = alloca i16 addrspace(1)*
store i16 addrspace(1)* %x, i16 addrspace(1)** %x_addr
%x_addr.upgrd.1 = bitcast i16 addrspace(1)** %x_addr to i8 addrspace(1)**
- %tmp = load i8 addrspace(1)** %x_addr.upgrd.1
+ %tmp = load i8 addrspace(1)*, i8 addrspace(1)** %x_addr.upgrd.1
ret i8 addrspace(1)* %tmp
}
@@ -39,7 +39,7 @@ define i8 addrspace(1)* @test_as1_array(i16 addrspace(1)* %x) {
%elem1 = getelementptr [4 x i16 addrspace(1)*], [4 x i16 addrspace(1)*]* %as_ptr_array, i32 0, i32 1
store i16 addrspace(1)* %x, i16 addrspace(1)** %elem1
%elem1.cast = bitcast i16 addrspace(1)** %elem1 to i8 addrspace(1)**
- %tmp = load i8 addrspace(1)** %elem1.cast
+ %tmp = load i8 addrspace(1)*, i8 addrspace(1)** %elem1.cast
ret i8 addrspace(1)* %tmp
}
@@ -56,15 +56,15 @@ define void @test2(i64 %Op.0) {
store i64 %tmp.upgrd.2, i64* %tmp1.upgrd.3
%tmp.upgrd.4 = getelementptr %struct.Val, %struct.Val* %tmp, i32 0, i32 0 ; <i32**> [#uses=1]
%tmp2 = getelementptr %struct.Val, %struct.Val* %tmp1, i32 0, i32 0 ; <i32**> [#uses=1]
- %tmp.upgrd.5 = load i32** %tmp2 ; <i32*> [#uses=1]
+ %tmp.upgrd.5 = load i32*, i32** %tmp2 ; <i32*> [#uses=1]
store i32* %tmp.upgrd.5, i32** %tmp.upgrd.4
%tmp3 = getelementptr %struct.Val, %struct.Val* %tmp, i32 0, i32 1 ; <i32*> [#uses=1]
%tmp4 = getelementptr %struct.Val, %struct.Val* %tmp1, i32 0, i32 1 ; <i32*> [#uses=1]
- %tmp.upgrd.6 = load i32* %tmp4 ; <i32> [#uses=1]
+ %tmp.upgrd.6 = load i32, i32* %tmp4 ; <i32> [#uses=1]
store i32 %tmp.upgrd.6, i32* %tmp3
%tmp7 = bitcast %struct.Val* %tmp to { i64 }* ; <{ i64 }*> [#uses=1]
%tmp8 = getelementptr { i64 }, { i64 }* %tmp7, i32 0, i32 0 ; <i64*> [#uses=1]
- %tmp9 = load i64* %tmp8 ; <i64> [#uses=1]
+ %tmp9 = load i64, i64* %tmp8 ; <i64> [#uses=1]
call void @_Z3bar3ValS_( i64 %Op.0, i64 %tmp9 )
ret void
}
OpenPOWER on IntegriCloud