]> git.ipfire.org Git - thirdparty/gcc.git/commit
Enable more optimization for 32-bit/64-bit shrd/shld with imm shift count.
authorliuhongt <hongtao.liu@intel.com>
Thu, 27 Oct 2022 10:48:41 +0000 (18:48 +0800)
committerliuhongt <hongtao.liu@intel.com>
Tue, 1 Nov 2022 03:23:45 +0000 (11:23 +0800)
commit5c5ef2f9ab545b680cd4bb6c540a9dadb12ead86
tree500d8816c1ea6a7fb678cbdd9748468220e0f655
parentaf6d747df7e311a6555dda3a75f6724ecc4481bd
Enable more optimization for 32-bit/64-bit shrd/shld with imm shift count.

This patch doens't handle variable count since it require 5 insns to
be combined to get wanted pattern, but current pass_combine only
supports at most 4.
This patch doesn't handle 16-bit shrd/shld either.

gcc/ChangeLog:

PR target/55583
* config/i386/i386.md (*x86_64_shld_1): Rename to ..
(x86_64_shld_1): .. this.
(*x86_shld_1): Rename to ..
(x86_shld_1): .. this.
(*x86_64_shrd_1): Rename to ..
(x86_64_shrd_1): .. this.
(*x86_shrd_1): Rename to ..
(x86_shrd_1): .. this.
(*x86_64_shld_shrd_1_nozext): New pre_reload splitter.
(*x86_shld_shrd_1_nozext): Ditto.
(*x86_64_shrd_shld_1_nozext): Ditto.
(*x86_shrd_shld_1_nozext): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr55583.c: New test.
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/pr55583.c [new file with mode: 0644]