public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/105197] New: [12 Regression] SVE: wrong code with -O -ftree-vectorize
@ 2022-04-07 16:59 acoplan at gcc dot gnu.org
  2022-04-08  8:28 ` [Bug target/105197] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2022-04-07 16:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105197
           Summary: [12 Regression] SVE: wrong code with -O
                    -ftree-vectorize
           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 code:

unsigned char arr_7[9][3];
unsigned char (*main_arr_7)[3] = arr_7;
int main() {
  char arr_2[9];
  int arr_6[9];
  int x;
  unsigned i;
  for (i = 0; i < 9; ++i) {
    arr_2[i] = 21;
    arr_6[i] = 6;
  }
  for (i = arr_2[8] - 21; i < 2; i++)
    x = arr_6[i] ? (main_arr_7[8][i] ? main_arr_7[8][i] : 8) : (char)arr_6[i];
  if (x != 8)
    __builtin_abort ();
}

appears to be miscompiled with -march=armv8.2-a+sve -O -ftree-vectorize. The
issue doesn't seem to occur with GCC 11.

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

end of thread, other threads:[~2022-04-11 14:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07 16:59 [Bug target/105197] New: [12 Regression] SVE: wrong code with -O -ftree-vectorize acoplan at gcc dot gnu.org
2022-04-08  8:28 ` [Bug target/105197] " rguenth at gcc dot gnu.org
2022-04-08  8:41 ` rguenth at gcc dot gnu.org
2022-04-10  7:04 ` tnfchris at gcc dot gnu.org
2022-04-11  6:59 ` tnfchris at gcc dot gnu.org
2022-04-11  8:05 ` rguenth at gcc dot gnu.org
2022-04-11 14:09 ` cvs-commit at gcc dot gnu.org
2022-04-11 14:25 ` tnfchris 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).