summaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2014-02-26 21:39:12 +0000
committerQuentin Colombet <qcolombet@apple.com>2014-02-26 21:39:12 +0000
commit685b0d9315c0e4305113e8a92b1891908c3f5fe6 (patch)
tree92c7f9337edf2a441446385d0fe30cbfc063c5f1 /lib/Bitcode/Reader
parentc540920a247aefd90bf5c79d4969ed9a963bd3f1 (diff)
downloadllvm-685b0d9315c0e4305113e8a92b1891908c3f5fe6.tar.gz
llvm-685b0d9315c0e4305113e8a92b1891908c3f5fe6.tar.bz2
llvm-685b0d9315c0e4305113e8a92b1891908c3f5fe6.tar.xz
Lower unsigned vsetcc to psubus in certain cases
The current approach to lower a vsetult is to flip the sign bit of the operands, swap the operands and then use a (signed) pcmpgt. psubus (unsigned saturating subtract) can be used to emulate a vsetult more efficiently: + case ISD::SETULT: { + // If the comparison is against a constant we can turn this into a + // setule. With psubus, setule does not require a swap. This is + // beneficial because the constant in the register is no longer + // destructed as the destination so it can be hoisted out of a loop. I also enable lowering via psubus in a few other cases where it's clearly beneficial: setule and setuge if minu/maxu cannot be used. rdar://problem/14338765 Patch by Adam Nemet <anemet@apple.com>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202301 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader')
0 files changed, 0 insertions, 0 deletions