Was returning the wrong type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27277 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 922245f..f1e36be 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -154,7 +154,6 @@
// Figure out the right, legal destination reg to copy into.
unsigned NumElts = PTy->getNumElements();
MVT::ValueType EltTy = getValueType(PTy->getElementType());
- PTyElementVT = EltTy;
unsigned NumVectorRegs = 1;
@@ -166,10 +165,12 @@
}
MVT::ValueType VT;
- if (NumElts == 1)
+ if (NumElts == 1) {
VT = EltTy;
- else
- VT = getVectorType(EltTy, NumElts);
+ } else {
+ VT = getVectorType(EltTy, NumElts);
+ }
+ PTyElementVT = VT;
MVT::ValueType DestVT = getTypeToTransformTo(VT);
PTyLegalElementVT = DestVT;