diff options
author | Tanya Lattner <tonic@nondot.org> | 2008-03-10 07:21:50 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2008-03-10 07:21:50 +0000 |
commit | ceca194c4355224723b309a3a27c5e5bc19cb6fc (patch) | |
tree | d976e8cf9d933c32868d72a94d1ec2d9d7205735 /test/ExecutionEngine/test-loadstore.ll | |
parent | f79e60649a5edea03bdccf8521d77c15cbb33af4 (diff) | |
download | llvm-ceca194c4355224723b309a3a27c5e5bc19cb6fc.tar.gz llvm-ceca194c4355224723b309a3a27c5e5bc19cb6fc.tar.bz2 llvm-ceca194c4355224723b309a3a27c5e5bc19cb6fc.tar.xz |
Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ExecutionEngine/test-loadstore.ll')
-rw-r--r-- | test/ExecutionEngine/test-loadstore.ll | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/test/ExecutionEngine/test-loadstore.ll b/test/ExecutionEngine/test-loadstore.ll index 8a4b7933d1..ca2ecbfb0a 100644 --- a/test/ExecutionEngine/test-loadstore.ll +++ b/test/ExecutionEngine/test-loadstore.ll @@ -1,37 +1,32 @@ -; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc +; RUN: llvm-as < %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null - -void %test(sbyte* %P, short* %P, int* %P, long* %P) { - %V = load sbyte* %P - store sbyte %V, sbyte* %P - - %V = load short* %P - store short %V, short* %P - - %V = load int* %P - store int %V, int* %P - - %V = load long* %P - store long %V, long* %P - +define void @test(i8* %P, i16* %P.upgrd.1, i32* %P.upgrd.2, i64* %P.upgrd.3) { + %V = load i8* %P ; <i8> [#uses=1] + store i8 %V, i8* %P + %V.upgrd.4 = load i16* %P.upgrd.1 ; <i16> [#uses=1] + store i16 %V.upgrd.4, i16* %P.upgrd.1 + %V.upgrd.5 = load i32* %P.upgrd.2 ; <i32> [#uses=1] + store i32 %V.upgrd.5, i32* %P.upgrd.2 + %V.upgrd.6 = load i64* %P.upgrd.3 ; <i64> [#uses=1] + store i64 %V.upgrd.6, i64* %P.upgrd.3 ret void } -uint %varalloca(uint %Size) { - %X = alloca uint, uint %Size ;; Variable sized alloca - store uint %Size, uint* %X - %Y = load uint* %X - ret uint %Y +define i32 @varalloca(i32 %Size) { + ;; Variable sized alloca + %X = alloca i32, i32 %Size ; <i32*> [#uses=2] + store i32 %Size, i32* %X + %Y = load i32* %X ; <i32> [#uses=1] + ret i32 %Y } -int %main() { - %A = alloca sbyte - %B = alloca short - %C = alloca int - %D = alloca long - call void %test(sbyte* %A, short* %B, int* %C, long* %D) - call uint %varalloca(uint 7) - - ret int 0 +define i32 @main() { + %A = alloca i8 ; <i8*> [#uses=1] + %B = alloca i16 ; <i16*> [#uses=1] + %C = alloca i32 ; <i32*> [#uses=1] + %D = alloca i64 ; <i64*> [#uses=1] + call void @test( i8* %A, i16* %B, i32* %C, i64* %D ) + call i32 @varalloca( i32 7 ) ; <i32>:1 [#uses=0] + ret i32 0 } |