https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125708
--- Comment #5 from Drea Pinski <pinskia at gcc dot gnu.org> --- (In reply to Hongtao Liu from comment #4) > (In reply to Drea Pinski from comment #1) > > Given a range that only has 2 values we could "change" a/b into `b==value1 ? > > a/value1 : a/value2` during the last forwprop via match. > > If we want to do it for powers of 2 only that might be a good idea. > > > It sounds like a different optimization which speculatively optimize for a/b > or a%b to runtime check if b is powerof2? Not really. because in your case the power of 2 is 1 and 2. So value1 is 1 and value2 is 2.
