[Bug tree-optimization/83544] Missed optimization opportunity for constant folding
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83544 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Target Milestone|--- |11.0 Resolution|--- |FIXED --- Comment #2 from Andrew Pinski --- Fixed 100% in 11+ by r11-6100, there was some other VRP patch back in GCC 9 which also fixed this too but I can't find it.
[Bug tree-optimization/83544] Missed optimization opportunity for constant folding
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83544 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement Known to fail||8.5.0 Known to work||9.1.0, 9.4.0
[Bug tree-optimization/83544] Missed optimization opportunity for constant folding
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83544 Richard Biener changed: What|Removed |Added Keywords||missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed||2018-01-02 Ever confirmed|0 |1
[Bug tree-optimization/83544] Missed optimization opportunity for constant folding
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83544 --- Comment #1 from Marc Glisse --- In one case we optimize super early to int t = 1 / (int) x <= 0 ? 1 / 0 : 1; which prevents the VRP optimization from the other case. We almost recover in isolate-paths, except that Jeff insisted on using __builtin_trap() instead of __builtin_unreachable(), so we don't. We could still simplify _2 = 1 / x.1_1; if (_2 != 1) a bit to avoid actually performing the division, I think that's already tracked in one of your earlier PRs.