https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92257
Bug ID: 92257
Summary: AVX512 incorrect usage of aligned loads and stores
Product: gcc
Version: 9.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: ilya at alfs dot me
Target Milestone: ---
Hello,
I had few segmentation faults while writing AVX512 code. SEGFAULTs were caused
by aligned loads used when data alignment can not be guaranteed in compile
time.
test.c:
#include <immintrin.h>
__m512i foo(__m512i *a) {
return a[100];
}
gcc -S -O3 -march=icelake-client -mavx512f ./test.c
test.s:
.file "test.c"
.text
.p2align 4
.globl foo
.type foo, @function
foo:
.LFB5279:
.cfi_startproc
vmovdqa64 6400(%rdi), %zmm0
ret
.cfi_endproc
.LFE5279:
.size foo, .-foo
.ident "GCC: (GNU) 9.2.1 20190827 (Red Hat 9.2.1-1)"
.section .note.GNU-stack,"",@progbits