https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83072
Bug ID: 83072 Summary: Late VRP optimization Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target Milestone: --- Before r254954, cmpmul-1.c was optimized during EVRP: int f(int a, int b, int c){ c |= 1; a *= c; b *= c; return a == b; } After that revision, the range deduced for c|1 contains zero (we may want to revisit that at some point, but that's a separate issue), so I changed the testcase to int f(int a, int b, int c){ if(c==0)__builtin_unreachable(); a *= c; b *= c; return a == b; } which is only optimized during forwprop3, after __builtin_unreachable() is removed. Since EVRP knows how to perform this optimization, it may be worth investigating why it fails to perform it in this case.