Changes in directory llvm/lib/Target/X86:
X86ISelDAGToDAG.cpp updated: 1.123 -> 1.124 --- Log message: 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.123 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.124 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.123 Wed Nov 8 14:34:28 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Fri Nov 10 15:23:04 2006 @@ -815,6 +815,7 @@ InChain = N.getOperand(0).getValue(1); if (ISD::isNON_EXTLoad(InChain.Val) && InChain.getValue(0).hasOneUse() && + N.hasOneUse() && CanBeFoldedBy(N.Val, Pred.Val, Op.Val)) { LoadSDNode *LD = cast<LoadSDNode>(InChain); if (!SelectAddr(Op, LD->getBasePtr(), Base, Scale, Index, Disp)) _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits