[cfe-commits] r146807 - in /cfe/trunk: include/clang/Basic/BuiltinsX86.def lib/Headers/avxintrin.h

Chad Rosier mcrosier at apple.com
Fri Dec 16 17:39:57 PST 2011


Author: mcrosier
Date: Fri Dec 16 19:39:56 2011
New Revision: 146807

URL: http://llvm.org/viewvc/llvm-project?rev=146807&view=rev
Log:
Revert r146797, which was a partial revert of r146791; It was correct in the
first place.  The permutevar_* (note the *var*) intrinsics use ymm/mem.

Modified:
    cfe/trunk/include/clang/Basic/BuiltinsX86.def
    cfe/trunk/lib/Headers/avxintrin.h

Modified: cfe/trunk/include/clang/Basic/BuiltinsX86.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/BuiltinsX86.def?rev=146807&r1=146806&r2=146807&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/BuiltinsX86.def (original)
+++ cfe/trunk/include/clang/Basic/BuiltinsX86.def Fri Dec 16 19:39:56 2011
@@ -425,9 +425,9 @@
 BUILTIN(__builtin_ia32_vperm2f128_pd256, "V4dV4dV4dIc", "")
 BUILTIN(__builtin_ia32_vperm2f128_ps256, "V8fV8fV8fIc", "")
 BUILTIN(__builtin_ia32_vperm2f128_si256, "V8iV8iV8iIc", "")
-BUILTIN(__builtin_ia32_vpermilpd, "V2dV2dc", "")
+BUILTIN(__builtin_ia32_vpermilpd, "V2dV2dIc", "")
 BUILTIN(__builtin_ia32_vpermilps, "V4fV4fc", "")
-BUILTIN(__builtin_ia32_vpermilpd256, "V4dV4dc", "")
+BUILTIN(__builtin_ia32_vpermilpd256, "V4dV4dIc", "")
 BUILTIN(__builtin_ia32_vpermilps256, "V8fV8fc", "")
 BUILTIN(__builtin_ia32_vinsertf128_pd256, "V4dV4dV2dIc", "")
 BUILTIN(__builtin_ia32_vinsertf128_ps256, "V8fV8fV4fIc", "")

Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=146807&r1=146806&r2=146807&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Fri Dec 16 19:39:56 2011
@@ -258,17 +258,13 @@
 						  (__v8si)c);
 }
 
-static __inline __m128d __attribute__((__always_inline__, __nodebug__))
-_mm_permute_pd(__m128d a, const int c)
-{
-  return (__m128d)__builtin_ia32_vpermilpd((__v2df)a, c);
-}
+#define _mm_permute_pd(A, C) __extension__ ({ \
+  __m128d __A = (A); \
+  (__m128d)__builtin_ia32_vpermilpd((__v2df)__A, C); })
 
-static __inline __m256d __attribute__((__always_inline__, __nodebug__))
-_mm256_permute_pd(__m256d a, const int c)
-{
-  return (__m256d)__builtin_ia32_vpermilpd256((__v4df)a, c);
-}
+#define _mm256_permute_pd(A, C) __extension__ ({ \
+  __m256d __A = (A); \
+  (__m256d)__builtin_ia32_vpermilpd256((__v4df)__A, C); })
 
 static __inline __m128 __attribute__((__always_inline__, __nodebug__))
 _mm_permute_ps(__m128 a, const int c)





More information about the cfe-commits mailing list