https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97028
Bug ID: 97028 Summary: Compilation errors for AVX512 intrinsic with -masm=intel Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: nikita.shulga at gmail dot com Target Milestone: --- Following code snippet, containing no asm blocks can be compiled just fine with '-Os -mavx512f' options, by compilation fails using gcc-9.0 or newer if '-masm=intel' is added: #include <immintrin.h> float foo(float* con) { __mmask16 msk = 0x00ff; __m512 a = _mm512_maskz_loadu_ps(msk, con); __m512 b = _mm512_set1_ps(con[1]); __m512 c = _mm512_mul_ps(a,b); return ((float *)&c)[0]; } That is: $ gcc -c -Os -mavx512f mul.c ; echo $? 0 $ gcc -c -Os -masm=intel -mavx512f mul.c ; echo $? /tmp/ccmeN1OP.s: Assembler messages: /tmp/ccmeN1OP.s:12: Error: invalid use of register 1 And the offending instruction looks as follows: $ gcc -S -o - -Os -masm=intel -mavx512f mul.c|head -n 12|tail -n1 vmulps zmm0, zmm0, DWORD PTR [rdi+4]<{1to16}> But compilation works just fine if gcc-8 is used instead.