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

            Bug ID: 126184
           Summary: [16/17 Regression] wrong code with ifcvt
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64

While working on an RTL ifcvt patch I've noticed this program aborts:
__attribute__ ((noipa)) unsigned long long
f (unsigned long long c, unsigned long long x, unsigned long long y,
   unsigned long long z)
{
  if (c != 0)
    {
      c = x + 1;
      x = c * y;
      c = z + 3;
      y = c * x;
    }

  return x + y;
}

int
main (void)
{
  if (f (1, 13, 17, 23) != 6426)
    __builtin_abort ();
  if (f (0, 13, 17, 23) != 30)
    __builtin_abort ();
  return 0;
}

on aarch64 when compiled with -O2 -fno-tree-ter -fno-tree-coalesce-vars
GCC 15 seems to not be aborting

Reply via email to