[Bug middle-end/125708] Missed optimization: division by (2 - bool) emits idivl instead of shift/select
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 10 03:02:28 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125708
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-06-10
Keywords| |easyhack
Ever confirmed|0 |1
--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
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.
More information about the Gcc-bugs
mailing list