ret <8 x i32> %b
}
+define <8 x i16> @f64to8ss(<8 x double> %f) {
+; NOVL-LABEL: f64to8ss:
+; NOVL: # %bb.0:
+; NOVL-NEXT: vcvttpd2dq %zmm0, %ymm0
+; NOVL-NEXT: vpmovdw %zmm0, %ymm0
+; NOVL-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
+; NOVL-NEXT: vzeroupper
+; NOVL-NEXT: retq
+;
+; VL-LABEL: f64to8ss:
+; VL: # %bb.0:
+; VL-NEXT: vcvttpd2dq %zmm0, %ymm0
+; VL-NEXT: vpmovdw %ymm0, %xmm0
+; VL-NEXT: vzeroupper
+; VL-NEXT: retq
+ %res = fptosi <8 x double> %f to <8 x i16>
+ ret <8 x i16> %res
+}
+
+define <8 x i8> @f64to8sc(<8 x double> %f) {
+; NOVL-LABEL: f64to8sc:
+; NOVL: # %bb.0:
+; NOVL-NEXT: vcvttpd2dq %zmm0, %ymm0
+; NOVL-NEXT: vpmovdw %zmm0, %ymm0
+; NOVL-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
+; NOVL-NEXT: vzeroupper
+; NOVL-NEXT: retq
+;
+; VL-LABEL: f64to8sc:
+; VL: # %bb.0:
+; VL-NEXT: vcvttpd2dq %zmm0, %ymm0
+; VL-NEXT: vpmovdw %ymm0, %xmm0
+; VL-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
+; VL-NEXT: vzeroupper
+; VL-NEXT: retq
+ %res = fptosi <8 x double> %f to <8 x i8>
+ ret <8 x i8> %res
+}
+
define <4 x i32> @f64to4si(<4 x double> %a) {
; ALL-LABEL: f64to4si:
; ALL: # %bb.0:
ret <8 x i32> %b
}
+define <8 x i16> @f64to8ss(<8 x double> %f) {
+; NOVL-LABEL: f64to8ss:
+; NOVL: # %bb.0:
+; NOVL-NEXT: vcvttpd2dq %zmm0, %ymm0
+; NOVL-NEXT: vpmovdw %zmm0, %ymm0
+; NOVL-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
+; NOVL-NEXT: vzeroupper
+; NOVL-NEXT: retq
+;
+; VL-LABEL: f64to8ss:
+; VL: # %bb.0:
+; VL-NEXT: vcvttpd2dq %zmm0, %ymm0
+; VL-NEXT: vpmovdw %ymm0, %xmm0
+; VL-NEXT: vzeroupper
+; VL-NEXT: retq
+ %res = fptosi <8 x double> %f to <8 x i16>
+ ret <8 x i16> %res
+}
+
+define <8 x i8> @f64to8sc(<8 x double> %f) {
+; NOVL-LABEL: f64to8sc:
+; NOVL: # %bb.0:
+; NOVL-NEXT: vcvttpd2dq %zmm0, %ymm0
+; NOVL-NEXT: vpmovdw %zmm0, %ymm0
+; NOVL-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
+; NOVL-NEXT: vzeroupper
+; NOVL-NEXT: retq
+;
+; VL-LABEL: f64to8sc:
+; VL: # %bb.0:
+; VL-NEXT: vcvttpd2dq %zmm0, %ymm0
+; VL-NEXT: vpmovdw %ymm0, %xmm0
+; VL-NEXT: vzeroupper
+; VL-NEXT: retq
+ %res = fptosi <8 x double> %f to <8 x i8>
+ ret <8 x i8> %res
+}
+
define <4 x i32> @f64to4si(<4 x double> %a) {
; ALL-LABEL: f64to4si:
; ALL: # %bb.0: