https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97519
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2020-10-21 Ever confirmed|0 |1 Keywords| |missed-optimization Version|unknown |11.0 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, the generic is X OP CST (for / and %: CST OP X) into X inside __builtin_constant_p. Though the question should we do this on the gimple level or before hand?