[Bug middle-end/118360] [avr] Expensive shift instead of bit test
gjl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Dec 7 20:38:54 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118360
--- Comment #7 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #6)
> For AVR a sequence using shifts is bad
and the variant with MUL is even worse. It's so bad that I added stuff in the
avr backend that try to hack around PR118360 / PR118012. So to see whether any
changes will improve the situation for avr and have any effect, you'll have to
compile with -mno-pr118012 in order to turn off these hacks.
It's still beyond me why the root cause isn't fixed, that is: Transformations
in match.pd that is not optimizations, not a canonicalization, that cannot be
rolled back due to its structure, and that cannot be turned off by some target
means.
More information about the Gcc-bugs
mailing list