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

            Bug ID: 102794
           Summary: [12 Regression] missing vrp in evrp dealing with casts
                    and ands
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
void foo(void);
int main() {
  int b = 0;
  int a = -100;
  for (; a; ++a) {
    unsigned short d = a;
    if (!(b | d) && d)
      foo();
  }
  return 0;
}

--- CUT ----
This used to be optimized during evrp in 11.1.0/11.2.0 but trunk evrp does not.
This is reduced from PR 102703 but is related issue though different.

Reply via email to