[Lldb-commits] [lldb] [lldb][TypeSystemClang] Added unique builtins types for __bf16 and _Float16 (PR #157674)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 1 07:01:52 PDT 2025
DavidSpickett wrote:
A few printfs later:
```
(lldb) p f0
Typename::::::::::>>>>>>> __bf16
has bfloat16?: 0
HasBfloat16: 0
FPU: 0
SoftFloat: 0
Qual type: __bf16
qual_type_bit_size = 0, bit_size = 16
Qual type: float
qual_type_bit_size = 32, bit_size = 16
Qual type: double
qual_type_bit_size = 64, bit_size = 16
Qual type: long double
qual_type_bit_size = 64, bit_size = 16
Qual type: __fp16
qual_type_bit_size = 16, bit_size = 16
(Foo<__fp16>) {}
```
ARM has a bf16 type in the AST context only if this is true:
```
bool ARMTargetInfo::hasBFloat16Type() const {
// The __bf16 type is generally available so long as we have any fp registers.
return HasBFloat16 || (FPU && !SoftFloat);
}
```
And for whatever reason, the lookup is set to a target without bf16 or an FPU. Not sure where we pull the target setting from (istr some triple to core details mapping) but regardless, we're missing FPU (which my host does have) and bfloat16 (which my host does not have).
For AArch64 this method just returns true.
I'll find the source of the target type but in the meantime I'll skip or work around this failure.
https://github.com/llvm/llvm-project/pull/157674
More information about the lldb-commits
mailing list