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

            Bug ID: 92734
           Summary: Missing match.pd simplification done by
                    fold_binary_loc on generic
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

While working on the PR92712 testcases, I had to remove one testcase I wrote,
because we haven't simplified stuff in GIMPLE in that case (we do on RTL):
int
foo (int t)
{
  return 1 - (int) (1U - t);
}

int
bar (int t)
{
  int a = 1U - t;
  return 1 - a;
}

The first function is optimized into return t during fold_binary_loc associate:
but there isn't anything in match.pd that handles this (or should it be some
special pass?).

Reply via email to