llvm-6502/lib/CodeGen/SelectionDAG
Bill Schmidt 89e88e30bf This patch addresses an incorrect transformation in the DAG combiner.
The included test case is derived from one of the GCC compatibility tests.
The problem arises after the selection DAG has been converted to type-legalized
form.  The combiner first sees a 64-bit load that can be converted into a
pre-increment form.  The original load feeds into a SRL that isolates the
upper 32 bits of the loaded doubleword.  This looks like an opportunity for
DAGCombiner::ReduceLoadWidth() to replace the 64-bit load with a 32-bit load.

However, this transformation is not valid, as the replacement load is not
a pre-increment load.  The pre-increment load produces an extra result,
which feeds a subsequent add instruction.  The replacement load only has
one result value, and this value is propagated to all uses of the pre-
increment load, including the add.  Because the add is looking for the
second result value as its operand, it ends up attempting to add a constant
to a token chain, resulting in a crash.

So the patch simply disables this transformation for any load with more than
two result values.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172480 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 22:04:38 +00:00
..
CMakeLists.txt llvm/lib: [CMake] Add explicit dependency to intrinsics_gen. 2012-06-24 13:32:01 +00:00
DAGCombiner.cpp This patch addresses an incorrect transformation in the DAG combiner. 2013-01-14 22:04:38 +00:00
FastISel.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
FunctionLoweringInfo.cpp Stack Alignment: throw error if we can't satisfy the minimal alignment 2013-01-10 01:10:10 +00:00
InstrEmitter.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
InstrEmitter.h Use MachineInstrBuilder in InstrEmitter. 2012-12-20 18:08:09 +00:00
LegalizeDAG.cpp Refactor to expose RTLIB calls to targets. 2013-01-09 13:18:15 +00:00
LegalizeFloatTypes.cpp Refactor to expose RTLIB calls to targets. 2013-01-09 13:18:15 +00:00
LegalizeIntegerTypes.cpp Refactor to expose RTLIB calls to targets. 2013-01-09 13:18:15 +00:00
LegalizeTypes.cpp Refactor to expose RTLIB calls to targets. 2013-01-09 13:18:15 +00:00
LegalizeTypes.h Refactor to expose RTLIB calls to targets. 2013-01-09 13:18:15 +00:00
LegalizeTypesGeneric.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
LegalizeVectorOps.cpp When lowering an inreg sext first shift left, then right arithmetically. 2013-01-12 19:06:44 +00:00
LegalizeVectorTypes.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile
ResourcePriorityQueue.cpp Change TargetLowering::getRegClassFor to take an MVT, instead of EVT. 2012-12-13 06:34:11 +00:00
ScheduleDAGFast.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
ScheduleDAGRRList.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
ScheduleDAGSDNodes.cpp Change TargetLowering::getRepRegClassFor to take an MVT, instead of 2012-12-13 18:45:35 +00:00
ScheduleDAGSDNodes.h Change TargetLowering::getRepRegClassFor to take an MVT, instead of 2012-12-13 18:45:35 +00:00
ScheduleDAGVLIW.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
SDNodeDbgValue.h Sort includes for all of the .h files under the 'lib' tree. These were 2012-12-04 07:12:27 +00:00
SDNodeOrdering.h Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-18 02:01:41 +00:00
SelectionDAG.cpp PR14896: Handle memcpy from constant string where the memcpy size is larger than the string size. 2013-01-10 22:13:27 +00:00
SelectionDAGBuilder.cpp For inline asm: 2013-01-11 18:12:39 +00:00
SelectionDAGBuilder.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
SelectionDAGDumper.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
SelectionDAGISel.cpp Move TargetTransformInfo to live under the Analysis library. This no 2013-01-07 03:08:10 +00:00
SelectionDAGPrinter.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
TargetLowering.cpp Remove some accidentaly duplicated code. This needs urgent cleanup :( 2013-01-11 20:11:33 +00:00
TargetSelectionDAGInfo.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00