]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Generalize x >> 32-y to x >> -y conversion with multiples of 32
authorUros Bizjak <ubizjak@gmail.com>
Mon, 25 Nov 2024 19:04:38 +0000 (20:04 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Mon, 25 Nov 2024 19:07:06 +0000 (20:07 +0100)
commit551fd4d5c98859522dd21db6fbb39fceac3936b2
tree39020bc664c8517a90802dcf0fc8e667be8a18d7
parent9afcbc2dd3cd2dfe90c91ddfa71a49e571ad5e61
i386: Generalize x >> 32-y to x >> -y conversion with multiples of 32

Optimize also cases where immediate value is a multiple of 32 for 32-bit
shifts (or multiple of 64 for 64-bit shifts).

gcc/ChangeLog:

* config/i386/i386.md (*ashl<mode>3_negcnt):
For SImode shifts allow multiples of 32 (or multiples
of 64 for DImode shifts) for immediate operand 3.
(*ashl<mode>3_negcnt_1): Ditto.
(*<insn><mode>3_negcnt): Ditto.
(*<insn><mode>3_negcnt_1): Ditto.
gcc/config/i386/i386.md