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

Chad Rosier mcrosier at apple.com
Fri Dec 16 16:50:43 PST 2011


Author: mcrosier
Date: Fri Dec 16 18:50:42 2011
New Revision: 146797

URL: http://llvm.org/viewvc/llvm-project?rev=146797&view=rev
Log:
Partial revert of r146791; vpermilps/vpermilpd instructions accepts ymm/mem/imm8.


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=146797&r1=146796&r2=146797&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/BuiltinsX86.def (original)
+++ cfe/trunk/include/clang/Basic/BuiltinsX86.def Fri Dec 16 18:50:42 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, "V2dV2dIc", "")
+BUILTIN(__builtin_ia32_vpermilpd, "V2dV2dc", "")
 BUILTIN(__builtin_ia32_vpermilps, "V4fV4fc", "")
-BUILTIN(__builtin_ia32_vpermilpd256, "V4dV4dIc", "")
+BUILTIN(__builtin_ia32_vpermilpd256, "V4dV4dc", "")
 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=146797&r1=146796&r2=146797&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Fri Dec 16 18:50:42 2011
@@ -258,13 +258,17 @@
 						  (__v8si)c);
 }
 
-#define _mm_permute_pd(A, C) __extension__ ({ \
-  __m128d __A = (A); \
-  (__m128d)__builtin_ia32_vpermilpd((__v2df)__A, C); })
-
-#define _mm256_permute_pd(A, C) __extension__ ({ \
-  __m256d __A = (A); \
-  (__m256d)__builtin_ia32_vpermilpd256((__v4df)__A, C); })
+static __inline __m128d __attribute__((__always_inline__, __nodebug__))
+_mm_permute_pd(__m128d a, const int c)
+{
+  return (__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);
+}
 
 static __inline __m128 __attribute__((__always_inline__, __nodebug__))
 _mm_permute_ps(__m128 a, const int c)





More information about the cfe-commits mailing list