Skip to content

Commit c82a549

Browse files
authored
[RISCV] Support fixed vector VP_LOAD/STORE for bf16 and f16 without Zvfh. (#107297)
This allows odd sized vector load/store to be legalized to a VP_LOAD/STORE using EVL. I changed the bf16 tests in fixed-vectors-load.ll and fixed-vectors-store.ll to use an illegal type to be consistent with the intent of these files. A legal type is already tested in fixed-vectors-load-store.ll
1 parent ef1ef03 commit c82a549

File tree

4 files changed

+974
-1834
lines changed

4 files changed

+974
-1834
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
13171317
// FIXME: mload, mstore, mgather, mscatter, vp_load/store,
13181318
// vp_stride_load/store, vp_gather/scatter can be hoisted to here.
13191319
setOperationAction({ISD::LOAD, ISD::STORE}, VT, Custom);
1320+
setOperationAction({ISD::VP_LOAD, ISD::VP_STORE}, VT, Custom);
13201321

13211322
setOperationAction({ISD::FP_ROUND, ISD::FP_EXTEND}, VT, Custom);
13221323
setOperationAction({ISD::STRICT_FP_ROUND, ISD::STRICT_FP_EXTEND}, VT,
@@ -1378,8 +1379,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
13781379
setOperationAction(
13791380
{ISD::MLOAD, ISD::MSTORE, ISD::MGATHER, ISD::MSCATTER}, VT, Custom);
13801381

1381-
setOperationAction({ISD::VP_LOAD, ISD::VP_STORE,
1382-
ISD::EXPERIMENTAL_VP_STRIDED_LOAD,
1382+
setOperationAction({ISD::EXPERIMENTAL_VP_STRIDED_LOAD,
13831383
ISD::EXPERIMENTAL_VP_STRIDED_STORE, ISD::VP_GATHER,
13841384
ISD::VP_SCATTER},
13851385
VT, Custom);

0 commit comments

Comments
 (0)