]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Fix missed APX_NDD check for shift/rotate expanders [PR 112943]
authorHongyu Wang <hongyu.wang@intel.com>
Mon, 11 Dec 2023 11:30:42 +0000 (19:30 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Tue, 12 Dec 2023 02:50:27 +0000 (10:50 +0800)
commit07dcb39e08aa52f166e8d74420364757002ad756
tree7d0d0227accb47f32699fc6222b41c2a96607243
parent2900a77fe4e7d2211a785d427794544fe3d01960
i386: Fix missed APX_NDD check for shift/rotate expanders [PR 112943]

The ashl/lshr/ashr expanders calls ix86_expand_binary_operator, while
they will be called for some post-reload split, and TARGET_APX_NDD is
required for these calls to avoid force-load to memory at postreload
stage.

gcc/ChangeLog:

PR target/112943
* config/i386/i386.md (ashl<mode>3): Add TARGET_APX_NDD to
ix86_expand_binary_operator call.
(<insn><mode>3): Likewise for rshift.
(<insn>di3): Likewise for DImode rotate.
(<insn><mode>3): Likewise for SWI124 rotate.

gcc/testsuite/ChangeLog:

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