diff options
author | Pablo Barrio <pablo.barrio@arm.com> | 2018-02-28 17:13:07 +0000 |
---|---|---|
committer | Pablo Barrio <pablo.barrio@arm.com> | 2018-02-28 17:13:07 +0000 |
commit | 512f7ee3154b46a512defba44fec6124450303f2 (patch) | |
tree | 7344403a214e5c9bfa23bf809d43966c6323997e /lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py | |
parent | 6053ec22ebaa902c7bce06e035b99fd1c63c4c90 (diff) | |
download | bcm5719-llvm-512f7ee3154b46a512defba44fec6124450303f2.tar.gz bcm5719-llvm-512f7ee3154b46a512defba44fec6124450303f2.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 Martin Svanfeldt
Reviewers: fhahn, pbarrio, rogfer01
Reviewed By: pbarrio, rogfer01
Subscribers: chrib, yroux, eugenis, efriedma, rogfer01, aemerson, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D42574
llvm-svn: 326333
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py')
0 files changed, 0 insertions, 0 deletions