1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=avx512fp16 -O3 | FileCheck %s --check-prefixes=CHECK
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=avx512fp16 -O3 | FileCheck %s --check-prefixes=CHECK
6 declare <8 x i64> @llvm.experimental.constrained.fptosi.v8i64.v8f16(<8 x half>, metadata)
7 declare <8 x i64> @llvm.experimental.constrained.fptoui.v8i64.v8f16(<8 x half>, metadata)
8 declare <16 x i32> @llvm.experimental.constrained.fptosi.v16i32.v16f16(<16 x half>, metadata)
9 declare <16 x i32> @llvm.experimental.constrained.fptoui.v16i32.v16f16(<16 x half>, metadata)
10 declare <32 x i16> @llvm.experimental.constrained.fptosi.v32i16.v32f16(<32 x half>, metadata)
11 declare <32 x i16> @llvm.experimental.constrained.fptoui.v32i16.v32f16(<32 x half>, metadata)
12 declare <32 x i8> @llvm.experimental.constrained.fptosi.v32i8.v32f16(<32 x half>, metadata)
13 declare <32 x i8> @llvm.experimental.constrained.fptoui.v32i8.v32f16(<32 x half>, metadata)
14 declare <32 x i1> @llvm.experimental.constrained.fptosi.v32i1.v32f16(<32 x half>, metadata)
15 declare <32 x i1> @llvm.experimental.constrained.fptoui.v32i1.v32f16(<32 x half>, metadata)
17 define <8 x i64> @strict_vector_fptosi_v8f16_to_v8i64(<8 x half> %a) #0 {
18 ; CHECK-LABEL: strict_vector_fptosi_v8f16_to_v8i64:
20 ; CHECK-NEXT: vcvttph2qq %xmm0, %zmm0
21 ; CHECK-NEXT: ret{{[l|q]}}
22 %ret = call <8 x i64> @llvm.experimental.constrained.fptosi.v8i64.v8f16(<8 x half> %a,
23 metadata !"fpexcept.strict") #0
27 define <8 x i64> @strict_vector_fptoui_v8f16_to_v8i64(<8 x half> %a) #0 {
28 ; CHECK-LABEL: strict_vector_fptoui_v8f16_to_v8i64:
30 ; CHECK-NEXT: vcvttph2uqq %xmm0, %zmm0
31 ; CHECK-NEXT: ret{{[l|q]}}
32 %ret = call <8 x i64> @llvm.experimental.constrained.fptoui.v8i64.v8f16(<8 x half> %a,
33 metadata !"fpexcept.strict") #0
37 define <16 x i32> @strict_vector_fptosi_v16f16_to_v16i32(<16 x half> %a) #0 {
38 ; CHECK-LABEL: strict_vector_fptosi_v16f16_to_v16i32:
40 ; CHECK-NEXT: vcvttph2dq %ymm0, %zmm0
41 ; CHECK-NEXT: ret{{[l|q]}}
42 %ret = call <16 x i32> @llvm.experimental.constrained.fptosi.v16i32.v16f16(<16 x half> %a,
43 metadata !"fpexcept.strict") #0
47 define <16 x i32> @strict_vector_fptoui_v16f16_to_v16i32(<16 x half> %a) #0 {
48 ; CHECK-LABEL: strict_vector_fptoui_v16f16_to_v16i32:
50 ; CHECK-NEXT: vcvttph2udq %ymm0, %zmm0
51 ; CHECK-NEXT: ret{{[l|q]}}
52 %ret = call <16 x i32> @llvm.experimental.constrained.fptoui.v16i32.v16f16(<16 x half> %a,
53 metadata !"fpexcept.strict") #0
57 define <32 x i16> @strict_vector_fptosi_v32f16_to_v32i16(<32 x half> %a) #0 {
58 ; CHECK-LABEL: strict_vector_fptosi_v32f16_to_v32i16:
60 ; CHECK-NEXT: vcvttph2w %zmm0, %zmm0
61 ; CHECK-NEXT: ret{{[l|q]}}
62 %ret = call <32 x i16> @llvm.experimental.constrained.fptosi.v32i16.v32f16(<32 x half> %a,
63 metadata !"fpexcept.strict") #0
67 define <32 x i16> @strict_vector_fptoui_v32f16_to_v32i16(<32 x half> %a) #0 {
68 ; CHECK-LABEL: strict_vector_fptoui_v32f16_to_v32i16:
70 ; CHECK-NEXT: vcvttph2uw %zmm0, %zmm0
71 ; CHECK-NEXT: ret{{[l|q]}}
72 %ret = call <32 x i16> @llvm.experimental.constrained.fptoui.v32i16.v32f16(<32 x half> %a,
73 metadata !"fpexcept.strict") #0
77 define <32 x i8> @strict_vector_fptosi_v32f16_to_v32i8(<32 x half> %a) #0 {
78 ; CHECK-LABEL: strict_vector_fptosi_v32f16_to_v32i8:
80 ; CHECK-NEXT: vcvttph2w %zmm0, %zmm0
81 ; CHECK-NEXT: vpmovwb %zmm0, %ymm0
82 ; CHECK-NEXT: ret{{[l|q]}}
83 %ret = call <32 x i8> @llvm.experimental.constrained.fptosi.v32i8.v32f16(<32 x half> %a,
84 metadata !"fpexcept.strict") #0
88 define <32 x i8> @strict_vector_fptoui_v32f16_to_v32i8(<32 x half> %a) #0 {
89 ; CHECK-LABEL: strict_vector_fptoui_v32f16_to_v32i8:
91 ; CHECK-NEXT: vcvttph2w %zmm0, %zmm0
92 ; CHECK-NEXT: vpmovwb %zmm0, %ymm0
93 ; CHECK-NEXT: ret{{[l|q]}}
94 %ret = call <32 x i8> @llvm.experimental.constrained.fptoui.v32i8.v32f16(<32 x half> %a,
95 metadata !"fpexcept.strict") #0
99 define <32 x i1> @strict_vector_fptosi_v32f16_to_v32i1(<32 x half> %a) #0 {
100 ; CHECK-LABEL: strict_vector_fptosi_v32f16_to_v32i1:
102 ; CHECK-NEXT: vcvttph2w %zmm0, %zmm0
103 ; CHECK-NEXT: vpmovw2m %zmm0, %k0
104 ; CHECK-NEXT: vpmovm2b %k0, %ymm0
105 ; CHECK-NEXT: ret{{[l|q]}}
106 %ret = call <32 x i1> @llvm.experimental.constrained.fptosi.v32i1.v32f16(<32 x half> %a,
107 metadata !"fpexcept.strict") #0
111 define <32 x i1> @strict_vector_fptoui_v32f16_to_v32i1(<32 x half> %a) #0 {
112 ; CHECK-LABEL: strict_vector_fptoui_v32f16_to_v32i1:
114 ; CHECK-NEXT: vcvttph2w %zmm0, %zmm0
115 ; CHECK-NEXT: vpsllw $15, %zmm0, %zmm0
116 ; CHECK-NEXT: vpmovw2m %zmm0, %k0
117 ; CHECK-NEXT: vpmovm2b %k0, %ymm0
118 ; CHECK-NEXT: ret{{[l|q]}}
119 %ret = call <32 x i1> @llvm.experimental.constrained.fptoui.v32i1.v32f16(<32 x half> %a,
120 metadata !"fpexcept.strict") #0
124 attributes #0 = { strictfp }