OSDN Git Service

fix compilation failure of smg2000
authorChris Lattner <sabre@nondot.org>
Thu, 12 Oct 2006 03:55:48 +0000 (03:55 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 12 Oct 2006 03:55:48 +0000 (03:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30900 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelDAGToDAG.cpp

index 3963473..e895b04 100644 (file)
@@ -797,7 +797,7 @@ bool X86DAGToDAGISel::SelectScalarSSELoad(SDOperand N, SDOperand &Base,
                                           SDOperand &OutChain) {
   if (N.getOpcode() == ISD::SCALAR_TO_VECTOR) {
     InChain = N.getOperand(0).getValue(1);
-    if (ISD::isNON_EXTLoad(InChain.Val)) {
+    if (ISD::isNON_EXTLoad(InChain.Val) && InChain.getValue(0).hasOneUse()) {
       LoadSDNode *LD = cast<LoadSDNode>(InChain);
       if (!SelectAddr(LD->getBasePtr(), Base, Scale, Index, Disp))
         return false;