Changes in directory llvm/lib/Target/X86:
X86ISelDAGToDAG.cpp updated: 1.122 -> 1.122.2.1 --- Log message: Merge from mainline. Fix a bug in SelectScalarSSELoad. Since the load is wrapped in a SCALAR_TO_VECTOR, even if the hasOneUse() check pass we may end up folding the load into two instructions. Make sure we check the SCALAR_TO_VECTOR has only one use as well. --- Diffs of the changes: (+1 -0) X86ISelDAGToDAG.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.122 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.122.2.1 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.122 Sun Nov 5 13:31:28 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Fri Nov 10 15:55:57 2006 @@ -814,6 +814,7 @@ InChain = N.getOperand(0).getValue(1); if (ISD::isNON_EXTLoad(InChain.Val) && InChain.getValue(0).hasOneUse() && + N.hasOneUse() && CanBeFoldedBy(N.Val, Pred.Val, Root.Val)) { LoadSDNode *LD = cast<LoadSDNode>(InChain); if (!SelectAddr(LD->getBasePtr(), Base, Scale, Index, Disp)) _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits