[clang] [llvm] Clang: convert `__m64` intrinsics to unconditionally use SSE2 instead of MMX. (PR #96540)
James Y Knight via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 25 14:35:00 PDT 2024
================
@@ -21,10 +21,29 @@ typedef int __v2si __attribute__((__vector_size__(8)));
typedef short __v4hi __attribute__((__vector_size__(8)));
typedef char __v8qi __attribute__((__vector_size__(8)));
----------------
jyknight wrote:
IIUC, these files intentionally don't have any dependency on subtarget preprocessor defines, in order that they can be used from functions with target attributes. So I'm not sure if adding an `#ifndef __SSE2__` would be acceptable here?
The current error is:
```
echo $'#include <mmintrin.h>\n__m64 f() { return _mm_cvtsi32_si64(5); }' | build/bin/clang -march=pentium3 -m32 -S -o - -xc -
<stdin>:2:20: error: always_inline function '_mm_cvtsi32_si64' requires target feature 'sse2', but would be inlined into function 'f' that is compiled without support for 'sse2'
2 | __m64 f() { return _mm_cvtsi32_si64(5); }
| ^
1 error generated.
=> exit status: 1
```
https://github.com/llvm/llvm-project/pull/96540
More information about the cfe-commits
mailing list