https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100095
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |85316 Version|unknown |11.0 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2021-04-15 Keywords| |missed-optimization --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- VRP optimizes this at -O2 but fails at -O3 where we fail to do some final value replacement as we unswitch the loop nest on the b != 0 condition which makes us end up with multiple exits which final_value_replacement_loop doesn't like (it's somewhat artificial what we end up with - leaving code commoning on the plate). In the end the trigger of the missing optimization is unswitching. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85316 [Bug 85316] [meta-bug] VRP range propagation missed cases