bug-coreutils@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: "Pádraig Brady" <P@draigBrady.com>
To: Grisha Levit <grishalevit@gmail.com>, 69770-done@debbugs.gnu.org
Subject: bug#69770: [PATCH] build: strengthen 16 bit float support checks
Date: Wed, 13 Mar 2024 12:36:51 +0000	[thread overview]
Message-ID: <40cecf61-b314-8648-ede4-a86ffdeda226@draigBrady.com> (raw)
In-Reply-To: <20240313022545.13117-1-grishalevit@gmail.com>

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




  reply	other threads:[~2024-03-13 12:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13  2:24 bug#69770: [PATCH] build: strengthen 16 bit float support checks Grisha Levit
2024-03-13 12:36 ` Pádraig Brady [this message]
2024-03-14  5:59 ` Paul Eggert
2024-03-14 13:03   ` Pádraig Brady
2024-03-14 13:35     ` Collin Funk
2024-03-14 14:48       ` Pádraig Brady
2024-03-14 15:51         ` Collin Funk
2024-03-15  5:21     ` Paul Eggert
2024-03-15 11:49       ` Pádraig Brady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40cecf61-b314-8648-ede4-a86ffdeda226@draigBrady.com \
    --to=p@draigbrady.com \
    --cc=69770-done@debbugs.gnu.org \
    --cc=grishalevit@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).