r245975 - [X86] Remove unnecessary MMX declarations from Intrin.h

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 25 14:27:47 PDT 2015


Author: rksimon
Date: Tue Aug 25 16:27:46 2015
New Revision: 245975

URL: http://llvm.org/viewvc/llvm-project?rev=245975&view=rev
Log:
[X86] Remove unnecessary MMX declarations from Intrin.h

As discussed in PR23648 - the intrinsics _m_from_int, _m_to_int and _m_prefetch are defined in mmintrin.h and prfchwintrin.h so we don't need to in Intrin.h

Added tests for _m_from_int and _m_to_int

D11338 already added a test for _m_prefetch

Differential Revision: http://reviews.llvm.org/D12272

Modified:
    cfe/trunk/lib/Headers/Intrin.h
    cfe/trunk/test/CodeGen/mmx-builtins.c

Modified: cfe/trunk/lib/Headers/Intrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/Intrin.h?rev=245975&r1=245974&r2=245975&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/Intrin.h (original)
+++ cfe/trunk/lib/Headers/Intrin.h Tue Aug 25 16:27:46 2015
@@ -49,10 +49,7 @@ extern "C" {
 #if defined(__MMX__)
 /* And the random ones that aren't in those files. */
 __m64 _m_from_float(float);
-__m64 _m_from_int(int _l);
-void _m_prefetch(void *);
 float _m_to_float(__m64);
-int _m_to_int(__m64 _M);
 #endif
 
 /* Other assorted instruction intrinsics. */

Modified: cfe/trunk/test/CodeGen/mmx-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mmx-builtins.c?rev=245975&r1=245974&r2=245975&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/mmx-builtins.c (original)
+++ cfe/trunk/test/CodeGen/mmx-builtins.c Tue Aug 25 16:27:46 2015
@@ -451,3 +451,13 @@ __m64 test89(__m64 a, __m64 b) {
   // CHECK: pcmpgtd
   return _mm_cmpgt_pi32(a, b);
 }
+
+__m64 test90(int a) {
+  // CHECK: movd
+  return _m_from_int(a);
+}
+
+int test91(__m64 a) {
+  // CHECK: movd
+  return _m_to_int(a);
+}




More information about the cfe-commits mailing list