From 4d86bed0bb2d109f9aa802cc09377900b84c09bb Mon Sep 17 00:00:00 2001 From: James Molloy Date: Fri, 9 Sep 2016 12:52:24 +0000 Subject: [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. llvm-svn: 281040 --- llvm/test/CodeGen/ARM/select_xform.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/test/CodeGen/ARM/select_xform.ll') diff --git a/llvm/test/CodeGen/ARM/select_xform.ll b/llvm/test/CodeGen/ARM/select_xform.ll index 460ca8f1840..8c1502e1465 100644 --- a/llvm/test/CodeGen/ARM/select_xform.ll +++ b/llvm/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 -- cgit v1.2.3