[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Evan Cheng
evan.cheng at apple.com
Fri Nov 10 13:23:18 PST 2006
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))
More information about the llvm-commits
mailing list