[llvm] [SelectionDAG] Add `STRICT_BF16_TO_FP` and `STRICT_FP_TO_BF16` (PR #80056)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 23:36:06 PST 2024


arsenm wrote:

> define void @float_to_bfloat(float %0) strictfp {
>   %2 = tail call bfloat @llvm.experimental.constrained.fptrunc.bfloat.f32(float %0, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
>   store bfloat %2, ptr @a, align 2
>   ret void
> }

For this example, I see an assert with -mtriple=x86_64--. "Assertion failed: (RVT == MVT::f16), function SoftPromoteHalfRes_FP_ROUND". For aarch64, I see a libcall to __truncsfbf2

https://github.com/llvm/llvm-project/pull/80056


More information about the llvm-commits mailing list