[llvm-commits] [llvm] r47163 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Dan Gohman gohman at apple.com
Fri Feb 15 10:11:59 PST 2008


Author: djg
Date: Fri Feb 15 12:11:59 2008
New Revision: 47163

URL: http://llvm.org/viewvc/llvm-project?rev=47163&view=rev
Log:
Use StoreSDNode::getValue instead of calling getOperand directly
with a hard-coded operand number.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=47163&r1=47162&r2=47163&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Feb 15 12:11:59 2008
@@ -2344,14 +2344,14 @@
           MVT::ValueType TVT = MVT::getVectorType(EVT, NumElems);
           if (TLI.isTypeLegal(TVT)) {
             // Turn this into a normal store of the vector type.
-            Tmp3 = LegalizeOp(Node->getOperand(1));
+            Tmp3 = LegalizeOp(ST->getValue());
             Result = DAG.getStore(Tmp1, Tmp3, Tmp2, ST->getSrcValue(),
                                   SVOffset, isVolatile, Alignment);
             Result = LegalizeOp(Result);
             break;
           } else if (NumElems == 1) {
             // Turn this into a normal store of the scalar type.
-            Tmp3 = ScalarizeVectorOp(Node->getOperand(1));
+            Tmp3 = ScalarizeVectorOp(ST->getValue());
             Result = DAG.getStore(Tmp1, Tmp3, Tmp2, ST->getSrcValue(),
                                   SVOffset, isVolatile, Alignment);
             // The scalarized value type may not be legal, e.g. it might require
@@ -2359,12 +2359,12 @@
             Result = LegalizeOp(Result);
             break;
           } else {
-            SplitVectorOp(Node->getOperand(1), Lo, Hi);
+            SplitVectorOp(ST->getValue(), Lo, Hi);
             IncrementSize = MVT::getVectorNumElements(Lo.Val->getValueType(0)) * 
                             MVT::getSizeInBits(EVT)/8;
           }
         } else {
-          ExpandOp(Node->getOperand(1), Lo, Hi);
+          ExpandOp(ST->getValue(), Lo, Hi);
           IncrementSize = Hi.Val ? MVT::getSizeInBits(Hi.getValueType())/8 : 0;
 
           if (TLI.isBigEndian())





More information about the llvm-commits mailing list