llvm-6502/lib/CodeGen/SelectionDAG
Hal Finkel 3da41a28a1 Revert "Revert '[DAGCombiner] Split up an indexed load if only the base pointer value is live'"
I reverted r208640 in r209747 because r208640 broke self-hosting on PPC64. The
underlying cause of the failure is that pre-inc loads with increments
represented by ISD::TargetConstants were being transformed into ISD:::ADDs with
ISD::TargetConstant operands. PPC doesn't have a pattern for those, and so they
were selected as invalid r+r adds.

This recommits r208640, rebased and with an exclusion for ISD::TargetConstant
increments. This behavior seems correct, although in the future we might want
to ask the target to split out the indexing that uses ISD::TargetConstants.

Unfortunately, I don't yet have small test case where the relevant invalid
'add' instruction is not itself dead (and thus eliminated by
DeadMachineInstructionElim -- sometimes bugpoint is too good at removing things)

Original commit message (by Adam Nemet):

Right now the load may not get DCE'd because of the side-effect of updating
the base pointer.

This can happen if we lower a read-modify-write of an illegal larger type
(e.g. i48) such that the modification only affects one of the subparts (the
lower i32 part but not the higher i16 part).  See the testcase.

In order to spot the dead load we need to revisit it when SimplifyDemandedBits
decided that the value of the load is masked off.  This is the
CommitTargetLoweringOpt piece.

I checked compile time with ARM64 by sending SPEC bitcode files through llc.
No measurable change.

Fixes <rdar://problem/16031651>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216898 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 06:24:04 +00:00
..
CMakeLists.txt
DAGCombiner.cpp Revert "Revert '[DAGCombiner] Split up an indexed load if only the base pointer value is live'" 2014-09-02 06:24:04 +00:00
FastISel.cpp [FastISel] Undo phi node updates when falling-back to SelectionDAG. 2014-08-28 02:06:55 +00:00
FunctionLoweringInfo.cpp Add a const and munge some comments 2014-08-29 21:42:21 +00:00
InstrEmitter.cpp Remove the TargetMachine forwards for TargetSubtargetInfo based 2014-08-04 21:25:23 +00:00
InstrEmitter.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
LegalizeDAG.cpp [SDAG] Re-instate r215611 with a fix to a pesky X86 DAG combine. 2014-08-27 11:22:16 +00:00
LegalizeFloatTypes.cpp ARM: fix @llvm.convert.from.fp16 on softfloat targets. 2014-07-29 09:56:38 +00:00
LegalizeIntegerTypes.cpp Revert r216066, "Optimize ZERO_EXTEND and SIGN_EXTEND in both SelectionDAG Builder and type". 2014-08-21 01:59:30 +00:00
LegalizeTypes.cpp Make it possible for ints/floats to return different values from getBooleanContents() 2014-07-10 10:18:12 +00:00
LegalizeTypes.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
LegalizeTypesGeneric.cpp AA metadata refactoring (introduce AAMDNodes) 2014-07-24 12:16:19 +00:00
LegalizeVectorOps.cpp Teach the AArch64 backend about v4f16 and v8f16 2014-08-27 16:16:04 +00:00
LegalizeVectorTypes.cpp Add support for scalarizing cttz_zero_undef 2014-08-10 22:49:54 +00:00
LLVMBuild.txt
Makefile
ResourcePriorityQueue.cpp Remove the TargetMachine forwards for TargetSubtargetInfo based 2014-08-04 21:25:23 +00:00
ScheduleDAGFast.cpp [Modules] Remove potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:02:50 +00:00
ScheduleDAGRRList.cpp Remove the TargetMachine forwards for TargetSubtargetInfo based 2014-08-04 21:25:23 +00:00
ScheduleDAGSDNodes.cpp Make this SmallVector size a power of two as suggested by Chandler 2014-08-11 13:47:57 +00:00
ScheduleDAGSDNodes.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
ScheduleDAGVLIW.cpp Remove the TargetMachine forwards for TargetSubtargetInfo based 2014-08-04 21:25:23 +00:00
SDNodeDbgValue.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
SelectionDAG.cpp Do not assume the value passed to memset is an i32. 2014-08-29 08:23:53 +00:00
SelectionDAGBuilder.cpp [ARM] Enable DP copy, load and store instructions for FPv4-SP 2014-08-21 12:50:31 +00:00
SelectionDAGBuilder.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
SelectionDAGDumper.cpp Have MachineFunction cache a pointer to the subtarget to make lookups 2014-08-05 02:39:49 +00:00
SelectionDAGISel.cpp Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
SelectionDAGPrinter.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
TargetLowering.cpp Remove the TargetMachine forwards for TargetSubtargetInfo based 2014-08-04 21:25:23 +00:00
TargetSelectionDAGInfo.cpp Have TargetSelectionDAGInfo take a DataLayout initializer rather than 2014-06-06 19:04:48 +00:00