Dear all,
I'm having trouble with simde_mm_testz_si128. Depending on the arch flags I'm
passing to the compiler, I get different answers.
Here is the examples:
#include <iostream>
#include "simde/x86/sse4.1.h"
using epu8 = uint8_t __attribute__((vector_size(16)));
int main() {
epu8 a = {0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
std::cout << simde_mm_testz_si128(a, a) << std::endl;
}
Then
$ g++ -O0 -msse4 -flax-vector-conversions bug.cpp -o bug
$ ./bug
0
is the correct answer, but
$ g++ -O0 -msse3 -flax-vector-conversions bug.cpp -o bug
$ ./bug
1
The same problem happens with no -m or any of -msse, -msse2, -msse3, -mssse3
Am I doing something wrong ? Isn't it possible to use sse4 intrisics on a sse3
machine ?
By the way my compiler is
$ g++ --version
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
running on a Intel(R) Xeon(R) E-2176M CPU:
Thanks for your help !
Best regards,
Florent Hivert
---
Professeur, LISN, Univ. Paris Saclay, CNRS.
Bureau 143, Bât.650,
Laboratoire Interdisciplinaire des Sciences du Numérique (UMR CNRS 9015)
1, rue Raimond Castaing, 91190 GIF-SUR-YVETTE
Tél: 01-69-15-65-99
http://www.lri.fr/~hivert