@@ -32649,8 +32649,7 @@ static SDValue ExtendToType(SDValue InOp, MVT NVT, SelectionDAG &DAG,
32649
32649
"Unexpected request for vector widening");
32650
32650
32651
32651
SDLoc dl(InOp);
32652
- if (InOp.getOpcode() == ISD::CONCAT_VECTORS &&
32653
- InOp.getNumOperands() == 2) {
32652
+ if (InOp.getOpcode() == ISD::CONCAT_VECTORS && InOp.getNumOperands() == 2) {
32654
32653
SDValue N1 = InOp.getOperand(1);
32655
32654
if ((ISD::isBuildVectorAllZeros(N1.getNode()) && FillWithZeroes) ||
32656
32655
N1.isUndef()) {
@@ -32661,22 +32660,17 @@ static SDValue ExtendToType(SDValue InOp, MVT NVT, SelectionDAG &DAG,
32661
32660
}
32662
32661
if (ISD::isBuildVectorOfConstantSDNodes(InOp.getNode()) ||
32663
32662
ISD::isBuildVectorOfConstantFPSDNodes(InOp.getNode())) {
32664
- SmallVector<SDValue, 16> Ops;
32665
- for (unsigned i = 0; i < InNumElts; ++i)
32666
- Ops.push_back(InOp.getOperand(i));
32667
-
32668
32663
EVT EltVT = InOp.getOperand(0).getValueType();
32669
-
32670
- SDValue FillVal = FillWithZeroes ? DAG.getConstant(0, dl, EltVT) :
32671
- DAG.getUNDEF(EltVT);
32672
- for (unsigned i = 0; i < WidenNumElts - InNumElts; ++i)
32673
- Ops.push_back(FillVal);
32664
+ SDValue FillVal =
32665
+ FillWithZeroes ? DAG.getConstant(0, dl, EltVT) : DAG.getUNDEF(EltVT);
32666
+ SmallVector<SDValue, 16> Ops(InOp->op_begin(), InOp->op_end());
32667
+ Ops.append(WidenNumElts - InNumElts, FillVal);
32674
32668
return DAG.getBuildVector(NVT, dl, Ops);
32675
32669
}
32676
- SDValue FillVal = FillWithZeroes ? DAG.getConstant(0, dl, NVT) :
32677
- DAG.getUNDEF(NVT);
32678
- return DAG.getNode(ISD::INSERT_SUBVECTOR, dl, NVT, FillVal,
32679
- InOp, DAG.getIntPtrConstant(0, dl));
32670
+ SDValue FillVal =
32671
+ FillWithZeroes ? DAG.getConstant(0, dl, NVT) : DAG.getUNDEF(NVT);
32672
+ return DAG.getNode(ISD::INSERT_SUBVECTOR, dl, NVT, FillVal, InOp,
32673
+ DAG.getIntPtrConstant(0, dl));
32680
32674
}
32681
32675
32682
32676
static SDValue LowerMSCATTER(SDValue Op, const X86Subtarget &Subtarget,
0 commit comments