[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)
Muhammad Bassiouni via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 4 00:26:01 PDT 2025
bassiounix wrote:
Looks like that `BFloat16Format` for `amdgcn-amd-amdhsa` target is not properly initialized and the `hasBFloat16Type` method at [`clang/lib/Basic/Targets/AMDGPU.h`](https://github.com/llvm/llvm-project/blob/92923e517c2926eb94b7b6e403433ecf62953186/clang/lib/Basic/Targets/AMDGPU.h#L127) is using a dummy check to that is based on the triple value only. Also there's no overrides for a full type support.
The global value of `BFloat16Format` in `AMDGPUTI` is properly initialized.
I think `TargetInfo::adjust` at [`clang/lib/Basic/TargetInfo.cpp`](https://github.com/llvm/llvm-project/blob/92923e517c2926eb94b7b6e403433ecf62953186/clang/lib/Basic/TargetInfo.cpp#L409) may be the reason but I'm not sure
https://github.com/llvm/llvm-project/pull/134214
More information about the cfe-commits
mailing list