[cfe-commits] r110646 - in /cfe/trunk: include/clang/Basic/BuiltinsX86.def lib/Headers/avxintrin.h test/CodeGen/builtins-x86.c
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Mon Aug 9 19:23:54 PDT 2010
Author: bruno
Date: Mon Aug 9 21:23:54 2010
New Revision: 110646
URL: http://llvm.org/viewvc/llvm-project?rev=110646&view=rev
Log:
Make replicate intrinsics use shufflevector instead of dup builtins, also remove the dup builtins
Modified:
cfe/trunk/include/clang/Basic/BuiltinsX86.def
cfe/trunk/lib/Headers/avxintrin.h
cfe/trunk/test/CodeGen/builtins-x86.c
Modified: cfe/trunk/include/clang/Basic/BuiltinsX86.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/BuiltinsX86.def?rev=110646&r1=110645&r2=110646&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/BuiltinsX86.def (original)
+++ cfe/trunk/include/clang/Basic/BuiltinsX86.def Mon Aug 9 21:23:54 2010
@@ -371,9 +371,6 @@
BUILTIN(__builtin_ia32_vinsertf128_pd256, "V4dV4dV2dc", "")
BUILTIN(__builtin_ia32_vinsertf128_ps256, "V8fV8fV4fc", "")
BUILTIN(__builtin_ia32_vinsertf128_si256, "V8iV8iV4ic", "")
-BUILTIN(__builtin_ia32_movshdup256, "V8fV8f", "")
-BUILTIN(__builtin_ia32_movsldup256, "V8fV8f", "")
-BUILTIN(__builtin_ia32_movddup256, "V4dV4d", "")
BUILTIN(__builtin_ia32_sqrtpd256, "V4dV4d", "")
BUILTIN(__builtin_ia32_sqrtps256, "V8fV8f", "")
BUILTIN(__builtin_ia32_sqrtps_nr256, "V8fV8f", "")
Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=110646&r1=110645&r2=110646&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Mon Aug 9 21:23:54 2010
@@ -577,19 +577,19 @@
static __inline __m256 __attribute__((__always_inline__, __nodebug__))
_mm256_movehdup_ps(__m256 a)
{
- return (__m256)__builtin_ia32_movshdup256((__v8sf)a);
+ return __builtin_shufflevector(a, a, 1, 1, 3, 3, 5, 5, 7, 7);
}
static __inline __m256 __attribute__((__always_inline__, __nodebug__))
_mm256_moveldup_ps(__m256 a)
{
- return (__m256)__builtin_ia32_movsldup256((__v8sf)a);
+ return __builtin_shufflevector(a, a, 0, 0, 2, 2, 4, 4, 6, 6);
}
static __inline __m256d __attribute__((__always_inline__, __nodebug__))
_mm256_movedup_pd(__m256d a)
{
- return (__m256d)__builtin_ia32_movddup256((__v4df)a);
+ return __builtin_shufflevector(a, a, 0, 0, 2, 2);
}
/* Unpack and Interleave */
Modified: cfe/trunk/test/CodeGen/builtins-x86.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtins-x86.c?rev=110646&r1=110645&r2=110646&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/builtins-x86.c (original)
+++ cfe/trunk/test/CodeGen/builtins-x86.c Mon Aug 9 21:23:54 2010
@@ -434,9 +434,6 @@
tmp_V4d = __builtin_ia32_vinsertf128_pd256(tmp_V4d, tmp_V2d, 0x7);
tmp_V8f = __builtin_ia32_vinsertf128_ps256(tmp_V8f, tmp_V4f, 0x7);
tmp_V8i = __builtin_ia32_vinsertf128_si256(tmp_V8i, tmp_V4i, 0x7);
- tmp_V8f = __builtin_ia32_movshdup256(tmp_V8f);
- tmp_V8f = __builtin_ia32_movsldup256(tmp_V8f);
- tmp_V4d = __builtin_ia32_movddup256(tmp_V4d);
tmp_V4d = __builtin_ia32_sqrtpd256(tmp_V4d);
tmp_V8f = __builtin_ia32_sqrtps256(tmp_V8f);
tmp_V8f = __builtin_ia32_sqrtps_nr256(tmp_V8f);
More information about the cfe-commits
mailing list