[llvm] [GlobalISel] Fall back for bf16 conversions. (PR #71470)

Amara Emerson via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 15 04:05:38 PST 2024


aemerson wrote:

> > > Now an error is reported for a very simple bf16 data addition. Is this modification too violent?
> > > ```
> > > #include <arm_neon.h>
> > > bfloat16_t test(bfloat16_t gpara1, bfloat16_t gpara2)
> > > {
> > >     return gpara1+gpara2;
> > > }
> > > ```
> > 
> > 
> > No, this is exactly the kind of case that is supposed to be rejected
> 
> clang -O0 -march=armv8.2-a+bf16 test.c
> 
> I don't really understand that at this point our hardware already supports the bf16 data type.

GlobalISel doesn't currently support bf16 properly until we add FP types. This change is supposed to trigger an abort or fallback to SDAG so that we don't silently miscompile bf16 code as if it were FP16.

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


More information about the llvm-commits mailing list