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

            Bug ID: 124545
           Summary: VN nary lookup trick for converted plus/minus lacks
                    inverse trick
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

As noted in PR109393

int func1(int *a, int j) {
  int k = j - 1;
  return a[j - 1] == a[k];
}

int func2(int *a, int j) {
  int k = j - 1;
  return a[k] == a[j-1];
}

are not both optimized to return 1.

Reply via email to