public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/105219] New: [12 Regression] SVE: Wrong code with -O3 -msve-vector-bits=128 -mtune=thunderx
@ 2022-04-11 13:29 acoplan at gcc dot gnu.org
  2022-04-11 15:56 ` [Bug target/105219] " tnfchris at gcc dot gnu.org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: acoplan at gcc dot gnu.org @ 2022-04-11 13:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105219
           Summary: [12 Regression] SVE: Wrong code with -O3
                    -msve-vector-bits=128 -mtune=thunderx
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

The following C program appears to be miscompiled with -O3 -march=armv8.2-a+sve
-msve-vector-bits=128 -mtune=thunderx :

int a;
char b[60];
short c[18];
short d[4][19];
long long f;
void e(int g, int h, short k[][19]) {
  for (signed i = 0; i < 3; i += 2)
    for (signed j = 1; j < h + 14; j++) {
      b[i * 14 + j] = 1;
      c[i + j] = k[2][j];
      a = g ? k[i][j] : 0;
    }
}
int main() {
  e(9, 1, d);
  for (long l = 0; l < 6; ++l)
    for (long m = 0; m < 4; ++m)
      f ^= b[l + m * 4];
  if (f)
    __builtin_abort ();
}

Of course the choice of tuning is not sensible when asking for SVE, but GCC
shouldn't produce wrong code in any case. I can't reproduce the problem with
GCC 11.

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

end of thread, other threads:[~2022-04-29 15:32 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 13:29 [Bug target/105219] New: [12 Regression] SVE: Wrong code with -O3 -msve-vector-bits=128 -mtune=thunderx acoplan at gcc dot gnu.org
2022-04-11 15:56 ` [Bug target/105219] " tnfchris at gcc dot gnu.org
2022-04-11 16:02 ` ktkachov at gcc dot gnu.org
2022-04-11 16:05 ` acoplan at gcc dot gnu.org
2022-04-11 16:12 ` tnfchris at gcc dot gnu.org
2022-04-12 11:08 ` tnfchris at gcc dot gnu.org
2022-04-12 11:30 ` rguenth at gcc dot gnu.org
2022-04-12 11:36 ` tnfchris at gcc dot gnu.org
2022-04-12 12:20 ` tnfchris at gcc dot gnu.org
2022-04-13 11:34 ` tnfchris at gcc dot gnu.org
2022-04-13 13:48 ` tnfchris at gcc dot gnu.org
2022-04-20  7:07 ` rguenth at gcc dot gnu.org
2022-04-25  7:07 ` tnfchris at gcc dot gnu.org
2022-04-27 11:56 ` [Bug tree-optimization/105219] " marxin at gcc dot gnu.org
2022-04-27 12:02 ` rguenth at gcc dot gnu.org
2022-04-27 12:06 ` rsandifo at gcc dot gnu.org
2022-04-27 12:27 ` rguenth at gcc dot gnu.org
2022-04-27 12:30 ` rguenth at gcc dot gnu.org
2022-04-27 13:44 ` avieira at gcc dot gnu.org
2022-04-28  8:10 ` cvs-commit at gcc dot gnu.org
2022-04-28  8:10 ` rguenth at gcc dot gnu.org
2022-04-28 12:17 ` rguenth at gcc dot gnu.org
2022-04-29 15:32 ` cvs-commit 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).