1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 22:12:57 +02:00
llvm-mirror/lib/CodeGen/SelectionDAG
Hans Wennborg 1ead7346cd X86: More efficient legalization of wide integer compares
In particular, this makes the code for 64-bit compares on 32-bit targets
much more efficient.

Example:

  define i32 @test_slt(i64 %a, i64 %b) {
  entry:
    %cmp = icmp slt i64 %a, %b
    br i1 %cmp, label %bb1, label %bb2
  bb1:
    ret i32 1
  bb2:
    ret i32 2
  }

Before this patch:

  test_slt:
          movl    4(%esp), %eax
          movl    8(%esp), %ecx
          cmpl    12(%esp), %eax
          setae   %al
          cmpl    16(%esp), %ecx
          setge   %cl
          je      .LBB2_2
          movb    %cl, %al
  .LBB2_2:
          testb   %al, %al
          jne     .LBB2_4
          movl    $1, %eax
          retl
  .LBB2_4:
          movl    $2, %eax
          retl

After this patch:

  test_slt:
          movl    4(%esp), %eax
          movl    8(%esp), %ecx
          cmpl    12(%esp), %eax
          sbbl    16(%esp), %ecx
          jge     .LBB1_2
          movl    $1, %eax
          retl
  .LBB1_2:
          movl    $2, %eax
          retl

Differential Revision: http://reviews.llvm.org/D14496

llvm-svn: 253572
2015-11-19 16:35:08 +00:00
..
CMakeLists.txt
DAGCombiner.cpp X86: More efficient legalization of wide integer compares 2015-11-19 16:35:08 +00:00
FastISel.cpp Create a new interface addSuccessorWithoutWeight(MBB*) in MBB to add successors when optimization is disabled. 2015-10-27 17:59:36 +00:00
FunctionLoweringInfo.cpp [WinEH] Move WinEHFuncInfo from MachineModuleInfo to MachineFunction 2015-11-17 21:10:25 +00:00
InstrEmitter.cpp Revert "Remove unnecessary call to getAllocatableRegClass" 2015-11-12 21:43:25 +00:00
InstrEmitter.h [SDAG] Give InstrEmitter hidden visibility 2015-07-01 14:55:10 +00:00
LegalizeDAG.cpp X86: More efficient legalization of wide integer compares 2015-11-19 16:35:08 +00:00
LegalizeFloatTypes.cpp [CodeGen] Always promote f16 if not legal 2015-11-09 11:03:18 +00:00
LegalizeIntegerTypes.cpp X86: More efficient legalization of wide integer compares 2015-11-19 16:35:08 +00:00
LegalizeTypes.cpp Change makeLibCall to take an ArrayRef<SDValue> instead of pointer and size. This removes the need to pass a hardcoded size in many places. NFC 2015-10-22 17:05:00 +00:00
LegalizeTypes.h X86: More efficient legalization of wide integer compares 2015-11-19 16:35:08 +00:00
LegalizeTypesGeneric.cpp PseudoSourceValue: Replace global manager with a manager in a machine function. 2015-08-11 23:09:45 +00:00
LegalizeVectorOps.cpp Do not use "else" when both branches return (NFC) 2015-10-27 08:12:08 +00:00
LegalizeVectorTypes.cpp [SDAG] Introduce a new BITREVERSE node along with a corresponding LLVM intrinsic 2015-11-12 12:29:09 +00:00
LLVMBuild.txt
Makefile
ResourcePriorityQueue.cpp Fix some comment typos. 2015-08-08 18:27:36 +00:00
ScheduleDAGFast.cpp Add allnodes() iterator range to SelectionDAG. NFC. 2015-07-14 22:10:54 +00:00
ScheduleDAGRRList.cpp Convert a bunch of loops to foreach. NFC. 2015-06-26 19:18:49 +00:00
ScheduleDAGSDNodes.cpp Add allnodes() iterator range to SelectionDAG. NFC. 2015-07-14 22:10:54 +00:00
ScheduleDAGSDNodes.h [SelectionDAG] Remove dead code. NFC. 2015-10-15 17:54:06 +00:00
ScheduleDAGVLIW.cpp
SDNodeDbgValue.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
SelectionDAG.cpp [DAGCombiner] Vector constant folding for comparisons 2015-11-18 21:17:19 +00:00
SelectionDAGBuilder.cpp Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
SelectionDAGBuilder.h [SelectionDAG] Remove dead code. NFC. 2015-10-15 17:54:06 +00:00
SelectionDAGDumper.cpp X86: More efficient legalization of wide integer compares 2015-11-19 16:35:08 +00:00
SelectionDAGISel.cpp [WinEH] Update exception pointer registers 2015-11-07 01:11:31 +00:00
SelectionDAGPrinter.cpp Make the SelectionDAG graph printer use SDNode::PersistentId labels. 2015-10-27 23:09:03 +00:00
StatepointLowering.cpp Lower statepoints with multi-def targets. 2015-11-17 16:04:21 +00:00
StatepointLowering.h [StatepointLowering] Support of the gc.relocates for invoke statepoints. 2015-05-20 11:37:25 +00:00
TargetLowering.cpp [X86] Use correct calling convention for MCU psABI libcalls 2015-10-25 08:14:05 +00:00
TargetSelectionDAGInfo.cpp Remove getDataLayout() from TargetSelectionDAGInfo (had no users) 2015-07-09 02:10:08 +00:00