]> git.ipfire.org Git - thirdparty/gcc.git/commit
Disparages SSE_REGS alternatives sligntly with ?v instead of *v in *mov{si,di}_internal.
authorliuhongt <hongtao.liu@intel.com>
Mon, 30 May 2022 07:30:51 +0000 (15:30 +0800)
committerliuhongt <hongtao.liu@intel.com>
Wed, 8 Jun 2022 03:23:49 +0000 (11:23 +0800)
commit5e005393d4ff0a428c5f55b9ba7f65d6078a7cf5
treeec0597e79a6e2f5edc49614ec0e810d5e72fedec
parente4bdeaba6ef8a83877417f7ec172fd8743370284
Disparages SSE_REGS alternatives sligntly with ?v instead of *v in *mov{si,di}_internal.

So alternative v won't be igored in record_reg_classess.

Similar for *r alternatives in some vector patterns.

It helps testcase in the PR, also RA now makes better decisions for
gcc.target/i386/extract-insert-combining.c

        movd    %esi, %xmm0
        movd    %edi, %xmm1
-       movl    %esi, -12(%rsp)
        paddd   %xmm0, %xmm1
        pinsrd  $0, %esi, %xmm0
        paddd   %xmm1, %xmm0

The patch has no big impact on SPEC2017 for both O2 and Ofast
march=native run.

And I noticed there's some changes in SPEC2017 from code like

mov mem, %eax
vmovd %eax, %xmm0
..
mov %eax, 64(%rsp)

to

vmovd mem, %xmm0
..
vmovd %xmm0, 64(%rsp)

Which should be exactly what we want?

gcc/ChangeLog:

PR target/105513
PR target/105504
* config/i386/i386.md (*movsi_internal): Change alternative
from *v to ?v.
(*movdi_internal): Ditto.
* config/i386/sse.md (vec_set<mode>_0): Change alternative *r
to ?r.
(*vec_extractv4sf_mem): Ditto.
(*vec_extracthf): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr105513-1.c: New test.
* gcc.target/i386/extract-insert-combining.c: Add new
scan-assembler-not for spill.
gcc/config/i386/i386.md
gcc/config/i386/sse.md
gcc/testsuite/gcc.target/i386/extract-insert-combining.c
gcc/testsuite/gcc.target/i386/pr105513-1.c [new file with mode: 0644]