diff options
author | Tanya Lattner <tonic@nondot.org> | 2008-03-18 04:14:37 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2008-03-18 04:14:37 +0000 |
commit | 4e59897d3d14b9ba55e4eb8cc374892f8a85c2ed (patch) | |
tree | 6272c9c4a95d9567878ab5e6d40832576a8be28c /llvm/test/Transforms/ScalarRepl/union-pointer.ll | |
parent | baa370b37aaad6c32d04319d4bcee4cf170f4efc (diff) | |
download | bcm5719-llvm-4e59897d3d14b9ba55e4eb8cc374892f8a85c2ed.tar.gz bcm5719-llvm-4e59897d3d14b9ba55e4eb8cc374892f8a85c2ed.zip |
Upgrade tests to not use llvm-upgrade.
llvm-svn: 48484
Diffstat (limited to 'llvm/test/Transforms/ScalarRepl/union-pointer.ll')
-rw-r--r-- | llvm/test/Transforms/ScalarRepl/union-pointer.ll | 67 |
1 files changed, 31 insertions, 36 deletions
diff --git a/llvm/test/Transforms/ScalarRepl/union-pointer.ll b/llvm/test/Transforms/ScalarRepl/union-pointer.ll index a9666d2bf46..269b4b9ff52 100644 --- a/llvm/test/Transforms/ScalarRepl/union-pointer.ll +++ b/llvm/test/Transforms/ScalarRepl/union-pointer.ll @@ -1,46 +1,41 @@ ; PR892 -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ +; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | \ ; RUN: not grep alloca -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep {ret i8} +; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep {ret i8} -target endian = little -target pointersize = 32 +target datalayout = "e-p:32:32" target triple = "i686-apple-darwin8.7.2" - -%struct.Val = type { int*, int } + %struct.Val = type { i32*, i32 } -implementation ; Functions: - -sbyte* %test(short* %X) { - %X_addr = alloca short* - store short* %X, short** %X_addr - %X_addr = cast short** %X_addr to sbyte** - %tmp = load sbyte** %X_addr - ret sbyte* %tmp +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] + ret i8* %tmp } -void %test2(long %Op.0) { - %tmp = alloca %struct.Val, align 8 - %tmp1 = alloca %struct.Val, align 8 - %tmp = call ulong %_Z3foov( ) - %tmp1 = cast %struct.Val* %tmp1 to ulong* - store ulong %tmp, ulong* %tmp1 - %tmp = getelementptr %struct.Val* %tmp, int 0, uint 0 - %tmp2 = getelementptr %struct.Val* %tmp1, int 0, uint 0 - %tmp = load int** %tmp2 - store int* %tmp, int** %tmp - %tmp3 = getelementptr %struct.Val* %tmp, int 0, uint 1 - %tmp4 = getelementptr %struct.Val* %tmp1, int 0, uint 1 - %tmp = load int* %tmp4 - store int %tmp, int* %tmp3 - %tmp7 = cast %struct.Val* %tmp to { long }* - %tmp8 = getelementptr { long }* %tmp7, int 0, uint 0 - %tmp9 = load long* %tmp8 - call void %_Z3bar3ValS_( long %Op.0, long %tmp9 ) - ret void +define void @test2(i64 %Op.0) { + %tmp = alloca %struct.Val, align 8 ; <%struct.Val*> [#uses=3] + %tmp1 = alloca %struct.Val, align 8 ; <%struct.Val*> [#uses=3] + %tmp.upgrd.2 = call i64 @_Z3foov( ) ; <i64> [#uses=1] + %tmp1.upgrd.3 = bitcast %struct.Val* %tmp1 to i64* ; <i64*> [#uses=1] + store i64 %tmp.upgrd.2, i64* %tmp1.upgrd.3 + %tmp.upgrd.4 = getelementptr %struct.Val* %tmp, i32 0, i32 0 ; <i32**> [#uses=1] + %tmp2 = getelementptr %struct.Val* %tmp1, i32 0, i32 0 ; <i32**> [#uses=1] + %tmp.upgrd.5 = load i32** %tmp2 ; <i32*> [#uses=1] + store i32* %tmp.upgrd.5, i32** %tmp.upgrd.4 + %tmp3 = getelementptr %struct.Val* %tmp, i32 0, i32 1 ; <i32*> [#uses=1] + %tmp4 = getelementptr %struct.Val* %tmp1, i32 0, i32 1 ; <i32*> [#uses=1] + %tmp.upgrd.6 = load 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 }* %tmp7, i32 0, i32 0 ; <i64*> [#uses=1] + %tmp9 = load i64* %tmp8 ; <i64> [#uses=1] + call void @_Z3bar3ValS_( i64 %Op.0, i64 %tmp9 ) + ret void } -declare ulong %_Z3foov() - -declare void %_Z3bar3ValS_(long, long) +declare i64 @_Z3foov() +declare void @_Z3bar3ValS_(i64, i64) |