Re-enable BF16 on x86 in debug builds with Clang 22 or later#2781
Conversation
jan-wassenberg
left a comment
There was a problem hiding this comment.
How about we make the check >= 2300? The issue is that all the various pre-release LLVM versions already call themselves "22", but they might be before or after the fix. Or can we see more with HWY_COMPILER_CLANG3?
|
@johnplatts do you think you can ask upstream llvm for a backport to llvm-21 branch? I could do that as well, but you might be better at explaining them why this would be a good candidate (: |
A better alternative is |
jan-wassenberg
left a comment
There was a problem hiding this comment.
Sounds good, thanks for updating.
There is a recent fix in LLVM 22 that fixes the bug with
_BFloat16in debug builds on x86, and this bug was fixed in LLVM pull request llvm/llvm-project#164565 (which has been recently merged into the LLVM trunk).It is now safe to define
HWY_SSE2_HAVE_SCALAR_BF16_TYPEto 1 in debug builds with Clang 22 and later on x86 with the fix in llvm/llvm-project#164565.