Full bfloat support in C/C++

Hi folks,

I’m working on a proprietary target with native bfloat support, and I recently started getting requests to enable it as a full arithmetic type in clang (currently devs have to exclusively use target-specific intrinsics). Some questions:

  1. Is anyone aware of an existing effort to add full support for bfloat to clang?
  2. Is there any kind of technical proposal in the works, by a standards body or otherwise? My web searches haven’t revealed anything obvious. I’d like to ensure anything I implement in this space is broadly heading in the same direction.
  3. Is there any appetite for taking a full bfloat extension upstream, assuming I can implement it and test it in the context of an in-tree target, or should I plan on maintaining this as a patch in our internal fork? If implemented as an expansion of the __bf16 storage type, the delta is manageable, so it’s not a big problem to maintain a patch. If there’s value in having this upstream, though, I’m happy to do the extra work therefor.

Tagging a couple of folks who (I think) have done substantive bfloat work recently: @d0k, @davemgreen

Many thanks,


P1467R9: Extended floating-point types and standard names added optional support for extended floating-point types in the standard.