[PATCH] D15572: [X86] Add missing m64/int64 conversions
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 16 06:50:24 PST 2015
mkuper created this revision.
mkuper added reviewers: AsafBadouh, delena.
mkuper added a subscriber: llvm-commits.
We had _m_to_int and _m_from_int, but not the int64 versions.
http://reviews.llvm.org/D15572
Files:
lib/Headers/mmintrin.h
test/CodeGen/mmx-builtins.c
Index: test/CodeGen/mmx-builtins.c
===================================================================
--- test/CodeGen/mmx-builtins.c
+++ 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
Index: lib/Headers/mmintrin.h
===================================================================
--- lib/Headers/mmintrin.h
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15572.43006.patch
Type: text/x-patch
Size: 1320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151216/003e4b66/attachment.bin>
More information about the llvm-commits
mailing list