[llvm-commits] CVS: llvm/test/CodeGen/ARM/tst_teq.ll
Lauro Ramos Venancio
lauro.venancio at gmail.com
Sun Apr 1 18:30:25 PDT 2007
Changes in directory llvm/test/CodeGen/ARM:
tst_teq.ll added (r1.1)
---
Log message:
- Divides the comparisons in two types: comparisons that only use N and Z
flags (ARMISD::CMPNZ) and comparisons that use all flags (ARMISD::CMP).
- Defines the instructions: TST, TEQ (ARM) and TST (Thumb).
---
Diffs of the changes: (+21 -0)
tst_teq.ll | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+)
Index: llvm/test/CodeGen/ARM/tst_teq.ll
diff -c /dev/null llvm/test/CodeGen/ARM/tst_teq.ll:1.1
*** /dev/null Sun Apr 1 20:30:13 2007
--- llvm/test/CodeGen/ARM/tst_teq.ll Sun Apr 1 20:30:03 2007
***************
*** 0 ****
--- 1,21 ----
+ ; RUN: llvm-as < %s | llc -march=arm &&
+ ; RUN: llvm-as < %s | llc -march=thumb &&
+ ; RUN: llvm-as < %s | llc -march=arm | grep "tst" &&
+ ; RUN: llvm-as < %s | llc -march=arm | grep "teq" &&
+ ; RUN: llvm-as < %s | llc -march=thumb | grep "tst"
+
+ define i32 @f(i32 %a) {
+ entry:
+ %tmp2 = and i32 %a, 255 ; <i32> [#uses=1]
+ icmp eq i32 %tmp2, 0 ; <i1>:0 [#uses=1]
+ %retval = select i1 %0, i32 20, i32 10 ; <i32> [#uses=1]
+ ret i32 %retval
+ }
+
+ define i32 @g(i32 %a) {
+ entry:
+ %tmp2 = xor i32 %a, 255
+ icmp eq i32 %tmp2, 0 ; <i1>:0 [#uses=1]
+ %retval = select i1 %0, i32 20, i32 10 ; <i32> [#uses=1]
+ ret i32 %retval
+ }
More information about the llvm-commits
mailing list