I receive some error when evaluating my program using valgrind. More precisely, I get errors like
vex amd64->IR: unhandled instruction bytes: 0xC5 0xF8 0x28 0x0 0xC5 0xF8 0x29 0x45 ... ... Illegal instruction
I isolated the problem to a very simple example
#include <immintrin.h>
int main() {
float f __attribute__((aligned(16))); // No need to be aligned
f = 2.0f;
__m128 a = _mm_broadcast_ss(&f);
return 0;
}
The program is compiled using gcc with the options -mavx. If the SSE2 instruction _mm_set1_ps is used instead, the same error occurs but only when compiled with -mavx. When compiling the program using -msse2, valgrind reports no errors.
I suspect this is a valgrind bug, but can't find any reports on this for x86. My machine is a Core-i7 Sandy-Bridge and valgrind version 3.7.0.
If anyone have a better alternative to valgrind for register-aware programming, I would like to know.
Thanks in advance