Skip to content

Commit efe9ba5

Browse files
committed
[RISCV] Deduplicate VECTOR_SHUFFLE fixed-length FP setOperationAction. NFC
Also reshuffle the nodes so they're in enum order.
1 parent 9f73c69 commit efe9ba5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,9 +1333,9 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
13331333
// expansion to a build_vector of 0s.
13341334
setOperationAction(ISD::UNDEF, VT, Custom);
13351335

1336-
setOperationAction({ISD::CONCAT_VECTORS, ISD::VECTOR_REVERSE,
1337-
ISD::INSERT_SUBVECTOR, ISD::EXTRACT_SUBVECTOR,
1338-
ISD::VECTOR_COMPRESS},
1336+
setOperationAction({ISD::CONCAT_VECTORS, ISD::INSERT_SUBVECTOR,
1337+
ISD::EXTRACT_SUBVECTOR, ISD::VECTOR_REVERSE,
1338+
ISD::VECTOR_SHUFFLE, ISD::VECTOR_COMPRESS},
13391339
VT, Custom);
13401340

13411341
// FIXME: mload, mstore, mgather, mscatter, vp_gather/scatter can be
@@ -1359,7 +1359,6 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
13591359
Custom);
13601360
setOperationAction({ISD::VP_SINT_TO_FP, ISD::VP_UINT_TO_FP}, VT,
13611361
Custom);
1362-
setOperationAction(ISD::VECTOR_SHUFFLE, VT, Custom);
13631362
if (Subtarget.hasStdExtZfhmin()) {
13641363
setOperationAction(ISD::BUILD_VECTOR, VT, Custom);
13651364
} else {
@@ -1384,7 +1383,6 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
13841383
if (VT.getVectorElementType() == MVT::bf16) {
13851384
setOperationAction(ISD::BITCAST, VT, Custom);
13861385
setOperationAction({ISD::VP_FP_ROUND, ISD::VP_FP_EXTEND}, VT, Custom);
1387-
setOperationAction(ISD::VECTOR_SHUFFLE, VT, Custom);
13881386
if (Subtarget.hasStdExtZfbfmin()) {
13891387
setOperationAction(ISD::BUILD_VECTOR, VT, Custom);
13901388
} else {
@@ -1406,7 +1404,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
14061404
continue;
14071405
}
14081406

1409-
setOperationAction({ISD::BUILD_VECTOR, ISD::VECTOR_SHUFFLE,
1407+
setOperationAction({ISD::BUILD_VECTOR,
14101408
ISD::INSERT_VECTOR_ELT, ISD::EXTRACT_VECTOR_ELT,
14111409
ISD::SCALAR_TO_VECTOR},
14121410
VT, Custom);

0 commit comments

Comments
 (0)