| Issue |
172104
|
| Summary |
clang-cl doesn't compile MSVC code using SIMD intrinsics
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
dsharlet
|
For example:
```
#include <immintrin.h>
__m128i f(__m128i a, __m128i b) {
return _mm_mullo_epi32(a, b); // SSE4.1 intrinsic
}
```
This builds using Microsoft's `cl`.
However, with `clang-cl`, we get: `error: use of undeclared identifier '_mm_mullo_epi32'; did you mean '_mm_mullo_epi16'?`
We can specify `/arch:AVX` to solve the problem. However, this means that the compiler is then free to use AVX instructions, which is not what we want if we want to only target SSE4.1. MSVC does not appear to have a `/arch:SSE4.1` option: https://learn.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-170.
We can specify `/clang:-msse4.1` to solve the problem, but this means that `clang-cl` is not a clean replacement of `cl`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs