[Bug target/126450] [16/17 Regression] wrong code at -O2 -mavx2 since r16-8339

"jakub at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126450

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com,
                   |                            |jakub at gcc dot gnu.org
           Priority|P3                          |P2
            Summary|[16/17 Regression] wrong    |[16/17 Regression] wrong
                   |code at -O2 -mavx2          |code at -O2 -mavx2 since
                   |                            |r16-8339
   Target Milestone|---                         |16.2
   Last reconfirmed|                            |2026-07-28
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r16-8339-gb4c215b36d63e1c264d8c1bd5d34f9aef1bb8463
typedef int V [[gnu::vector_size (16)]];
long long a, b, c, d, e;
short f;
[[gnu::vector_size (8 * sizeof (int))]] int g;
V h;
_Bool i;

void
foo (V x)
{
  _Bool j = 0;
  short l = 0;
l1:
  b = l;
  x = h;
  l = c % 4;
  i = f = e % 6;
  e = x[j];
  g = g > g;
  if (d)
    goto l2;
l3:
  j = l;
  if (j)
    goto l1;
  a = l;
l2:
  if (e)
    goto l3;
}

int
main ()
{
  foo (h);
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.