https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103519
Bug ID: 103519 Summary: Address sanitizer check missing for AVX512 masked load Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: dlong at cadence dot com CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org Target Milestone: --- Example with generated assembly available here: https://godbolt.org/z/WTo5sGThb In this: #include <x86intrin.h> __m512d v; void access(float const *addr) { __m512d val; __m256 val1; __mmask8 const k3 = 0x3f; val1=_mm256_maskz_loadu_ps(k3, addr); val=_mm512_cvtps_pd(val1); _mm512_storeu_pd((double *)&v, val); } when compiled with AVX512 instructions and -fsanitize=address, no address check is generated for the maskz_load. (FWIW, if the mask is folded into the conversion using maskz_cvtps_pd instead then a check is generated. However it's a check for a full 32-byte access even though the CPU will only actually access 24-bytes due to the mask.)