diff options
author | Tanya Lattner <tonic@nondot.org> | 2008-02-21 07:42:26 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2008-02-21 07:42:26 +0000 |
commit | 33eefffb2b25b5f4a313f08fa7c57ddfcbccf36e (patch) | |
tree | c8a69f1be3db80d136ec9dcc8e41d9d5affd35ad /test/CodeGen/X86/shift-folding.ll | |
parent | 7c1687c196e8dc89a4722e0463965f0b0f5f399c (diff) | |
download | llvm-33eefffb2b25b5f4a313f08fa7c57ddfcbccf36e.tar.gz llvm-33eefffb2b25b5f4a313f08fa7c57ddfcbccf36e.tar.bz2 llvm-33eefffb2b25b5f4a313f08fa7c57ddfcbccf36e.tar.xz |
Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/shift-folding.ll')
-rw-r--r-- | test/CodeGen/X86/shift-folding.ll | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/test/CodeGen/X86/shift-folding.ll b/test/CodeGen/X86/shift-folding.ll index 19bf4ee648..d26823220f 100644 --- a/test/CodeGen/X86/shift-folding.ll +++ b/test/CodeGen/X86/shift-folding.ll @@ -1,20 +1,23 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \ +; RUN: llvm-as < %s | llc -march=x86 | \ ; RUN: grep {s\[ah\]\[rl\]l} | count 1 -int* %test1(int *%P, uint %X) { - %Y = shr uint %X, ubyte 2 - %P2 = getelementptr int* %P, uint %Y - ret int* %P2 +define i32* @test1(i32* %P, i32 %X) { + %Y = lshr i32 %X, 2 ; <i32> [#uses=1] + %gep.upgrd.1 = zext i32 %Y to i64 ; <i64> [#uses=1] + %P2 = getelementptr i32* %P, i64 %gep.upgrd.1 ; <i32*> [#uses=1] + ret i32* %P2 } -int* %test2(int *%P, uint %X) { - %Y = shl uint %X, ubyte 2 - %P2 = getelementptr int* %P, uint %Y - ret int* %P2 +define i32* @test2(i32* %P, i32 %X) { + %Y = shl i32 %X, 2 ; <i32> [#uses=1] + %gep.upgrd.2 = zext i32 %Y to i64 ; <i64> [#uses=1] + %P2 = getelementptr i32* %P, i64 %gep.upgrd.2 ; <i32*> [#uses=1] + ret i32* %P2 } -int* %test3(int *%P, int %X) { - %Y = shr int %X, ubyte 2 - %P2 = getelementptr int* %P, int %Y - ret int* %P2 +define i32* @test3(i32* %P, i32 %X) { + %Y = ashr i32 %X, 2 ; <i32> [#uses=1] + %P2 = getelementptr i32* %P, i32 %Y ; <i32*> [#uses=1] + ret i32* %P2 } + |