aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/signext.ll
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2008-03-01 09:15:35 +0000
committerTanya Lattner <tonic@nondot.org>2008-03-01 09:15:35 +0000
commitec9a35a6f9143cfa325e0413cc297c48f627973a (patch)
treec1b0621415acc20f94152c51174d53fae3dbc8cc /test/Transforms/InstCombine/signext.ll
parentab3b77834c9232e4c13acb29afe1920b97c5a20b (diff)
Remove llvm-upgrade and update test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47793 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/signext.ll')
-rw-r--r--test/Transforms/InstCombine/signext.ll62
1 files changed, 31 insertions, 31 deletions
diff --git a/test/Transforms/InstCombine/signext.ll b/test/Transforms/InstCombine/signext.ll
index f69cbc0072..4828937e3e 100644
--- a/test/Transforms/InstCombine/signext.ll
+++ b/test/Transforms/InstCombine/signext.ll
@@ -1,44 +1,44 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
; RUN: not grep {(and\|xor\|add\|shl\|shr)}
-; END.
-int %test1(int %x) {
- %tmp.1 = and int %x, 65535 ; <int> [#uses=1]
- %tmp.2 = xor int %tmp.1, -32768 ; <int> [#uses=1]
- %tmp.3 = add int %tmp.2, 32768 ; <int> [#uses=1]
- ret int %tmp.3
+define i32 @test1(i32 %x) {
+ %tmp.1 = and i32 %x, 65535 ; <i32> [#uses=1]
+ %tmp.2 = xor i32 %tmp.1, -32768 ; <i32> [#uses=1]
+ %tmp.3 = add i32 %tmp.2, 32768 ; <i32> [#uses=1]
+ ret i32 %tmp.3
}
-int %test2(int %x) {
- %tmp.1 = and int %x, 65535 ; <int> [#uses=1]
- %tmp.2 = xor int %tmp.1, 32768 ; <int> [#uses=1]
- %tmp.3 = add int %tmp.2, -32768 ; <int> [#uses=1]
- ret int %tmp.3
+define i32 @test2(i32 %x) {
+ %tmp.1 = and i32 %x, 65535 ; <i32> [#uses=1]
+ %tmp.2 = xor i32 %tmp.1, 32768 ; <i32> [#uses=1]
+ %tmp.3 = add i32 %tmp.2, -32768 ; <i32> [#uses=1]
+ ret i32 %tmp.3
}
-int %test3(ushort %P) {
- %tmp.1 = cast ushort %P to int ; <int> [#uses=1]
- %tmp.4 = xor int %tmp.1, 32768 ; <int> [#uses=1]
- %tmp.5 = add int %tmp.4, -32768 ; <int> [#uses=1]
- ret int %tmp.5
+define i32 @test3(i16 %P) {
+ %tmp.1 = zext i16 %P to i32 ; <i32> [#uses=1]
+ %tmp.4 = xor i32 %tmp.1, 32768 ; <i32> [#uses=1]
+ %tmp.5 = add i32 %tmp.4, -32768 ; <i32> [#uses=1]
+ ret i32 %tmp.5
}
-uint %test4(ushort %P) {
- %tmp.1 = cast ushort %P to uint ; <uint> [#uses=1]
- %tmp.4 = xor uint %tmp.1, 32768 ; <uint> [#uses=1]
- %tmp.5 = add uint %tmp.4, 4294934528 ; <uint> [#uses=1]
- ret uint %tmp.5
+define i32 @test4(i16 %P) {
+ %tmp.1 = zext i16 %P to i32 ; <i32> [#uses=1]
+ %tmp.4 = xor i32 %tmp.1, 32768 ; <i32> [#uses=1]
+ %tmp.5 = add i32 %tmp.4, -32768 ; <i32> [#uses=1]
+ ret i32 %tmp.5
}
-int %test5(int %x) {
- %tmp.1 = and int %x, 254
- %tmp.2 = xor int %tmp.1, 128
- %tmp.3 = add int %tmp.2, -128
- ret int %tmp.3
+define i32 @test5(i32 %x) {
+ %tmp.1 = and i32 %x, 254 ; <i32> [#uses=1]
+ %tmp.2 = xor i32 %tmp.1, 128 ; <i32> [#uses=1]
+ %tmp.3 = add i32 %tmp.2, -128 ; <i32> [#uses=1]
+ ret i32 %tmp.3
}
-int %test6(int %x) {
- %tmp.2 = shl int %x, ubyte 16 ; <int> [#uses=1]
- %tmp.4 = shr int %tmp.2, ubyte 16 ; <int> [#uses=1]
- ret int %tmp.4
+define i32 @test6(i32 %x) {
+ %tmp.2 = shl i32 %x, 16 ; <i32> [#uses=1]
+ %tmp.4 = ashr i32 %tmp.2, 16 ; <i32> [#uses=1]
+ ret i32 %tmp.4
}
+