]> granicus.if.org Git - clang/commitdiff
PR9866: Fix the implementation of _mm_loadl_pd and _mm_loadh_pd to not make
authorEli Friedman <eli.friedman@gmail.com>
Sat, 7 May 2011 18:59:31 +0000 (18:59 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sat, 7 May 2011 18:59:31 +0000 (18:59 +0000)
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

index 0c1d730f015ddda471ed2d3e2791c0a10a990474..62c10b5134e26af25eff52cd93f2157b18fe8ebe 100644 (file)
@@ -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__))