-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Open
Labels
clangClang issues not falling into any other categoryClang issues not falling into any other category
Description
This compiles compiles without any flags, but fails with -march=x86-64-v2
.
__attribute__((__always_inline__, target("sse"))) void g() {}
__attribute__((target("arch=x86-64,sse"))) void f() { g(); }
clang f.c -shared -march=x86-64-v2
f.c:2:55: error: always_inline function 'g' requires target feature 'sse3', but would be inlined into function 'f' that is compiled without support for 'sse3'
2 | __attribute__((target("arch=x86-64,sse"))) void f() { g(); }
| ^
1 error generated.
This compiles compiles without any flags or with -march=x86-64
, -march=x86-64-v2
, -march=x86-64-v3
, -march=x86-64-v4
, but fails with -march=znver1
, -march=znver2
, -march=znver3
, -march=znver4
, -march=znver5
. It also compiles with -march=native
even if sys::getHostCPUName()
detects my cpu as znver5
.
__attribute__((__always_inline__, target("avx512fp16"))) void g() {}
__attribute__((target("arch=x86-64-v4,avx512fp16"))) void f() { g(); }
clang f.c -shared -march=znver5
f.c:2:65: error: always_inline function 'g' requires target feature 'gfni', but would be inlined into function 'f' that is compiled without support for 'gfni'
2 | __attribute__((target("arch=x86-64-v4,avx512fp16"))) void f() { g(); }
| ^
1 error generated.
Metadata
Metadata
Assignees
Labels
clangClang issues not falling into any other categoryClang issues not falling into any other category