https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116024
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Blocks|85316 | Last reconfirmed| |2024-07-21 CC|hubicka at gcc dot gnu.org, |pinskia at gcc dot gnu.org |jh at suse dot cz | Component|middle-end |tree-optimization Target Milestone|--- |14.2 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note I don't think IPA is the issue of exporting (correctly) the return value range. The problem is VRP decides to create `a == 0 ? 2 : 3` which gets converted into `3 - a` (which then vrp again converts into `a == 0 ? 2 : 3`). But then `(3 - a) == 2` is never optimized to just `a == 0` by match or something else. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85316 [Bug 85316] [meta-bug] VRP range propagation missed cases