Bug 89346 - Unnecessary EVEX encoding
Summary: Unnecessary EVEX encoding
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 9.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks:
 
Reported: 2019-02-13 22:28 UTC by H.J. Lu
Modified: 2019-07-08 15:27 UTC (History)
2 users (show)

See Also:
Host:
Target: i386,x86-64
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2019-02-13 22:28:55 UTC
[hjl@gnu-skx-1 gcc]$ cat x.c
#include <immintrin.h>

long long *p;
volatile __m256i yy;

void
foo (void)
{
   _mm256_store_epi64 (p, yy);
}
[hjl@gnu-skx-1 gcc]$ gcc -S -O2 x.c -march=skylake-avx512
[hjl@gnu-skx-1 gcc]$ cat x.s
	.file	"x.c"
	.text
	.p2align 4,,15
	.globl	foo
	.type	foo, @function
foo:
.LFB5168:
	.cfi_startproc
	vmovdqa64	yy(%rip), %ymm0   <<< No need for EVEX.
	movq	p(%rip), %rax
	vmovdqa64	%ymm0, (%rax)     <<< No need for EVEX.
	vzeroupper
	ret
	.cfi_endproc
.LFE5168:
	.size	foo, .-foo
	.comm	yy,32,32
	.comm	p,8,8
	.ident	"GCC: (GNU) 8.2.1 20190209 (Red Hat 8.2.1-8)"
	.section	.note.GNU-stack,"",@progbits
[hjl@gnu-skx-1 gcc]$