[llvm-bugs] [Bug 41482] New: __attribute__((target("foo"))) doesn't work for functions with inline assembly
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Apr 12 09:56:20 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41482
Bug ID: 41482
Summary: __attribute__((target("foo"))) doesn't work for
functions with inline assembly
Product: clang
Version: 8.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: nheart at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Created attachment 21769
--> https://bugs.llvm.org/attachment.cgi?id=21769&action=edit
Inline assembly fails to compile without -mavx2
Hey,
clang++ fails to compile inline assembly that requires AVX2 unless -mavx2 flag
is set. One is normally able to avoid that by annotating the function with
__attribute__((target("AVX2"))), but in clang this seems to only work if you
are just using intrinsics (the function on line 6 of the example), but not
inline assembly.
I have attached a snipped of code with some of our inline assembly.
The example cpp file attached compiles file with g++, but will only compile on
clang++ if -mavx2 is provided. g++ doesn't need that.
Cheers,
Nick
--
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/20190412/9160add2/attachment-0001.html>
More information about the llvm-bugs
mailing list