aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-06 18:15:50 +0000
committerChris Lattner <sabre@nondot.org>2006-05-06 18:15:50 +0000
commita0aec0a61dbc47d15190cb229dba3f82496756aa (patch)
treeec34cd3bd077330190413cd3ac2b4a1dbde2baab
parentee4ea923589a2556ff85edbaf444d9575050613a (diff)
new testcase we handle right now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28147 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/PowerPC/and_sext.ll26
1 files changed, 20 insertions, 6 deletions
diff --git a/test/CodeGen/PowerPC/and_sext.ll b/test/CodeGen/PowerPC/and_sext.ll
index 20c0cf9766..af68d81f2c 100644
--- a/test/CodeGen/PowerPC/and_sext.ll
+++ b/test/CodeGen/PowerPC/and_sext.ll
@@ -1,9 +1,23 @@
-; This test should not contain a sign extend
-; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsh
+; These tests should not contain a sign extend.
+; RUN: llvm-as < %s | llc -march=ppc32 &&
+; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsh &&
+; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsb
-int %test(uint %mode.0.i.0) {
- %tmp.79 = cast uint %mode.0.i.0 to short ; <sbyte> [#uses=1]
- %tmp.80 = cast short %tmp.79 to int ; <int> [#uses=1]
- %tmp.81 = and int %tmp.80, 24 ; <int> [#uses=1]
+int %test1(uint %mode.0.i.0) {
+ %tmp.79 = cast uint %mode.0.i.0 to short
+ %tmp.80 = cast short %tmp.79 to int
+ %tmp.81 = and int %tmp.80, 24
ret int %tmp.81
}
+
+short %test2(short %X, short %x) {
+ %tmp = cast short %X to int
+ %tmp1 = cast short %x to int
+ %tmp2 = add int %tmp, %tmp1
+ %tmp4 = shr int %tmp2, ubyte 1
+ %tmp4 = cast int %tmp4 to short
+ %tmp45 = cast short %tmp4 to int
+ %retval = cast int %tmp45 to short
+ ret short %retval
+}
+