[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


            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.

error: '__builtin_ia32_palignr128' needs target feature ssse3
2021-08-15T04:34:10.8523468Z       const __m128 vi0x3456 =
_mm_castps_si128(vi0x0123), 12));
2021-08-15T04:34:10.8524281Z                                                ^
C:\PROGRA~1\LLVM\lib\clang\14.0.0\include\tmmintrin.h(148,13): note: expanded
from macro '_mm_alignr_epi8'
((__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:

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