public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113751] New: -mapxf -mfma4 generates wrong assembly code
@ 2024-02-04  1:27 hjl.tools at gmail dot com
  2024-02-04  2:15 ` [Bug target/113751] " hongyuw at gcc dot gnu.org
  2024-02-04  3:55 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: hjl.tools at gmail dot com @ 2024-02-04  1:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113751
           Summary: -mapxf -mfma4 generates wrong assembly code
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: crazylht at gmail dot com
  Target Milestone: ---
            Target: x86-64

[hjl@gnu-icx-1 creduce-1]$ cat x.i
struct {
  double a[8]
} a;
double b, c, d;
int e, f, g;
void h() {
  f = e;
  d = a.a[g + 1];
  c = a.a[g] + a.a[g + 3] * (a.a[g + 4] *
                             (a.a[g + 5] *
                              (a.a[g + 6] * (a.a[g + 7] * a.a[g + 8] + b))));
  d += e > a.a[g + 11];
}
[hjl@gnu-icx-1 creduce-1]$
/export/build/gnu/tools-build/gcc-x32-gitlab/release/usr/gcc-14.0.1-x32/bin/gcc
-O3 -mfma4 -mapxf x.i -w -c
/tmp/cchsm1V9.s: Assembler messages:
/tmp/cchsm1V9.s:38: Error: extended GPR cannot be used as base/index for
`vfmaddsd'
[hjl@gnu-icx-1 creduce-1]$

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/113751] -mapxf -mfma4 generates wrong assembly code
  2024-02-04  1:27 [Bug target/113751] New: -mapxf -mfma4 generates wrong assembly code hjl.tools at gmail dot com
@ 2024-02-04  2:15 ` hongyuw at gcc dot gnu.org
  2024-02-04  3:55 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: hongyuw at gcc dot gnu.org @ 2024-02-04  2:15 UTC (permalink / raw)
  To: gcc-bugs

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

Hongyu Wang <hongyuw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hongyuw at gcc dot gnu.org

--- Comment #1 from Hongyu Wang <hongyuw at gcc dot gnu.org> ---
We haven't disable AMD ISAs like XOP/FMA4 as it will not invoke with APX. 

Quoted from Richard's comment

> We haven’t disabled EGPR for 3DNOW/XOP/LWP/FMA4/TBM instructions, as they will
> be co-operated with -mapxf. We can disable EGPR for them if AMD guys requires.

I think most of these are retired by now, so it's unlikely an
implementation providing
these and also APX will appear.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/113751] -mapxf -mfma4 generates wrong assembly code
  2024-02-04  1:27 [Bug target/113751] New: -mapxf -mfma4 generates wrong assembly code hjl.tools at gmail dot com
  2024-02-04  2:15 ` [Bug target/113751] " hongyuw at gcc dot gnu.org
@ 2024-02-04  3:55 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-04  3:55 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-02-04
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-04  3:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04  1:27 [Bug target/113751] New: -mapxf -mfma4 generates wrong assembly code hjl.tools at gmail dot com
2024-02-04  2:15 ` [Bug target/113751] " hongyuw at gcc dot gnu.org
2024-02-04  3:55 ` pinskia at gcc dot gnu.org

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).