[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #67410)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 4 02:45:44 PDT 2023
bgra8 wrote:
@FreddyLeaf functions with `__attribute__((target("avx")))` trigger the newly added warning.
Code like this no longer builds and creates a lot of fallout for us (google internal code):
```
#include <immintrin.h>
__attribute__((target("avx"))) void test(__m128 a, __m128 b) {
_mm_cmp_ps(a, b, 14);
}
```
Compiler output:
```
test.cc:4:3: error: argument value 14 is outside the valid range [0, 7] [-Wargument-outside-range]
4 | _mm_cmp_ps(a, b, 14);
```
Passing `-mavx` in the compilation command line makes the build green but the attribute `target("avx")` should be equivalent.
Please revert
https://github.com/llvm/llvm-project/pull/67410
More information about the cfe-commits
mailing list