PR9866: Fix the implementation of _mm_loadl_pd and _mm_loadh_pd to not make

bad assumptions about the alignment of the double* argument.

llvm-svn: 131052
This commit is contained in:
Eli Friedman 2011-05-07 18:59:31 +00:00
parent 61d818c058
commit 8ba29d8e7f
1 changed files with 2 additions and 2 deletions

View File

@ -478,13 +478,13 @@ _mm_load_sd(double const *dp)
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__)) static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
_mm_loadh_pd(__m128d a, double const *dp) _mm_loadh_pd(__m128d a, double const *dp)
{ {
return __builtin_shufflevector(a, *(__m128d *)dp, 0, 2); return (__m128d){ a[0], *dp };
} }
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__)) static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
_mm_loadl_pd(__m128d a, double const *dp) _mm_loadl_pd(__m128d a, double const *dp)
{ {
return __builtin_shufflevector(a, *(__m128d *)dp, 2, 1); return (__m128d){ *dp, a[1] };
} }
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__)) static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))