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

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[Trunk] Loongarch64:        |[15/16 Regression]
                   |miscompile at -O2           |Loongarch64: miscompile at
                   |                            |-O2
             Status|WAITING                     |NEW
           Keywords|                            |needs-bisection
   Target Milestone|---                         |15.3

--- Comment #2 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Alright, reproducing needs -mno-lsx.

Reduced further:

#include <stdint.h>
#include <stdio.h>
typedef uint16_t a;
typedef uint64_t uint64;
typedef a b __attribute__((vector_size(8)));
typedef a c __attribute__((vector_size(16)));
uint64 d;
int32_t e, i;
a x;
int main() {
  b n = {1};
  uint64 *o = &d;
p:
  asm goto("" : : : : q);
  n[3] = (-(c){0,0,0,0,x})[7];
  for (; e >= 0; e--) {
    *o = n[0];
    if (i)
      goto p;
  q:
  }
  printf("%d\n", (int)d);
}

Reply via email to