https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112389
Bug ID: 112389 Summary: `(x | z) < (x >> y)` should be optimized to 0 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take: ``` unsigned f(unsigned x, unsigned y, unsigned z) { return (x | z) < (x >> y); } unsigned g(unsigned x, unsigned y, unsigned z) { return (x) < (x >> y); } ``` We can optimize g during EVRP (and dom) to 0. But we could in theory pattern match f and g too.