https://bugs.llvm.org/show_bug.cgi?id=51480
Bug ID: 51480
Summary: clang-cl doesn't correctly map /arch:XXX options to
corresponding features
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: peterghos...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk
While compiling for XNNPACK with Clang, the following error will be raised.
2021-08-15T04:34:10.8521621Z
C:\actions-runner\_work\XNNPACK\src\f32-dwconv2d-chw\gen\3x3p1-minmax-ssse3-2x4.c(100,48):
error: '__builtin_ia32_palignr128' needs target feature ssse3
2021-08-15T04:34:10.8523468Z const __m128 vi0x3456 =
_mm_castsi128_ps(_mm_alignr_epi8(_mm_castps_si128(vi0x4567),
_mm_castps_si128(vi0x0123), 12));
2021-08-15T04:34:10.8524281Z ^
2021-08-15T04:34:10.8525139Z
C:\PROGRA~1\LLVM\lib\clang\14.0.0\include\tmmintrin.h(148,13): note: expanded
from macro '_mm_alignr_epi8'
2021-08-15T04:34:10.8526120Z
((__m128i)__builtin_ia32_palignr128((__v16qi)(__m128i)(a), \
However, the code compiles and links with MSVC cl.exe. To workaround it, I have
to pass `-clang:-mssse3` which shouldn't be needed.
Additional info
CMake script that sets the arch flags for different compilers:
https://github.com/google/XNNPACK/blob/79cd5f9e18ad0925ac9a050b00ea5a36230072db/CMakeLists.txt#L3504-L3531
--
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