From 4d375831e20cdb37b8b0698e98dbb72bf7ace043 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sat, 7 May 2011 18:59:31 +0000 Subject: [PATCH] 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 --- lib/Headers/emmintrin.h | 4 ++-- 1 file 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__)) -- 2.40.0