Skip to content

Commit e399f55

Browse files
committed
[X86] Add one more intrinsic and test cases to avx512-cvttp2i.ll.
spatel noticed it was missing in D47993. llvm-svn: 334629
1 parent 1d7ed94 commit e399f55

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

llvm/test/CodeGen/X86/avx512-cvttp2i.ll

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ declare <4 x i32> @llvm.x86.avx512.mask.cvttps2udq.128(<4 x float>, <4 x i32>, i
99
declare <8 x i32> @llvm.x86.avx512.mask.cvttps2udq.256(<8 x float>, <8 x i32>, i8)
1010
declare <16 x i32> @llvm.x86.avx512.mask.cvttps2udq.512(<16 x float>, <16 x i32>, i16, i32)
1111
declare <4 x i32> @llvm.x86.avx512.mask.cvttpd2udq.256(<4 x double>, <4 x i32>, i8)
12+
declare <8 x i32> @llvm.x86.avx512.mask.cvttpd2dq.512(<8 x double>, <8 x i32>, i8, i32)
1213
declare <8 x i32> @llvm.x86.avx512.mask.cvttpd2udq.512(<8 x double>, <8 x i32>, i8, i32)
1314
declare <4 x i64> @llvm.x86.avx512.mask.cvttps2qq.256(<4 x float>, <4 x i64>, i8)
1415
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_double_reg_v4f64(<4 x double> %x) {
126127
ret <4 x double> %uitofp
127128
}
128129

130+
define <8 x double> @double_to_sint_to_double_mem_v8f64(<8 x double>* %p) {
131+
; CHECK-LABEL: double_to_sint_to_double_mem_v8f64:
132+
; CHECK: # %bb.0:
133+
; CHECK-NEXT: vrndscalepd $11, (%rdi), %zmm0
134+
; CHECK-NEXT: retq
135+
%x = load <8 x double>, <8 x double>* %p
136+
%fptosi = tail call <8 x i32> @llvm.x86.avx512.mask.cvttpd2dq.512(<8 x double> %x, <8 x i32> undef, i8 -1, i32 4)
137+
%sitofp = sitofp <8 x i32> %fptosi to <8 x double>
138+
ret <8 x double> %sitofp
139+
}
140+
141+
define <8 x double> @double_to_sint_to_double_reg_v8f64(<8 x double> %x) {
142+
; CHECK-LABEL: double_to_sint_to_double_reg_v8f64:
143+
; CHECK: # %bb.0:
144+
; CHECK-NEXT: vrndscalepd $11, %zmm0, %zmm0
145+
; CHECK-NEXT: retq
146+
%fptosi = tail call <8 x i32> @llvm.x86.avx512.mask.cvttpd2dq.512(<8 x double> %x, <8 x i32> undef, i8 -1, i32 4)
147+
%sitofp = sitofp <8 x i32> %fptosi to <8 x double>
148+
ret <8 x double> %sitofp
149+
}
150+
129151
define <8 x double> @double_to_uint_to_double_mem_v8f64(<8 x double>* %p) {
130152
; CHECK-LABEL: double_to_uint_to_double_mem_v8f64:
131153
; CHECK: # %bb.0:

0 commit comments

Comments
 (0)