When folding a load into a return of SSE value, check the chain to

ensure the memory location has not been clobbered.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25861 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2006-02-01 00:20:21 +00:00
parent 4ccf4c0d0b
commit 0d084c9e4a

View File

@ -1912,10 +1912,11 @@ SDOperand X86TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
Ops.push_back(Op.getOperand(1));
Copy = DAG.getNode(X86ISD::FP_SET_RESULT, Tys, Ops);
} else {
SDOperand MemLoc, Chain;
SDOperand MemLoc;
SDOperand Chain = Op.getOperand(0);
SDOperand Value = Op.getOperand(1);
if (Value.getOpcode() == ISD::LOAD) {
if (Value.getOpcode() == ISD::LOAD && Chain == Value.getOperand(0)) {
Chain = Value.getOperand(0);
MemLoc = Value.getOperand(1);
} else {