llvm-6502/lib/CodeGen/SelectionDAG
Benjamin Kramer 9c64030445 Emit a more efficient magic number multiplication for exact sdivs.
We have to do this in DAGBuilder instead of DAGCombiner, because the exact bit is lost after building.

  struct foo { char x[24]; };
  long bar(struct foo *a, struct foo *b) { return a-b; }
is now compiled into
  movl	4(%esp), %eax
  subl	8(%esp), %eax
  sarl	$3, %eax
  imull	$-1431655765, %eax, %eax
instead of
  movl	4(%esp), %eax
  subl	8(%esp), %eax
  movl	$715827883, %ecx
  imull	%ecx
  movl	%edx, %eax
  shrl	$31, %eax
  sarl	$2, %edx
  addl	%eax, %edx
  movl	%edx, %eax

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134695 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-08 10:31:30 +00:00
..
CMakeLists.txt Removed a bunch of unnecessary target_link_libraries. 2010-09-28 22:39:14 +00:00
DAGCombiner.cpp Add functions 'hasPredecessor' and 'hasPredecessorHelper' to SDNode. The 2011-07-07 04:31:51 +00:00
FastISel.cpp Revert r133953 for now. 2011-06-29 23:50:13 +00:00
FunctionLoweringInfo.cpp Add a parameter to CCState so that it can access the MachineFunction. 2011-06-08 23:55:35 +00:00
InstrEmitter.cpp - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and 2011-06-28 19:10:37 +00:00
InstrEmitter.h - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and 2011-06-28 19:10:37 +00:00
LegalizeDAG.cpp Add a testcase for checking the integer-promotion of many different vector 2011-06-14 08:11:52 +00:00
LegalizeFloatTypes.cpp Allow targets to specify a the type of the RHS of a shift parameterized on the type of the LHS. 2011-02-25 21:41:48 +00:00
LegalizeIntegerTypes.cpp Fix PromoteIntRes_TRUNCATE: Add support for cases where the 2011-06-20 07:15:58 +00:00
LegalizeTypes.cpp Refactor LegalizeTypes: Erase LegalizeAction and make the type legalizer use 2011-06-01 19:47:10 +00:00
LegalizeTypes.h Lower multiply with overflow checking to __mulo<mode> 2011-06-17 20:41:29 +00:00
LegalizeTypesGeneric.cpp Refactor LegalizeTypes: Erase LegalizeAction and make the type legalizer use 2011-06-01 19:47:10 +00:00
LegalizeVectorOps.cpp Add support for legalizing UINT_TO_FP of vectors on platforms which do 2011-03-19 13:09:10 +00:00
LegalizeVectorTypes.cpp Fix a bug in FindMemType. When widening vector loads, use a wider memory type 2011-06-13 18:13:24 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00
ScheduleDAGFast.cpp - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and 2011-06-28 19:10:37 +00:00
ScheduleDAGList.cpp Various bits of framework needed for precise machine-level selection 2010-12-24 05:03:26 +00:00
ScheduleDAGRRList.cpp - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and 2011-06-28 19:10:37 +00:00
ScheduleDAGSDNodes.cpp Rename TargetSubtarget to TargetSubtargetInfo for consistency. 2011-07-01 21:01:15 +00:00
ScheduleDAGSDNodes.h The index stored in the RegDefIter is one after the current index. When getting the index, decrement it so that it points to the current element. Fixes an off-by-one bug encountered when trying to make use of MVT::untyped. 2011-06-27 18:34:12 +00:00
SDNodeDbgValue.h Do not lose debug info of an inlined function argument even if the argument is only used through GEPs. 2011-02-18 22:43:42 +00:00
SDNodeOrdering.h Allow 0 as an order number. Don't assign an order to formal arguments. 2009-12-22 21:35:02 +00:00
SelectionDAG.cpp Add functions 'hasPredecessor' and 'hasPredecessorHelper' to SDNode. The 2011-07-07 04:31:51 +00:00
SelectionDAGBuilder.cpp Emit a more efficient magic number multiplication for exact sdivs. 2011-07-08 10:31:30 +00:00
SelectionDAGBuilder.h Emit a more efficient magic number multiplication for exact sdivs. 2011-07-08 10:31:30 +00:00
SelectionDAGISel.cpp Revert r133953 for now. 2011-06-29 23:50:13 +00:00
SelectionDAGPrinter.cpp Pass the graph to the DOTGraphTraits.getEdgeAttributes(). 2011-02-27 04:11:03 +00:00
TargetLowering.cpp Emit a more efficient magic number multiplication for exact sdivs. 2011-07-08 10:31:30 +00:00
TargetSelectionDAGInfo.cpp Implement a bunch more TargetSelectionDAGInfo infrastructure. 2010-05-11 17:31:57 +00:00