]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Fix wrong insn generated by shld/shrd ndd split [PR118510]
authorHongyu Wang <hongyu.wang@intel.com>
Fri, 17 Jan 2025 01:04:17 +0000 (09:04 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Mon, 20 Jan 2025 01:01:11 +0000 (09:01 +0800)
commitaf4fb245e12f2dd8e2c32167c9acfaceb4b6af6a
treef15b306a734fe05dee95adf5b51c94744f817d48
parenta7185d9bc6dd065ae84a4240e935254de4771549
i386: Fix wrong insn generated by shld/shrd ndd split [PR118510]

For shld/shrd_ndd_2 insn, the spiltter outputs wrong pattern that
mixed parallel for clobber and set. Use register_operand as dest
and ajdust output template to fix.

gcc/ChangeLog:

PR target/118510
* config/i386/i386.md (*x86_64_shld_ndd_2): Use register_operand
for operand[0] and adjust the output template to directly
generate ndd form shld pattern.
(*x86_shld_ndd_2): Likewise.
(*x86_64_shrd_ndd_2): Likewise.
(*x86_shrd_ndd_2): Likewise.

gcc/testsuite/ChangeLog:

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