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: unassignedclangb...@nondot.org
          Reporter: nhe...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to