summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineCombiner.cpp
diff options
context:
space:
mode:
authorPablo Barrio <pablo.barrio@arm.com>2018-01-31 13:20:10 +0000
committerPablo Barrio <pablo.barrio@arm.com>2018-01-31 13:20:10 +0000
commit2e442a78312036309f53cb915c2c6a8c295b6575 (patch)
tree16cc7957e99ea0e726f9a4b6dead7d72f82fee6e /llvm/lib/CodeGen/MachineCombiner.cpp
parent99dbec52bec36ce0a93e27311f39eca65b8f166c (diff)
downloadbcm5719-llvm-2e442a78312036309f53cb915c2c6a8c295b6575.tar.gz
bcm5719-llvm-2e442a78312036309f53cb915c2c6a8c295b6575.zip
[ARM] Lower lower saturate to 0 and lower saturate to -1 using bit-operations
Summary: Expressions of the form x < 0 ? 0 : x; and x < -1 ? -1 : x can be lowered using bit-operations instead of branching or conditional moves In thumb-mode this results in a two-instruction sequence, a shift followed by a bic or or while in ARM/thumb2 mode that has flexible second operand the shift can be folded into a single bic/or instructions. In most cases this results in smaller code and possibly less branches, and in no case larger than before. Patch by Marten Svanfeldt. Reviewers: fhahn, pbarrio Reviewed By: pbarrio Subscribers: efriedma, rogfer01, aemerson, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D42574 llvm-svn: 323869
Diffstat (limited to 'llvm/lib/CodeGen/MachineCombiner.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud