Skip to content

Commit c097e12

Browse files
committed
Extend the optimization towards other vectors
Also add a missing `Subtarget.useSoftFloat()`
1 parent d4194ec commit c097e12

File tree

2 files changed

+184
-598
lines changed

2 files changed

+184
-598
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,12 +1323,15 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
13231323
setOperationAction(ISD::STRICT_FDIV, MVT::v2f64, Legal);
13241324
}
13251325

1326-
if (Subtarget.hasGFNI()) {
1326+
if (!Subtarget.useSoftFloat() && Subtarget.hasGFNI()) {
13271327
setOperationAction(ISD::BITREVERSE, MVT::i8, Custom);
13281328
setOperationAction(ISD::BITREVERSE, MVT::i16, Custom);
13291329
setOperationAction(ISD::BITREVERSE, MVT::i32, Custom);
13301330
setOperationAction(ISD::BITREVERSE, MVT::i64, Custom);
1331-
setOperationAction(ISD::BITREVERSE, MVT::v16i8, Custom);
1331+
1332+
for (auto VT : {MVT::v16i8, MVT::v8i16, MVT::v4i32, MVT::v2i64}) {
1333+
setOperationAction(ISD::BITREVERSE, VT, Custom);
1334+
}
13321335
}
13331336

13341337
if (!Subtarget.useSoftFloat() && Subtarget.hasSSSE3()) {

0 commit comments

Comments
 (0)