]> gcc.gnu.org Git - gcc.git/commit
Disparage slightly the mask register alternative for bitwise operations.
authorliuhongt <hongtao.liu@intel.com>
Tue, 15 Jun 2021 08:25:16 +0000 (16:25 +0800)
committerliuhongt <hongtao.liu@intel.com>
Mon, 21 Jun 2021 08:05:35 +0000 (16:05 +0800)
commit08c85f609a73fb36fdcbd9f327a5a645c20ac816
treebd9925a840b740531843f8c0697519c2e5fe8006
parent9cedbaab8e048b90ceb9ceef0d851385fae67cde
Disparage slightly the mask register alternative for bitwise operations.

The avx512 supports bitwise operations with mask registers, but the
throughput of those instructions is much lower than that of the
corresponding gpr version, so we would additionally disparages
slightly the mask register alternative for bitwise operations in the
LRA.

Also when allocano cost of GENERAL_REGS is same as MASK_REGS, allocate
MASK_REGS first since it has already been disparaged.

gcc/ChangeLog:

PR target/101142
* config/i386/i386.md: (*anddi_1): Disparage slightly the mask
register alternative.
(*and<mode>_1): Ditto.
(*andqi_1): Ditto.
(*andn<mode>_1): Ditto.
(*<code><mode>_1): Ditto.
(*<code>qi_1): Ditto.
(*one_cmpl<mode>2_1): Ditto.
(*one_cmplsi2_1_zext): Ditto.
(*one_cmplqi2_1): Ditto.
* config/i386/i386.c (x86_order_regs_for_local_alloc): Change
the order of mask registers to be before general registers.

gcc/testsuite/ChangeLog:

PR target/101142
* gcc.target/i386/spill_to_mask-1.c: Adjust testcase.
* gcc.target/i386/spill_to_mask-2.c: Adjust testcase.
* gcc.target/i386/spill_to_mask-3.c: Adjust testcase.
* gcc.target/i386/spill_to_mask-4.c: Adjust testcase.
gcc/config/i386/i386.c
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/spill_to_mask-1.c
gcc/testsuite/gcc.target/i386/spill_to_mask-2.c
gcc/testsuite/gcc.target/i386/spill_to_mask-3.c
gcc/testsuite/gcc.target/i386/spill_to_mask-4.c
This page took 0.065813 seconds and 5 git commands to generate.