[llvm] [X86] Add support for `__bf16` to `f16` conversion (PR #134859)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 8 07:48:44 PDT 2025


phoebewang wrote:

Thanks for the fix! We intended not to assign `__bf16` a register classes because 1) there's not a single scalar BF16 instrcution supported on x86 so far; 2) we can leverage the target independent expansion to lower BF16 operations.

It is not a big problem though. We support FP16 without any the scalar feature enabled too. But there's more work to do than the current change. The FP16 type enabling [patch](https://github.com/llvm/llvm-project/commit/655ba9c8a1d22075443711cc749f0b032e07adee#diff-566ce04d692d687aff8e101d34a724f95d99740a07a1912d1cc94cf027fab0ca) would be a good example. 

OTOH, I'm not sure if it's a big hammer for the issue here. Would it be better to explore some small change in fastisel side for it?

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


More information about the llvm-commits mailing list