Skip to content

Commit d1a69e4

Browse files
shamithokeshami
and
shami
authored
Move gfni for bitreverse check out of SSSE3. (#88938)
For lowering bitreverse using GFNI, the check is put under SSSE3. This can be pulled out of SSSE3. Co-authored-by: shami <[email protected]>
1 parent 17b86d5 commit d1a69e4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,6 +1276,13 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
12761276
setOperationAction(ISD::STRICT_FDIV, MVT::v2f64, Legal);
12771277
}
12781278

1279+
if (Subtarget.hasGFNI()) {
1280+
setOperationAction(ISD::BITREVERSE, MVT::i8, Custom);
1281+
setOperationAction(ISD::BITREVERSE, MVT::i16, Custom);
1282+
setOperationAction(ISD::BITREVERSE, MVT::i32, Custom);
1283+
setOperationAction(ISD::BITREVERSE, MVT::i64, Custom);
1284+
}
1285+
12791286
if (!Subtarget.useSoftFloat() && Subtarget.hasSSSE3()) {
12801287
setOperationAction(ISD::ABS, MVT::v16i8, Legal);
12811288
setOperationAction(ISD::ABS, MVT::v8i16, Legal);
@@ -1286,13 +1293,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
12861293
setOperationAction(ISD::CTLZ, VT, Custom);
12871294
}
12881295

1289-
if (Subtarget.hasGFNI()) {
1290-
setOperationAction(ISD::BITREVERSE, MVT::i8, Custom);
1291-
setOperationAction(ISD::BITREVERSE, MVT::i16, Custom);
1292-
setOperationAction(ISD::BITREVERSE, MVT::i32, Custom);
1293-
setOperationAction(ISD::BITREVERSE, MVT::i64, Custom);
1294-
}
1295-
12961296
// These might be better off as horizontal vector ops.
12971297
setOperationAction(ISD::ADD, MVT::i16, Custom);
12981298
setOperationAction(ISD::ADD, MVT::i32, Custom);

0 commit comments

Comments
 (0)