[PATCH] D21306: [x86] AVX FP compare builtins should require AVX target feature (PR28112)

Sanjay Patel via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 13 16:30:08 PDT 2016


spatel added a comment.

In http://reviews.llvm.org/D21306#456965, @echristo wrote:

> The 128 bit versions should only be selecting for sse functions and shouldn't need avx to work? What instructions are getting emitted here?


No, the 128-bit versions of these C intrinsics are strictly for AVX versions of the instructions (eg, vcmpps).

Example from the bug report:

  cmp = _mm_cmp_ps((__m128)a, (__m128)b, 8);

We're currently emitting illegal SSE instructions like:

  cmpps	$0x8, %xmm1, %xmm0  <--- anything over '7' is reserved/undef


http://reviews.llvm.org/D21306





More information about the cfe-commits mailing list