public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/111876] New: aarch64: Wrong code for bf16 complex mul/div when the target has +fp16 support.
Date: Thu, 19 Oct 2023 09:36:16 +0000	[thread overview]
Message-ID: <bug-111876-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111876

            Bug ID: 111876
           Summary: aarch64: Wrong code for bf16 complex mul/div when the
                    target has +fp16 support.
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
  Target Milestone: ---

this is somewhat similar to PR111867, but in this case the issue seems to
happen at expand time.

---- reduced from "bfloat16-complex.c"

volatile __bf16 a = 1.0bf16;
typedef _Complex float __cbf16 __attribute__((__mode__(__BC__)));
volatile __cbf16 b = __builtin_complex (2.0bf16, 3.0bf16);

int main (void)
{
  volatile __cbf16 r ;
  r = a + b;
  r *= r;
  return 0;
}

----

For -march=armv8.4-a+fp16

This lowers to calls to (non-existent libgcc) ___mulbc3 (and __divbc3, when
division is included).

For -march=armv8.4-a

This promotes the bf16 -> float and calls __mulsc3 (which exists)

             reply	other threads:[~2023-10-19  9:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19  9:36 iains at gcc dot gnu.org [this message]
2023-10-19 18:58 ` [Bug target/111876] aarch64: bf16 complex mul/div does not work " pinskia at gcc dot gnu.org
2023-10-19 19:05 ` iains at gcc dot gnu.org
2023-10-19 19:08 ` pinskia at gcc dot gnu.org
2023-10-19 19:17 ` [Bug target/111876] aarch64: bf16 complex mul/div does not work when the target has +fp16 support or when -fexcess-precision=16 is supplied pinskia at gcc dot gnu.org
2023-10-19 22:12 ` [Bug target/111876] " iains at gcc dot gnu.org
2023-12-10  2:32 ` [Bug middle-end/111876] " pinskia at gcc dot gnu.org

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

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

  git send-email \
    --in-reply-to=bug-111876-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).