@@ -46202,21 +46202,14 @@ static SDValue combineToExtendBoolVectorInReg(
46202
46202
// widened bits won't be used, and this might allow the use of a broadcast
46203
46203
// load.
46204
46204
assert((EltSizeInBits % NumElts) == 0 && "Unexpected integer scale");
46205
- unsigned Scale = EltSizeInBits / NumElts;
46206
- EVT BroadcastVT =
46207
- EVT::getVectorVT(*DAG.getContext(), SclVT, NumElts * Scale);
46208
- Vec = DAG.getNode(ISD::SCALAR_TO_VECTOR, DL, BroadcastVT, N00);
46209
- ShuffleMask.append(NumElts * Scale, 0);
46210
- Vec = DAG.getVectorShuffle(BroadcastVT, DL, Vec, Vec, ShuffleMask);
46211
- Vec = DAG.getBitcast(VT, Vec);
46205
+ EVT BroadcastVT = EVT::getVectorVT(*DAG.getContext(), SclVT,
46206
+ (NumElts * EltSizeInBits) / NumElts);
46207
+ Vec = DAG.getBitcast(VT, DAG.getSplat(BroadcastVT, DL, N00));
46212
46208
} else {
46213
46209
// For smaller scalar integers, we can simply any-extend it to the vector
46214
46210
// element size (we don't care about the upper bits) and broadcast it to all
46215
46211
// elements.
46216
- SDValue Scl = DAG.getAnyExtOrTrunc(N00, DL, SVT);
46217
- Vec = DAG.getNode(ISD::SCALAR_TO_VECTOR, DL, VT, Scl);
46218
- ShuffleMask.append(NumElts, 0);
46219
- Vec = DAG.getVectorShuffle(VT, DL, Vec, Vec, ShuffleMask);
46212
+ Vec = DAG.getSplat(VT, DL, DAG.getAnyExtOrTrunc(N00, DL, SVT));
46220
46213
}
46221
46214
46222
46215
// Now, mask the relevant bit in each element.
0 commit comments