public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/97028] New: Compilation errors for AVX512 intrinsic with -masm=intel
@ 2020-09-12  0:38 nikita.shulga at gmail dot com
  2020-09-12  0:44 ` [Bug target/97028] " nikita.shulga at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: nikita.shulga at gmail dot com @ 2020-09-12  0:38 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-09-15  8:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-12  0:38 [Bug target/97028] New: Compilation errors for AVX512 intrinsic with -masm=intel nikita.shulga at gmail dot com
2020-09-12  0:44 ` [Bug target/97028] " nikita.shulga at gmail dot com
2020-09-14  7:10 ` rguenth at gcc dot gnu.org
2020-09-14  7:25 ` [Bug target/97028] [9/10/11 Regression] " jakub at gcc dot gnu.org
2020-09-14  7:29 ` jakub at gcc dot gnu.org
2020-09-14  7:47 ` jakub at gcc dot gnu.org
2020-09-15  7:40 ` cvs-commit at gcc dot gnu.org
2020-09-15  8:29 ` cvs-commit at gcc dot gnu.org
2020-09-15  8:29 ` cvs-commit at gcc dot gnu.org
2020-09-15  8:29 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).