aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-11 05:32:13 +0000
committerChris Lattner <sabre@nondot.org>2007-04-11 05:32:13 +0000
commitcb42ba454cb5fdd81ab6727b452946bfcb424fcb (patch)
tree2826c288017565135221506f086f3b00362d2a9d /test
parent1982ef20c44d85386a239a1b24eb2bb72cea29ec (diff)
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35882 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Generic/ispositive.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/ispositive.ll b/test/CodeGen/Generic/ispositive.ll
new file mode 100644
index 0000000000..2f8acbce88
--- /dev/null
+++ b/test/CodeGen/Generic/ispositive.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | llc -march=x86 | grep shrl.*31 &&
+; RUN: llvm-as < %s | llc -march=ppc32 | grep 'srwi r3, r3, 31' &&
+; RUN: llvm-as < %s | llc -march=arm | grep 'mov r0, r0, lsr #31' &&
+; RUN: llvm-as < %s | llc -march=thumb | grep 'lsr r0, r0, #31'
+
+define i32 @isnegative(i32 %X) {
+entry:
+ icmp slt i32 %X, 0 ; <i1>:0 [#uses=1]
+ zext i1 %0 to i32 ; <i32>:1 [#uses=1]
+ ret i32 %1
+}
+