diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-11-10 21:23:04 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-11-10 21:23:04 +0000 |
commit | d6373bcd8232fe40fc4296a6f5e2d374b196bc6c (patch) | |
tree | b32e27abc2d16e78ed44b2b11e0dbebc996ff266 /lib/Target | |
parent | a5fd380ac4aaa9dee0099fd3415394a86e60830f (diff) | |
download | external_llvm-d6373bcd8232fe40fc4296a6f5e2d374b196bc6c.zip external_llvm-d6373bcd8232fe40fc4296a6f5e2d374b196bc6c.tar.gz external_llvm-d6373bcd8232fe40fc4296a6f5e2d374b196bc6c.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/X86/X86ISelDAGToDAG.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index b8f5414..68b89a4 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -815,6 +815,7 @@ bool X86DAGToDAGISel::SelectScalarSSELoad(SDOperand Op, SDOperand Pred, 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)) |