[llvm] [LLVM][NVPTX]Add BF16 vector instruction and fix lowering rules (PR #69415)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 12:10:09 PDT 2023
================
@@ -741,12 +753,14 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
// These map to conversion instructions for scalar FP types.
for (const auto &Op : {ISD::FCEIL, ISD::FFLOOR, ISD::FNEARBYINT, ISD::FRINT,
ISD::FROUNDEVEN, ISD::FTRUNC}) {
- setOperationAction(Op, MVT::bf16, Legal);
+ setBF16OperationAction(Op, MVT::bf16, Legal, Promote);
----------------
Artem-B wrote:
Nit. I'd move it down to where we do `AddPromotedToType()`.
https://github.com/llvm/llvm-project/pull/69415
More information about the llvm-commits
mailing list