[llvm-bugs] [Bug 51480] New: clang-cl doesn't correctly map /arch:XXX options to corresponding features
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Aug 14 23:47:08 PDT 2021
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: unassignedclangbugs at nondot.org
Reporter: peterghost86 at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210815/76f0b0d5/attachment.html>
More information about the llvm-bugs
mailing list