llvm/lib
Quentin Colombet 685b0d9315 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
2014-02-26 21:39:12 +00:00
..
Analysis Constify the Optnone checks in IR passes. 2014-02-26 01:23:26 +00:00
AsmParser [ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret' 2014-01-31 17:41:22 +00:00
Bitcode Store a DataLayout in Module. 2014-02-25 20:01:08 +00:00
CodeGen Fix the aggressive anti-dep breaker's subregister definition handling 2014-02-26 20:20:30 +00:00
DebugInfo llvm-dwarfdump: Support for debug_line.dwo section for file names for type units under fission. 2014-02-24 23:58:54 +00:00
ExecutionEngine Use DataLayout from the module when easily available. 2014-02-25 23:25:17 +00:00
IR Fix typo. Thanks to Roman Divacky for noticing it. 2014-02-26 17:05:38 +00:00
IRReader Make parseBitcodeFile return an ErrorOr<Module *>. 2014-01-15 01:08:23 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker Compare DataLayout by Value, not by pointer. 2014-02-26 17:02:08 +00:00
LTO Use DataLayout from the module when easily available. 2014-02-25 23:25:17 +00:00
MC Reuse constants for COFF string table entry offsets 2014-02-25 09:50:40 +00:00
Object Relax COFF string table check 2014-02-26 19:51:44 +00:00
Option Avoid buffer copies when a Twine already is a StringRef. 2013-12-03 18:18:28 +00:00
Support [CMake] BUILD_SHARED_LIBS: Fixup for r202261: Give PULIC to system_libs in LLVMSupport. 2014-02-26 12:18:55 +00:00
TableGen Replace the F_Binary flag with a F_Text one. 2014-02-24 18:20:12 +00:00
Target Lower unsigned vsetcc to psubus in certain cases 2014-02-26 21:39:12 +00:00
Transforms GlobalOpt: Apply fastcc to internal x86_thiscallcc functions 2014-02-26 19:57:30 +00:00
CMakeLists.txt Introduce line editor library. 2014-01-31 23:46:14 +00:00
LLVMBuild.txt Introduce line editor library. 2014-01-31 23:46:14 +00:00
Makefile Introduce line editor library. 2014-01-31 23:46:14 +00:00