llvm-6502/lib/CodeGen/SelectionDAG
Evan Cheng 02c4285643 Fixes a nasty dag combiner bug that causes a bunch of tests to fail at -O0.
It's not safe to use the two value CombineTo variant to combine away a dead load.
e.g. 
v1, chain2 = load chain1, loc
v2, chain3 = load chain2, loc
v3         = add v2, c 
Now we replace use of v1 with undef, use of chain2 with chain1.
ReplaceAllUsesWith() will iterate through uses of the first load and update operands:
v1, chain2 = load chain1, loc
v2, chain3 = load chain1, loc
v3         = add v2, c 
Now the second load is the same as the first load, SelectionDAG cse will ensure
the use of second load is replaced with the first load.
v1, chain2 = load chain1, loc
v3         = add v1, c
Then v1 is replaced with undef and bad things happen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46099 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-16 23:11:54 +00:00
..
CallingConvLower.cpp Oops. Forgot to commit this. 2008-01-15 07:49:36 +00:00
DAGCombiner.cpp Fixes a nasty dag combiner bug that causes a bunch of tests to fail at -O0. 2008-01-16 23:11:54 +00:00
LegalizeDAG.cpp merge a few pieces of code that do the store/load to stack 2008-01-16 07:51:34 +00:00
LegalizeTypes.cpp Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
LegalizeTypes.h Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
LegalizeTypesExpand.cpp Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
LegalizeTypesPromote.cpp Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
LegalizeTypesScalarize.cpp Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
LegalizeTypesSplit.cpp Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
Makefile remove attribution from lib Makefiles. 2007-12-29 20:09:26 +00:00
ScheduleDAG.cpp rename TargetInstrDescriptor -> TargetInstrDesc. 2008-01-07 07:27:27 +00:00
ScheduleDAGList.cpp Rename SSARegMap -> MachineRegisterInfo in keeping with the idea 2007-12-31 04:13:23 +00:00
ScheduleDAGRRList.cpp Special copy SUnit's do not have SDNode's. 2008-01-09 23:01:55 +00:00
SelectionDAG.cpp Fix a ppc long double regression I introduced yesterday due to a 2008-01-16 17:59:31 +00:00
SelectionDAGISel.cpp For PR1839: add initial support for __builtin_trap. llvm-gcc part is missed 2008-01-15 07:02:33 +00:00
SelectionDAGPrinter.cpp Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
TargetLowering.cpp Add support for targets that have a legal ISD::TRAP. 2008-01-15 21:58:08 +00:00