]> git.ipfire.org Git - thirdparty/gcc.git/commit
Movement between GENERAL_REGS and SSE_REGS for TImode doesn't need secondary reload.
authorliuhongt <hongtao.liu@intel.com>
Mon, 12 Aug 2024 10:24:34 +0000 (18:24 +0800)
committerliuhongt <hongtao.liu@intel.com>
Thu, 15 Aug 2024 11:15:22 +0000 (19:15 +0800)
commitf7e672da8fc3d416a6d07eb01f3be4400ef94fac
tree4fd6643de7a6bf2f30ffeda3cb0708162dd8867c
parentcc2d29e5f4434a3fd4e0dd93ea4f9857a0309201
Movement between GENERAL_REGS and SSE_REGS for TImode doesn't need secondary reload.

It results in 2 failures for x86_64-pc-linux-gnu{\
-march=cascadelake};

gcc: gcc.target/i386/extendditi3-1.c scan-assembler cqt?o
gcc: gcc.target/i386/pr113560.c scan-assembler-times \tmulq 1

For pr113560.c, now GCC generates mulx instead of mulq with
-march=cascadelake, which should be optimal, so adjust testcase for
that.
For gcc.target/i386/extendditi2-1.c, RA happens to choose another
register instead of rax and result in

movq %rdi, %rbp
movq %rdi, %rax
sarq $63, %rbp
movq %rbp, %rdx

The patch adds a new define_peephole2 for that.

gcc/ChangeLog:

PR target/116274
* config/i386/i386-expand.cc (ix86_expand_vector_move):
Restrict special case TImode to 128-bit vector conversions via
V2DI under ix86_pre_reload_split ().
* config/i386/i386.cc (inline_secondary_memory_needed):
Movement between GENERAL_REGS and SSE_REGS for TImode doesn't
need secondary reload.
* config/i386/i386.md (*extendsidi2_rex64): Add a
define_peephole2 after it.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr116274.c: New test.
* gcc.target/i386/pr113560.c: Scan either mulq or mulx.
gcc/config/i386/i386-expand.cc
gcc/config/i386/i386.cc
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/pr113560.c
gcc/testsuite/gcc.target/i386/pr116274.c [new file with mode: 0644]