]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Revert revision 268678 and revision 268657
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 Feb 2019 19:00:35 +0000 (19:00 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 Feb 2019 19:00:35 +0000 (19:00 +0000)
commit916752cab363dfb58cd17bcb650aad646bbfd6ef
treec0866367c71ab81560f9ae8e2c58cf8d3f74ef1e
parent58b7df032ed3fd0a263a5623f9ddd80de6f1c034
i386: Revert revision 268678 and revision 268657

i386 backend has

INT_MODE (OI, 32);
INT_MODE (XI, 64);

So, XI_MODE represents 64 INTEGER bytes = 64 * 8 = 512 bit operation,
in case of const_1, all 512 bits set.

We can load zeros with narrower instruction, (e.g. 256 bit by inherent
zeroing of highpart in case of 128 bit xor), so TImode in this case.

Some targets prefer V4SF mode, so they will emit float xorps for zeroing

Then the introduction of AVX512F fubared everything by overloading the
meaning of insn mode.

How should we use INSN mode,  MODE_XI, in standard_sse_constant_opcode
and patterns which use standard_sse_constant_opcode? 2 options:

1.  MODE_XI should only used to check if EXT_REX_SSE_REG_P is true
in any register operand.  The operand size must be determined by operand
itself , not by MODE_XI.  The operand encoding size should be determined
by the operand size, EXT_REX_SSE_REG_P and AVX512VL.
2. MODE_XI should be used to determine the operand encoding size.
EXT_REX_SSE_REG_P and AVX512VL should be checked for encoding
instructions.

gcc/

PR target/89229
* config/i386/i386.md (*movoi_internal_avx): Revert revision
268678 and revision 268657.
(*movti_internal): Likewise.

gcc/testsuite/

PR target/89229
* gcc.target/i386/pr89229-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268811 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr89229-1.c [new file with mode: 0644]