https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97642
Bug ID: 97642
Summary: Incorrect replacement of vmovdqu32 with vpblendd can
cause fault
Product: gcc
Version: 10.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: goldstein.w.n at gmail dot com
Target Milestone: ---
GCC sometimes replaces
_mm256_mask_loadu_epi32(__m256i src, __mask8 k, void const * mem_addr) //
vmovdqu32
With
vpblendd
If mem_addr points to a memory region with less than 32 bytes of accessible
memory and k is a mask that would prevent reading the inaccessible bytes from
mem_addr the replacement will cause a fault.
See: https://godbolt.org/z/Y5cTxz