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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reproduced after disabling the extra pass_dce again on current trunk.
Slightly more readable testcase:
typedef unsigned short A;
typedef unsigned short B __attribute__ ((vector_size (16)));
typedef unsigned int C;
typedef unsigned int D __attribute__ ((vector_size (16)));
typedef unsigned long long E;
typedef unsigned long long F __attribute__ ((vector_size (16)));

E __attribute__ ((noinline, noclone))
foo (A a, C b, E c, A d, C e, E f, B g, D h, F i, B j, D k, F l)
{
  i %= (F) { (A) g[5], ~l[1] };
  i[1] = 1;
  k[3] >>= 31;
  l ^= (F) { j[4], f };
  l[0] = (l[0] >> 63) | (l[0] << 1);
  a -= 1;
  k %= (D) -i | 1;
  g /= (B) { -f } | 1;
  h[2] |= (A) ~d;
  return a + c + e + f + g[0] + g[1] + g[2] + g[3] + g[4] + g[5] + g[6] + h[2]
+ h[3] + i[0]
         + j[2] + j[4] + k[0] + k[1] + k[2] + k[3] + l[0] + l[1];
}

int
main ()
{
  E x = foo (0, 0, 1, 0, 0, 1, (B) { -1, 0, 0, 0, 0, 1 }, (D) { 0 }, (F) { 0 },
(B) { 0 }, (D) { 0 }, (F) { 0x67784fdb22ULL, 1 });
  __builtin_printf ("%016llx\n", (unsigned long long) (x >> 0));
  if (x != 0x000000cef0a1b646ULL)
    __builtin_abort ();
  return 0;
}

There are supposed to be mostly 0 values added, two 0xffff, and 5 1 values, and
one extra large one - the rotated l[0].
0x20002 corresponds to two 0xffff values and 4 1 values being added, so most
likely at least one issue is on the rotated l[0].
I've added breakpoints on the two (only) orr *, lsr #31 instructions and it
seems the inputs at that point is already wrong (0s).
Will continue debugging tomorrow.

Reply via email to