[llvm-commits] CVS: llvm/test/CodeGen/Generic/ispositive.ll
Chris Lattner
sabre at nondot.org
Tue Apr 10 22:32:31 PDT 2007
Changes in directory llvm/test/CodeGen/Generic:
ispositive.ll added (r1.1)
---
Log message:
new testcase
---
Diffs of the changes: (+12 -0)
ispositive.ll | 12 ++++++++++++
1 files changed, 12 insertions(+)
Index: llvm/test/CodeGen/Generic/ispositive.ll
diff -c /dev/null llvm/test/CodeGen/Generic/ispositive.ll:1.1
*** /dev/null Wed Apr 11 00:32:23 2007
--- llvm/test/CodeGen/Generic/ispositive.ll Wed Apr 11 00:32:13 2007
***************
*** 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
+ }
+
More information about the llvm-commits
mailing list