https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52919
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|wrong-code |missed-optimization
CC| |rguenth at gcc dot gnu.org
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'll note the documentation of SHIFT_COUNT_TRUNCATED says
A C expression that is nonzero if on this machine the number of bits
actually used for the count of a shift operation is equal to the number
of bits needed to represent the SIZE of the object being shifted.
(emphasis mine), so I'd say the code is correct as written and a
target with 20bit modes that truncates the shift amout to 20bits
cannot use SHIFT_COUNT_TRUNCATED to indicate this.