GNU bug report logs -
#69770
[PATCH] build: strengthen 16 bit float support checks
Previous Next
Reported by: Grisha Levit <grishalevit <at> gmail.com>
Date: Wed, 13 Mar 2024 02:27:02 UTC
Severity: normal
Tags: patch
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 69770-done <at> debbugs.gnu.org (full text, mbox):
On 13/03/2024 02:24, Grisha Levit wrote:
> Recent clang provides __bf16 on aarch64 but it is broken.
>
> If built with -O0, the conversion is wrong:
>
> $ printf '\x3F\x80' | od --end=big -An -tfB | tr -d ' '
> 1.875
>
> If built with -O1 or higher, compilation fails:
>
> fatal error: error in backend: Cannot select: 0xb400007a58d29780: f32 = fp_extend 0xb400007a58d31720
> 0xb400007a58d31720: bf16,ch = CopyFromReg 0xb400007b78c53720, Register:bf16 %13
> 0xb400007a58d29470: bf16 = Register %13
> In function: print_bfloat
>
> The latter issue does not cause the existing configure test to fail
> because the promotion is optimized out.
>
> * configure.ac: Ensure 16 bit float promotion code does not get
> optimized out, and produces an expected result.
Looks good!
I'll follow up with another patch to all these involved checks to be cached / bypassed,
by wrapping them in AC_CACHE_VAL().
Marking this as done.
thanks!
Pádraig
This bug report was last modified 1 year and 69 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.