diff --git a/llvm/lib/Target/TargetLowering.cpp b/llvm/lib/Target/TargetLowering.cpp index 922245f55355ac679223c8c2b4ace16f96915b3e..f1e36be494d8129302131f6fb99f52bcdf6bf40c 100644 --- a/llvm/lib/Target/TargetLowering.cpp +++ b/llvm/lib/Target/TargetLowering.cpp @@ -154,7 +154,6 @@ unsigned TargetLowering::getPackedTypeBreakdown(const PackedType *PTy, // 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 @@ unsigned TargetLowering::getPackedTypeBreakdown(const PackedType *PTy, } 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;