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

--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #4)
> Looking at x86 shl/shr instructions, it seems they don't do the
> SHIFT_COUNT_TRUNCATED masking, but actually mask always the shift count with
> & 31 (unless 64-bit shift, then it is indeed SHIFT_COUNT_TRUNCATED).

Yes, this is the reason x86 doesn't define SHIFT_COUNT_TRUNCATED (also, the
documentation is confusing to me, talking about some "real or pretended" bit
field operations). OTOH, x86 has several combined patterns that remove masking
from SImode and DImode shift/rotate instructions.

It is possible to define TARGET_SHIFT_TRUNCATION_MASK, but when experimenting
with this hook, I didn't find any effect on shifts.

Reply via email to