@@ -31312,14 +31312,11 @@ static SDValue LowerBITREVERSE_XOP(SDValue Op, SelectionDAG &DAG) {
31312
31312
return DAG.getBitcast(VT, Res);
31313
31313
}
31314
31314
31315
- static auto createBSWAPShuffleMask(EVT VT) {
31316
- SmallVector<int, 16> ShuffleMask;
31315
+ static void createBSWAPShuffleMask(EVT VT, SmallVector<int, 16>& ShuffleMask) {
31317
31316
int ScalarSizeInBytes = VT.getScalarSizeInBits() / 8;
31318
31317
for (int I = 0, E = VT.getVectorNumElements(); I != E; ++I)
31319
31318
for (int J = ScalarSizeInBytes - 1; J >= 0; --J)
31320
31319
ShuffleMask.push_back((I * ScalarSizeInBytes) + J);
31321
-
31322
- return ShuffleMask;
31323
31320
}
31324
31321
31325
31322
static SDValue LowerBITREVERSE(SDValue Op, const X86Subtarget &Subtarget,
@@ -31334,7 +31331,7 @@ static SDValue LowerBITREVERSE(SDValue Op, const X86Subtarget &Subtarget,
31334
31331
if (HasGFNI && ((ScalarType == MVT::i32) || (ScalarType == MVT::i64))) {
31335
31332
if (VT.isVector()) {
31336
31333
SmallVector<int, 16> BSWAPMask = createBSWAPShuffleMask(VT);
31337
- EVT ByteVT =
31334
+ MVT ByteVT =
31338
31335
EVT::getVectorVT(*DAG.getContext(), MVT::i8, BSWAPMask.size());
31339
31336
SDValue VecShuffle = DAG.getVectorShuffle(
31340
31337
ByteVT, DL, DAG.getNode(ISD::BITCAST, DL, ByteVT, In),
@@ -31355,14 +31352,6 @@ static SDValue LowerBITREVERSE(SDValue Op, const X86Subtarget &Subtarget,
31355
31352
}
31356
31353
}
31357
31354
31358
- if (Subtarget.hasXOP() && !VT.is512BitVector())
31359
- return LowerBITREVERSE_XOP(Op, DAG);
31360
-
31361
- assert(Subtarget.hasSSSE3() && "SSSE3 required for BITREVERSE");
31362
-
31363
- assert(VT.getScalarType() == MVT::i8 &&
31364
- "Only byte vector BITREVERSE supported");
31365
-
31366
31355
// Split v64i8 without BWI so that we can still use the PSHUFB lowering.
31367
31356
31368
31357
if (Subtarget.hasXOP() && !VT.is512BitVector())
0 commit comments