[PATCH] D15572: [X86] Add missing m64/int64 conversions

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 20 04:40:44 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL256122: [X86] Add missing m64/int64 conversions (authored by mkuper).

Changed prior to commit:
  http://reviews.llvm.org/D15572?vs=43006&id=43327#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D15572

Files:
  cfe/trunk/lib/Headers/mmintrin.h
  cfe/trunk/test/CodeGen/mmx-builtins.c

Index: cfe/trunk/lib/Headers/mmintrin.h
===================================================================
--- cfe/trunk/lib/Headers/mmintrin.h
+++ cfe/trunk/lib/Headers/mmintrin.h
@@ -443,7 +443,9 @@
 /* Aliases for compatibility. */
 #define _m_empty _mm_empty
 #define _m_from_int _mm_cvtsi32_si64
+#define _m_from_int64 _mm_cvtsi64_m64
 #define _m_to_int _mm_cvtsi64_si32
+#define _m_to_int64 _mm_cvtm64_si64
 #define _m_packsswb _mm_packs_pi16
 #define _m_packssdw _mm_packs_pi32
 #define _m_packuswb _mm_packs_pu16
Index: cfe/trunk/test/CodeGen/mmx-builtins.c
===================================================================
--- cfe/trunk/test/CodeGen/mmx-builtins.c
+++ cfe/trunk/test/CodeGen/mmx-builtins.c
@@ -223,6 +223,12 @@
   return _m_from_int(a);
 }
 
+__m64 test_m_from_int64(long long a) {
+  // CHECK-LABEL: test_m_from_int64
+  // CHECK: bitcast
+  return _m_from_int64(a);
+}
+
 __m64 test_mm_hadd_pi16(__m64 a, __m64 b) {
   // CHECK-LABEL: test_mm_hadd_pi16
   // CHECK: call x86_mmx @llvm.x86.ssse3.phadd.w
@@ -553,6 +559,12 @@
   return _m_to_int(a);
 }
 
+long long test_m_to_int64(__m64 a) {
+  // CHECK-LABEL: test_m_to_int64
+  // CHECK: bitcast
+  return _m_to_int64(a);
+}
+
 __m64 test_mm_unpackhi_pi8(__m64 a, __m64 b) {
   // CHECK-LABEL: test_mm_unpackhi_pi8
   // CHECK: call x86_mmx @llvm.x86.mmx.punpckhbw


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15572.43327.patch
Type: text/x-patch
Size: 1347 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151220/1e4145b1/attachment.bin>


More information about the llvm-commits mailing list