This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][x86] Match movss and movsd "blend" instructions


On Wed, 1 Aug 2018, Allan Sandfeld Jensen wrote:

extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
 _mm_move_sd (__m128d __A, __m128d __B)
 {
-  return (__m128d) __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B);
+  return __extension__ (__m128d)(__v2df){__B[0],__A[1]};
 }

If the goal is to have it represented as a VEC_PERM_EXPR internally, I wonder if we should be explicit and use __builtin_shuffle instead of relying on some forwprop pass to transform it. Maybe not, just asking. And the answer need not even be the same for _mm_move_sd and _mm_move_ss.

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]