[llvm] [RISCV] Add codegen support for Zvfbfmin (PR #87911)
Jianjian Guan via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 10 07:34:02 PDT 2024
================
@@ -1080,6 +1080,21 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
}
}
+ // TODO: Could we merge some code with zvfhmin?
+ if (Subtarget.hasVInstructionsBF16()) {
+ for (MVT VT : BF16VecVTs) {
+ if (!isTypeLegal(VT))
+ continue;
+ setOperationAction({ISD::FP_ROUND, ISD::FP_EXTEND}, VT, Custom);
+ setOperationAction({ISD::VP_FP_ROUND, ISD::VP_FP_EXTEND}, VT, Custom);
+ setOperationAction({ISD::CONCAT_VECTORS, ISD::INSERT_SUBVECTOR,
+ ISD::EXTRACT_SUBVECTOR, ISD::SCALAR_TO_VECTOR},
+ VT, Custom);
+ setOperationAction({ISD::LOAD, ISD::STORE}, VT, Custom);
+ // TODO: Promote to fp32.
----------------
jacquesguan wrote:
`SPLAT_VECTOR` and select/merge with splat depends on `Zvfh`, so I plan to add these in a separate patch.
https://github.com/llvm/llvm-project/pull/87911
More information about the llvm-commits
mailing list