[llvm-bugs] [Bug 39875] New: Error: instruction requires: AVX-512 ISA when using -mavx512f
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Dec 3 19:29:09 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=39875
Bug ID: 39875
Summary: Error: instruction requires: AVX-512 ISA when using
-mavx512f
Product: clang
Version: 6.0
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Tooling
Assignee: unassignedclangbugs at nondot.org
Reporter: noloader at gmail.com
CC: llvm-bugs at lists.llvm.org
I think there may be a bad interaction with GCC and the Clang Integrated
Assembler.
$ cat test.cxx
#include <cstdint>
#include <immintrin.h>
int main(int argc, char* argv[])
{
uint64_t x[8];
__m512i y = _mm512_load_epi64(x);
return 0;
}
And then:
$ /opt/local/bin/g++-mp-6 -mavx512f -Wa,-q test.cxx -o test.exe
/tmp/ccSeFrX0.s:20:2: error: instruction requires: AVX-512 ISA
vmovdqa64 (%rax), %zmm0
^
/tmp/ccSeFrX0.s:21:2: error: instruction requires: AVX-512 ISA
vmovdqa64 %zmm0, -112(%rbp)
^
When I look at the *.s file (see below) I don't see any .cpu directives telling
the assembler to accept AVX-512. I guess that means the assembler accepts what
it knows about. But it knows about AVX-512 so it should accept it. So I guess
the original guess is wrong.
-----
$ /opt/local/bin/g++-mp-6 --version
g++-mp-6 (MacPorts gcc6 6.5.0_1) 6.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
I don't know how to print the version of Clang or the integrated assembler when
using `-Wa,-q`.
-----
$ /opt/local/bin/g++-mp-6 -mavx512f -Wa,-q test.cxx -c --save-temps
test.s:20:2: error: instruction requires: AVX-512 ISA
vmovdqa64 (%rax), %zmm0
^
test.s:21:2: error: instruction requires: AVX-512 ISA
vmovdqa64 %zmm0, -112(%rbp)
^
$ cat test.s
.text
.globl _main
_main:
LFB3524:
leaq 8(%rsp), %r10
LCFI0:
andq $-64, %rsp
pushq -8(%r10)
pushq %rbp
LCFI1:
movq %rsp, %rbp
pushq %r10
LCFI2:
subq $112, %rsp
movl %edi, -196(%rbp)
movq %rsi, -208(%rbp)
leaq -192(%rbp), %rax
movq %rax, -120(%rbp)
movq -120(%rbp), %rax
vmovdqa64 (%rax), %zmm0
vmovdqa64 %zmm0, -112(%rbp)
movl $0, %eax
addq $112, %rsp
popq %r10
LCFI3:
popq %rbp
leaq -8(%r10), %rsp
LCFI4:
ret
LFE3524:
.section
__TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
EH_frame1:
.set L$set$0,LECIE1-LSCIE1
.long L$set$0
LSCIE1:
.long 0
.byte 0x1
.ascii "zR\0"
.byte 0x1
.byte 0x78
.byte 0x10
.byte 0x1
.byte 0x10
.byte 0xc
.byte 0x7
.byte 0x8
.byte 0x90
.byte 0x1
.align 3
LECIE1:
LSFDE1:
.set L$set$1,LEFDE1-LASFDE1
.long L$set$1
LASFDE1:
.long LASFDE1-EH_frame1
.quad LFB3524-.
.set L$set$2,LFE3524-LFB3524
.quad L$set$2
.byte 0
.byte 0x4
.set L$set$3,LCFI0-LFB3524
.long L$set$3
.byte 0xc
.byte 0xa
.byte 0
.byte 0x4
.set L$set$4,LCFI1-LCFI0
.long L$set$4
.byte 0x10
.byte 0x6
.byte 0x2
.byte 0x76
.byte 0
.byte 0x4
.set L$set$5,LCFI2-LCFI1
.long L$set$5
.byte 0xf
.byte 0x3
.byte 0x76
.byte 0x78
.byte 0x6
.byte 0x4
.set L$set$6,LCFI3-LCFI2
.long L$set$6
.byte 0xc
.byte 0xa
.byte 0
.byte 0x4
.set L$set$7,LCFI4-LCFI3
.long L$set$7
.byte 0xc
.byte 0x7
.byte 0x8
.align 3
LEFDE1:
.constructor
.destructor
.align 1
.subsections_via_symbols
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181204/43ac3abe/attachment-0001.html>
More information about the llvm-bugs
mailing list