[llvm] r334629 - [X86] Add one more intrinsic and test cases to avx512-cvttp2i.ll.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 10:55:13 PDT 2018


Author: ctopper
Date: Wed Jun 13 10:55:13 2018
New Revision: 334629

URL: http://llvm.org/viewvc/llvm-project?rev=334629&view=rev
Log:
[X86] Add one more intrinsic and test cases to avx512-cvttp2i.ll.

spatel noticed it was missing in D47993.

Modified:
    llvm/trunk/test/CodeGen/X86/avx512-cvttp2i.ll

Modified: llvm/trunk/test/CodeGen/X86/avx512-cvttp2i.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512-cvttp2i.ll?rev=334629&r1=334628&r2=334629&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx512-cvttp2i.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx512-cvttp2i.ll Wed Jun 13 10:55:13 2018
@@ -9,6 +9,7 @@ declare <4 x i32> @llvm.x86.avx512.mask.
 declare <8 x i32> @llvm.x86.avx512.mask.cvttps2udq.256(<8 x float>, <8 x i32>, i8)
 declare <16 x i32> @llvm.x86.avx512.mask.cvttps2udq.512(<16 x float>, <16 x i32>, i16, i32)
 declare <4 x i32> @llvm.x86.avx512.mask.cvttpd2udq.256(<4 x double>, <4 x i32>, i8)
+declare <8 x i32> @llvm.x86.avx512.mask.cvttpd2dq.512(<8 x double>, <8 x i32>, i8, i32)
 declare <8 x i32> @llvm.x86.avx512.mask.cvttpd2udq.512(<8 x double>, <8 x i32>, i8, i32)
 declare <4 x i64> @llvm.x86.avx512.mask.cvttps2qq.256(<4 x float>, <4 x i64>, i8)
 declare <8 x i64> @llvm.x86.avx512.mask.cvttps2qq.512(<8 x float>, <8 x i64>, i8, i32)
@@ -126,6 +127,27 @@ define <4 x double> @double_to_uint_to_d
   ret <4 x double> %uitofp
 }
 
+define <8 x double> @double_to_sint_to_double_mem_v8f64(<8 x double>* %p) {
+; CHECK-LABEL: double_to_sint_to_double_mem_v8f64:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    vrndscalepd $11, (%rdi), %zmm0
+; CHECK-NEXT:    retq
+  %x = load <8 x double>, <8 x double>* %p
+  %fptosi = tail call <8 x i32> @llvm.x86.avx512.mask.cvttpd2dq.512(<8 x double> %x, <8 x i32> undef, i8 -1, i32 4)
+  %sitofp = sitofp <8 x i32> %fptosi to <8 x double>
+  ret <8 x double> %sitofp
+}
+
+define <8 x double> @double_to_sint_to_double_reg_v8f64(<8 x double> %x) {
+; CHECK-LABEL: double_to_sint_to_double_reg_v8f64:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    vrndscalepd $11, %zmm0, %zmm0
+; CHECK-NEXT:    retq
+  %fptosi = tail call <8 x i32> @llvm.x86.avx512.mask.cvttpd2dq.512(<8 x double> %x, <8 x i32> undef, i8 -1, i32 4)
+  %sitofp = sitofp <8 x i32> %fptosi to <8 x double>
+  ret <8 x double> %sitofp
+}
+
 define <8 x double> @double_to_uint_to_double_mem_v8f64(<8 x double>* %p) {
 ; CHECK-LABEL: double_to_uint_to_double_mem_v8f64:
 ; CHECK:       # %bb.0:




More information about the llvm-commits mailing list