1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=avx512fp16 -O3 | FileCheck %s --check-prefixes=CHECK
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=avx512fp16 -O3 | FileCheck %s --check-prefixes=CHECK
declare <8 x i64> @llvm.experimental.constrained.fptosi.v8i64.v8f16(<8 x half>, metadata)
declare <8 x i64> @llvm.experimental.constrained.fptoui.v8i64.v8f16(<8 x half>, metadata)
declare <16 x i32> @llvm.experimental.constrained.fptosi.v16i32.v16f16(<16 x half>, metadata)
declare <16 x i32> @llvm.experimental.constrained.fptoui.v16i32.v16f16(<16 x half>, metadata)
declare <32 x i16> @llvm.experimental.constrained.fptosi.v32i16.v32f16(<32 x half>, metadata)
declare <32 x i16> @llvm.experimental.constrained.fptoui.v32i16.v32f16(<32 x half>, metadata)
declare <32 x i8> @llvm.experimental.constrained.fptosi.v32i8.v32f16(<32 x half>, metadata)
declare <32 x i8> @llvm.experimental.constrained.fptoui.v32i8.v32f16(<32 x half>, metadata)
declare <32 x i1> @llvm.experimental.constrained.fptosi.v32i1.v32f16(<32 x half>, metadata)
declare <32 x i1> @llvm.experimental.constrained.fptoui.v32i1.v32f16(<32 x half>, metadata)
define <8 x i64> @strict_vector_fptosi_v8f16_to_v8i64(<8 x half> %a) #0 {
; CHECK-LABEL: strict_vector_fptosi_v8f16_to_v8i64:
; CHECK: # %bb.0:
; CHECK-NEXT: vcvttph2qq %xmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <8 x i64> @llvm.experimental.constrained.fptosi.v8i64.v8f16(<8 x half> %a,
metadata !"fpexcept.strict") #0
ret <8 x i64> %ret
}
define <8 x i64> @strict_vector_fptoui_v8f16_to_v8i64(<8 x half> %a) #0 {
; CHECK-LABEL: strict_vector_fptoui_v8f16_to_v8i64:
; CHECK: # %bb.0:
; CHECK-NEXT: vcvttph2uqq %xmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <8 x i64> @llvm.experimental.constrained.fptoui.v8i64.v8f16(<8 x half> %a,
metadata !"fpexcept.strict") #0
ret <8 x i64> %ret
}
define <16 x i32> @strict_vector_fptosi_v16f16_to_v16i32(<16 x half> %a) #0 {
; CHECK-LABEL: strict_vector_fptosi_v16f16_to_v16i32:
; CHECK: # %bb.0:
; CHECK-NEXT: vcvttph2dq %ymm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <16 x i32> @llvm.experimental.constrained.fptosi.v16i32.v16f16(<16 x half> %a,
metadata !"fpexcept.strict") #0
ret <16 x i32> %ret
}
define <16 x i32> @strict_vector_fptoui_v16f16_to_v16i32(<16 x half> %a) #0 {
; CHECK-LABEL: strict_vector_fptoui_v16f16_to_v16i32:
; CHECK: # %bb.0:
; CHECK-NEXT: vcvttph2udq %ymm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <16 x i32> @llvm.experimental.constrained.fptoui.v16i32.v16f16(<16 x half> %a,
metadata !"fpexcept.strict") #0
ret <16 x i32> %ret
}
define <32 x i16> @strict_vector_fptosi_v32f16_to_v32i16(<32 x half> %a) #0 {
; CHECK-LABEL: strict_vector_fptosi_v32f16_to_v32i16:
; CHECK: # %bb.0:
; CHECK-NEXT: vcvttph2w %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <32 x i16> @llvm.experimental.constrained.fptosi.v32i16.v32f16(<32 x half> %a,
metadata !"fpexcept.strict") #0
ret <32 x i16> %ret
}
define <32 x i16> @strict_vector_fptoui_v32f16_to_v32i16(<32 x half> %a) #0 {
; CHECK-LABEL: strict_vector_fptoui_v32f16_to_v32i16:
; CHECK: # %bb.0:
; CHECK-NEXT: vcvttph2uw %zmm0, %zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <32 x i16> @llvm.experimental.constrained.fptoui.v32i16.v32f16(<32 x half> %a,
metadata !"fpexcept.strict") #0
ret <32 x i16> %ret
}
define <32 x i8> @strict_vector_fptosi_v32f16_to_v32i8(<32 x half> %a) #0 {
; CHECK-LABEL: strict_vector_fptosi_v32f16_to_v32i8:
; CHECK: # %bb.0:
; CHECK-NEXT: vcvttph2w %zmm0, %zmm0
; CHECK-NEXT: vpmovwb %zmm0, %ymm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <32 x i8> @llvm.experimental.constrained.fptosi.v32i8.v32f16(<32 x half> %a,
metadata !"fpexcept.strict") #0
ret <32 x i8> %ret
}
define <32 x i8> @strict_vector_fptoui_v32f16_to_v32i8(<32 x half> %a) #0 {
; CHECK-LABEL: strict_vector_fptoui_v32f16_to_v32i8:
; CHECK: # %bb.0:
; CHECK-NEXT: vcvttph2w %zmm0, %zmm0
; CHECK-NEXT: vpmovwb %zmm0, %ymm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <32 x i8> @llvm.experimental.constrained.fptoui.v32i8.v32f16(<32 x half> %a,
metadata !"fpexcept.strict") #0
ret <32 x i8> %ret
}
define <32 x i1> @strict_vector_fptosi_v32f16_to_v32i1(<32 x half> %a) #0 {
; CHECK-LABEL: strict_vector_fptosi_v32f16_to_v32i1:
; CHECK: # %bb.0:
; CHECK-NEXT: vcvttph2w %zmm0, %zmm0
; CHECK-NEXT: vpmovw2m %zmm0, %k0
; CHECK-NEXT: vpmovm2b %k0, %zmm0
; CHECK-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <32 x i1> @llvm.experimental.constrained.fptosi.v32i1.v32f16(<32 x half> %a,
metadata !"fpexcept.strict") #0
ret <32 x i1> %ret
}
define <32 x i1> @strict_vector_fptoui_v32f16_to_v32i1(<32 x half> %a) #0 {
; CHECK-LABEL: strict_vector_fptoui_v32f16_to_v32i1:
; CHECK: # %bb.0:
; CHECK-NEXT: vcvttph2w %zmm0, %zmm0
; CHECK-NEXT: vpsllw $15, %zmm0, %zmm0
; CHECK-NEXT: vpmovw2m %zmm0, %k0
; CHECK-NEXT: vpmovm2b %k0, %zmm0
; CHECK-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
; CHECK-NEXT: ret{{[l|q]}}
%ret = call <32 x i1> @llvm.experimental.constrained.fptoui.v32i1.v32f16(<32 x half> %a,
metadata !"fpexcept.strict") #0
ret <32 x i1> %ret
}
attributes #0 = { strictfp }
|