[PATCH] D151313: [RISCV][BF16] Make backend type bf16 to follow the psABI

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 10:50:02 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2458
+  SDValue Res =
+      makeLibCall(DAG, RTLIB::FPEXT_F16_F32, MVT::f32, Arg, CallOptions, DL)
+          .first;
----------------
craig.topper wrote:
> If the libcall doesn't exist, you can cast it to i16, any_extend to i32, and shift it left by 16 and bitcast it to f32.
Which is what the default lowering in LegalizeDAG.cpp does.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151313/new/

https://reviews.llvm.org/D151313



More information about the llvm-commits mailing list