[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:
I think we don't need to exclude `f80` and `f128`. We can use a loop for them.
```
for (auto VT : {MVT::f32, MVT::f64, MVT::f80, MVT::f128}) {
setOperationAction(ISD::STRICT_FP_TO_BF16, VT, Expand);
setOperationAction(ISD::STRICT_BF16_TO_FP, VT, Expand);
}
```
https://github.com/llvm/llvm-project/pull/80056
More information about the llvm-commits
mailing list