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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection             |
                 CC|                            |jakub at gcc dot gnu.org
            Summary|[16 Regression] AArch64:    |[16 Regression] AArch64:
                   |Wrong code at -O1           |Wrong code at -O1 since
                   |                            |r16-5022

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
typedef unsigned char V __attribute__((vector_size (4)));
unsigned long long c;

signed char
foo  ()
{
  return 0;
}

unsigned int
bar (V x, short int y, long long z)
{
  _BitInt (15) a = 828;
  a &= (unsigned) z < 5 ? 0 : (unsigned) x[1];
  if (y)
    return a;
  for (unsigned short d; d; )
    ;
}

int
baz (unsigned char x)
{
  unsigned long long a[] = { };
  unsigned long long b = bar ((V) { 1, 1, 1 }, 1, -1);
  if (x)
    {
      c += b;
      return 0;
    }
  a[bar ((V) {}, 0, foo  ())];
}

int
main ()
{
  baz (1);
  if (c)
    __builtin_abort ();
}

Started with r16-5022-ga50b4406e5d64adb6bb0ebde3710f6742a0bdbed
 Trying 14 -> 15:
    14: r104:HI=r108:SI#0 0>>0x8
       REG_DEAD r108:SI
    15: r112:SI=r104:HI#0&0x7fff
       REG_DEAD r104:HI
 Successfully matched this instruction:
 (set (subreg:DI (reg:SI 112) 0)
     (zero_extract:DI (subreg:DI (reg/v:SI 108 [ x ]) 0)
-        (const_int 8 [0x8])
+        (const_int 15 [0xf])
         (const_int 8 [0x8])))

Reply via email to