[PATCH] D12272: [X86] Remove unnecessary MMX declarations from Intrin.h

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 23 10:16:33 PDT 2015


RKSimon created this revision.
RKSimon added reviewers: echristo, silvas, craig.topper.
RKSimon added a subscriber: cfe-commits.
RKSimon set the repository for this revision to rL LLVM.

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 

I'll add _m_from_float and _m_to_float in a future (3dNow) patch which will remove the last of the 'missing' declarations from Intrin.h

Repository:
  rL LLVM

http://reviews.llvm.org/D12272

Files:
  lib/Headers/Intrin.h
  test/CodeGen/mmx-builtins.c

Index: test/CodeGen/mmx-builtins.c
===================================================================
--- test/CodeGen/mmx-builtins.c
+++ test/CodeGen/mmx-builtins.c
@@ -451,3 +451,13 @@
   // 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);
+}
Index: lib/Headers/Intrin.h
===================================================================
--- lib/Headers/Intrin.h
+++ lib/Headers/Intrin.h
@@ -49,10 +49,7 @@
 #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. */


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12272.32926.patch
Type: text/x-patch
Size: 821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150823/ff9f07c7/attachment.bin>


More information about the cfe-commits mailing list