[compiler-rt] [llvm] [SelectionDAG] Add `STRICT_BF16_TO_FP` and `STRICT_FP_TO_BF16` (PR #80056)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 3 01:14:02 PST 2024
================
@@ -437,6 +437,13 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
setOperationAction(Op, MVT::f128, Expand);
}
+ // FIXME: If a target has F16C, it needs to be Custom.
+ setOperationAction(ISD::STRICT_FP_TO_BF16, MVT::f32, Expand);
----------------
phoebewang wrote:
The comment is not correct. We don't need to custom for F16C. We cannot do custom at all because we don't have BF16 truncation instrcutions that support exception.
That's why I suggest you add a test for AVX512BF16, e.g.,
```
; RUN: llc < %s -mtriple=x86_64-linux-gnu -mattr=+avx512bf16,+avx512vl | FileCheck %s --check-prefix=X64
```
https://github.com/llvm/llvm-project/pull/80056
More information about the llvm-commits
mailing list