diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-05-07 18:59:31 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-05-07 18:59:31 +0000 |
commit | 4d375831e20cdb37b8b0698e98dbb72bf7ace043 (patch) | |
tree | ceae31c1f5423444a14b07f6c66e5b3ae04fe76c | |
parent | a23ae3f45789f40cdfd939117284f977d2dc17a6 (diff) |
PR9866: Fix the implementation of _mm_loadl_pd and _mm_loadh_pd to not make
bad assumptions about the alignment of the double* argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131052 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Headers/emmintrin.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Headers/emmintrin.h b/lib/Headers/emmintrin.h index 0c1d730f01..62c10b5134 100644 --- a/lib/Headers/emmintrin.h +++ b/lib/Headers/emmintrin.h @@ -478,13 +478,13 @@ _mm_load_sd(double const *dp) static __inline__ __m128d __attribute__((__always_inline__, __nodebug__)) _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__)) _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__)) |