[Bug tree-optimization/125811] `a * (1 << b)` is not transformed into `a << b` in some cases

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 16 07:30:14 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125811

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
But a * (1<<b) and a << b have different sets of UB (left shift of negative
value).  Watch out for wrong-code and missed UBSAN.


More information about the Gcc-bugs mailing list