[llvm] [RISCV] Add codegen support for Zvfbfmin (PR #87911)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 08:59:35 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.
----------------
michaelmaitland wrote:
Based on the comments in this thread, we have been able to trim down the original list. We are left with consideration of `STRICT_FP_ROUND, STRICT_FP_EXTEND. Are we able to address those opcodes here?
https://github.com/llvm/llvm-project/pull/87911
More information about the llvm-commits
mailing list