x86: Enable 256 move by pieces for ALDERLAKE machine.

gcc/ChangeLog:

	* config/i386/x86-tune.def
	(X86_TUNE_AVX256_MOVE_BY_PIECES): Add alderlake.
	(X86_TUNE_AVX256_STORE_BY_PIECES): Ditto.

gcc/testsuite/ChangeLog:

	* gcc.target/i386/pieces-memset-50.c: New test.
This commit is contained in:
Lili Cui 2022-11-17 15:50:46 +08:00 committed by Cui,Lili
parent cbe313060c
commit 156f523f95
2 changed files with 14 additions and 2 deletions

View file

@ -536,12 +536,12 @@ DEF_TUNE (X86_TUNE_AVX256_OPTIMAL, "avx256_optimal", m_CORE_AVX512)
/* X86_TUNE_AVX256_MOVE_BY_PIECES: Optimize move_by_pieces with 256-bit
AVX instructions. */
DEF_TUNE (X86_TUNE_AVX256_MOVE_BY_PIECES, "avx256_move_by_pieces",
m_CORE_AVX512)
m_ALDERLAKE | m_CORE_AVX2)
/* X86_TUNE_AVX256_STORE_BY_PIECES: Optimize store_by_pieces with 256-bit
AVX instructions. */
DEF_TUNE (X86_TUNE_AVX256_STORE_BY_PIECES, "avx256_store_by_pieces",
m_CORE_AVX512)
m_ALDERLAKE | m_CORE_AVX2)
/* X86_TUNE_AVX512_MOVE_BY_PIECES: Optimize move_by_pieces with 512-bit
AVX instructions. */

View file

@ -0,0 +1,12 @@
/* { dg-do compile } */
/* { dg-options "-O2 -march=alderlake" } */
extern char *dst;
void
foo (int x)
{
__builtin_memset (dst, x, 64);
}
/* { dg-final { scan-assembler-times "vmovdqu\[ \\t\]+\[^\n\]*%ymm" 2 } } */