summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/select_xform.ll
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2016-09-09 12:52:24 +0000
committerJames Molloy <james.molloy@arm.com>2016-09-09 12:52:24 +0000
commit5349cafffb46c7a71fa6c695cc8aab32e048b555 (patch)
treefce4cb60e4d380c3df949ca48fb7da57b09955f1 /test/CodeGen/ARM/select_xform.ll
parent3c6f3f0961d2722354ac4b3da3f00d14cf6aa92c (diff)
[Thumb] Select (CMPZ X, -C) -> (CMPZ (ADDS X, C), 0)
The CMPZ #0 disappears during peepholing, leaving just a tADDi3, tADDi8 or t2ADDri. This avoids having to materialize the expensive negative constant in Thumb-1, and allows a shrinking from a 32-bit CMN to a 16-bit ADDS in Thumb-2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/select_xform.ll')
-rw-r--r--test/CodeGen/ARM/select_xform.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGen/ARM/select_xform.ll b/test/CodeGen/ARM/select_xform.ll
index 460ca8f1840..8c1502e1465 100644
--- a/test/CodeGen/ARM/select_xform.ll
+++ b/test/CodeGen/ARM/select_xform.ll
@@ -280,7 +280,7 @@ entry:
; ARM: and r0, {{r[0-9]+}}, {{r[0-9]+}}
; T2-LABEL: t18:
-; T2: and.w r0, {{r[0-9]+}}
+; T2: and{{s|.w}} r0, {{r[0-9]+}}
%cmp = icmp ne i32 %x, 0
%cond = select i1 %cmp, i32 5, i32 2
%cmp1 = icmp ne i32 %x, -1