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]$