summaryrefslogtreecommitdiff
path: root/test/CodeGen/Thumb2/thumb2-teq2.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-13 00:42:17 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-13 00:42:17 +0000
commite721f5c8d3ea2cc2cc8c3c308ce8bdd8a3fc3b32 (patch)
tree9d3a3b566011131e0112dd247270ca0dfc4f92d8 /test/CodeGen/Thumb2/thumb2-teq2.ll
parent3641e811729fc7f21039af595d62bc8e696ff407 (diff)
downloadllvm-e721f5c8d3ea2cc2cc8c3c308ce8bdd8a3fc3b32.tar.gz
llvm-e721f5c8d3ea2cc2cc8c3c308ce8bdd8a3fc3b32.tar.bz2
llvm-e721f5c8d3ea2cc2cc8c3c308ce8bdd8a3fc3b32.tar.xz
Improve codegen for select's:
if (x != 0) x = 1 if (x == 1) x = 1 Previous codegen looks like this: mov r1, r0 cmp r1, #1 mov r0, #0 moveq r0, #1 The naive lowering select between two different values. It should recognize the test is equality test so it's more a conditional move rather than a select: cmp r0, #1 movne r0, #0 rdar://9758317 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135017 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Thumb2/thumb2-teq2.ll')
-rw-r--r--test/CodeGen/Thumb2/thumb2-teq2.ll16
1 files changed, 0 insertions, 16 deletions
diff --git a/test/CodeGen/Thumb2/thumb2-teq2.ll b/test/CodeGen/Thumb2/thumb2-teq2.ll
index cdd3489c50..8acae9090f 100644
--- a/test/CodeGen/Thumb2/thumb2-teq2.ll
+++ b/test/CodeGen/Thumb2/thumb2-teq2.ll
@@ -3,14 +3,6 @@
; These tests implicitly depend on 'movs r0, #0' being rematerialized below the
; tst as 'mov.w r0, #0'. So far, that requires physreg joining.
-define i1 @f1(i32 %a, i32 %b) {
-; CHECK: f1
-; CHECK: teq.w r0, r1
- %tmp = xor i32 %a, %b
- %tmp1 = icmp ne i32 %tmp, 0
- ret i1 %tmp1
-}
-
define i1 @f2(i32 %a, i32 %b) {
; CHECK: f2
; CHECK: teq.w r0, r1
@@ -19,14 +11,6 @@ define i1 @f2(i32 %a, i32 %b) {
ret i1 %tmp1
}
-define i1 @f3(i32 %a, i32 %b) {
-; CHECK: f3
-; CHECK: teq.w r0, r1
- %tmp = xor i32 %a, %b
- %tmp1 = icmp ne i32 0, %tmp
- ret i1 %tmp1
-}
-
define i1 @f4(i32 %a, i32 %b) {
; CHECK: f4
; CHECK: teq.w r0, r1