diff options
author | David Green <david.green@arm.com> | 2019-07-04 08:58:58 +0000 |
---|---|---|
committer | David Green <david.green@arm.com> | 2019-07-04 08:58:58 +0000 |
commit | 2b20ee4110ec69402ec84ea3a122df8c7eacc144 (patch) | |
tree | 4661bdec5c7dbd7788118dca6f23d859b66b05bc /llvm/test/CodeGen/ARM/select.ll | |
parent | 147547ee80b4715bfc0f97e8c079d1163ec317d9 (diff) | |
download | bcm5719-llvm-2b20ee4110ec69402ec84ea3a122df8c7eacc144.tar.gz bcm5719-llvm-2b20ee4110ec69402ec84ea3a122df8c7eacc144.zip |
[ARM] Favour PL/MI over GE/LT when possible
The arm condition codes for GE is N==V (and for LT is N!=V). If the source of
flags cannot set V (overflow), such as a cmp against #0, then we can use the
simpler PL and MI conditions that only check N. As these PL/MI conditions are
simpler than GE/LT, other passes like the peephole optimiser can have a better
time optimising away the redundant CMPs.
The exception is the VSEL instruction, which cannot take the PL code, so there
the transform favours GE.
Differential Revision: https://reviews.llvm.org/D64160
llvm-svn: 365117
Diffstat (limited to 'llvm/test/CodeGen/ARM/select.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/select.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/ARM/select.ll b/llvm/test/CodeGen/ARM/select.ll index 54bc1b9a992..45c32665e99 100644 --- a/llvm/test/CodeGen/ARM/select.ll +++ b/llvm/test/CodeGen/ARM/select.ll @@ -62,8 +62,8 @@ entry: define double @f7(double %a, double %b) { ;CHECK-LABEL: f7: -;CHECK: movlt -;CHECK: movge +;CHECK: movmi +;CHECK: movpl ;CHECK-VFP-LABEL: f7: ;CHECK-VFP: vmovmi %tmp = fcmp olt double %a, 1.234e+00 |