diff options
author | Dale Johannesen <dalej@apple.com> | 2007-10-20 00:07:52 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-10-20 00:07:52 +0000 |
commit | db132452e3caa89308c519f44693efa96b583f59 (patch) | |
tree | 92d1e1fb18e13a11005038d1de56ccf473d5ee9f /lib/CodeGen/SelectionDAG | |
parent | f4ca511d79623f35f784ba88a9e8f1aeef579bfd (diff) | |
download | external_llvm-db132452e3caa89308c519f44693efa96b583f59.zip external_llvm-db132452e3caa89308c519f44693efa96b583f59.tar.gz external_llvm-db132452e3caa89308c519f44693efa96b583f59.tar.bz2 |
Fix a few places vector operations were not getting
the operand's type from the right place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43195 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 336cecb..5998bc0 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1919,8 +1919,9 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { Result = LegalizeOp(Result); } else { SDNode *InVal = Tmp2.Val; - unsigned NumElems = MVT::getVectorNumElements(InVal->getValueType(0)); - MVT::ValueType EVT = MVT::getVectorElementType(InVal->getValueType(0)); + int InIx = Tmp2.ResNo; + unsigned NumElems = MVT::getVectorNumElements(InVal->getValueType(InIx)); + MVT::ValueType EVT = MVT::getVectorElementType(InVal->getValueType(InIx)); // Figure out if there is a simple type corresponding to this Vector // type. If so, convert to the vector type. @@ -2114,8 +2115,9 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { // in the high half of the vector. if (MVT::isVector(ST->getValue().getValueType())) { SDNode *InVal = ST->getValue().Val; - unsigned NumElems = MVT::getVectorNumElements(InVal->getValueType(0)); - MVT::ValueType EVT = MVT::getVectorElementType(InVal->getValueType(0)); + int InIx = ST->getValue().ResNo; + unsigned NumElems = MVT::getVectorNumElements(InVal->getValueType(InIx)); + MVT::ValueType EVT = MVT::getVectorElementType(InVal->getValueType(InIx)); // Figure out if there is a simple type corresponding to this Vector // type. If so, convert to the vector type. @@ -3260,8 +3262,9 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { // The input has to be a vector type, we have to either scalarize it, pack // it, or convert it based on whether the input vector type is legal. SDNode *InVal = Node->getOperand(0).Val; - unsigned NumElems = MVT::getVectorNumElements(InVal->getValueType(0)); - MVT::ValueType EVT = MVT::getVectorElementType(InVal->getValueType(0)); + int InIx = Node->getOperand(0).ResNo; + unsigned NumElems = MVT::getVectorNumElements(InVal->getValueType(InIx)); + MVT::ValueType EVT = MVT::getVectorElementType(InVal->getValueType(InIx)); // Figure out if there is a simple type corresponding to this Vector // type. If so, convert to the vector type. |