1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mcpu=sapphirerapids -mattr=+false-deps-getmant -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=ENABLE
3 ; RUN: llc -verify-machineinstrs -mcpu=sapphirerapids -mattr=-false-deps-getmant -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=DISABLE
5 define <4 x float> @getmantps_mem_128(ptr %p0) {
6 ; ENABLE-LABEL: getmantps_mem_128:
10 ; ENABLE-NEXT: #NO_APP
11 ; ENABLE-NEXT: vxorps %xmm0, %xmm0, %xmm0
12 ; ENABLE-NEXT: vgetmantps $88, (%rdi), %xmm0
15 ; DISABLE-LABEL: getmantps_mem_128:
19 ; DISABLE-NEXT: #NO_APP
20 ; DISABLE-NEXT: vgetmantps $88, (%rdi), %xmm0
22 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
23 %a0 = load <4 x float>, ptr %p0, align 64
24 %2 = call <4 x float> @llvm.x86.avx512.mask.getmant.ps.128(<4 x float> %a0, i32 88, <4 x float> undef, i8 -1)
28 define <4 x float> @getmantps_broadcast_128(ptr %p0) {
29 ; ENABLE-LABEL: getmantps_broadcast_128:
33 ; ENABLE-NEXT: #NO_APP
34 ; ENABLE-NEXT: vxorps %xmm0, %xmm0, %xmm0
35 ; ENABLE-NEXT: vgetmantps $88, (%rdi){1to4}, %xmm0
38 ; DISABLE-LABEL: getmantps_broadcast_128:
42 ; DISABLE-NEXT: #NO_APP
43 ; DISABLE-NEXT: vgetmantps $88, (%rdi){1to4}, %xmm0
45 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
46 %v0 = load float, ptr %p0, align 4
47 %t0 = insertelement <4 x float> undef, float %v0, i64 0
48 %a0 = shufflevector <4 x float> %t0, <4 x float> undef, <4 x i32> zeroinitializer
49 %2 = call <4 x float> @llvm.x86.avx512.mask.getmant.ps.128(<4 x float> %a0, i32 88, <4 x float> undef, i8 -1)
53 declare <4 x float> @llvm.x86.avx512.mask.getmant.ps.128(<4 x float>, i32, <4 x float>, i8)
55 define <8 x float> @getmantps_mem_256(ptr %p0) {
56 ; ENABLE-LABEL: getmantps_mem_256:
60 ; ENABLE-NEXT: #NO_APP
61 ; ENABLE-NEXT: vxorps %xmm0, %xmm0, %xmm0
62 ; ENABLE-NEXT: vgetmantps $88, (%rdi), %ymm0
65 ; DISABLE-LABEL: getmantps_mem_256:
69 ; DISABLE-NEXT: #NO_APP
70 ; DISABLE-NEXT: vgetmantps $88, (%rdi), %ymm0
72 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
73 %a0 = load <8 x float>, ptr %p0, align 64
74 %2 = call <8 x float> @llvm.x86.avx512.mask.getmant.ps.256(<8 x float> %a0, i32 88, <8 x float> undef, i8 -1)
78 define <8 x float> @getmantps_broadcast_256(ptr %p0) {
79 ; ENABLE-LABEL: getmantps_broadcast_256:
83 ; ENABLE-NEXT: #NO_APP
84 ; ENABLE-NEXT: vxorps %xmm0, %xmm0, %xmm0
85 ; ENABLE-NEXT: vgetmantps $88, (%rdi){1to8}, %ymm0
88 ; DISABLE-LABEL: getmantps_broadcast_256:
92 ; DISABLE-NEXT: #NO_APP
93 ; DISABLE-NEXT: vgetmantps $88, (%rdi){1to8}, %ymm0
95 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
96 %v0 = load float, ptr %p0, align 4
97 %t0 = insertelement <8 x float> undef, float %v0, i64 0
98 %a0 = shufflevector <8 x float> %t0, <8 x float> undef, <8 x i32> zeroinitializer
99 %2 = call <8 x float> @llvm.x86.avx512.mask.getmant.ps.256(<8 x float> %a0, i32 88, <8 x float> undef, i8 -1)
103 declare <8 x float> @llvm.x86.avx512.mask.getmant.ps.256(<8 x float>, i32, <8 x float>, i8)
105 define <16 x float> @getmantps_mem_512(ptr %p0) {
106 ; ENABLE-LABEL: getmantps_mem_512:
110 ; ENABLE-NEXT: #NO_APP
111 ; ENABLE-NEXT: vpxor %xmm0, %xmm0, %xmm0
112 ; ENABLE-NEXT: vgetmantps $88, (%rdi), %zmm0
115 ; DISABLE-LABEL: getmantps_mem_512:
119 ; DISABLE-NEXT: #NO_APP
120 ; DISABLE-NEXT: vgetmantps $88, (%rdi), %zmm0
122 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
123 %a0 = load <16 x float>, ptr %p0, align 64
124 %2 = call <16 x float> @llvm.x86.avx512.mask.getmant.ps.512(<16 x float> %a0, i32 88, <16 x float> undef, i16 -1, i32 4)
128 define <16 x float> @getmantps_broadcast_512(ptr %p0) {
129 ; ENABLE-LABEL: getmantps_broadcast_512:
133 ; ENABLE-NEXT: #NO_APP
134 ; ENABLE-NEXT: vpxor %xmm0, %xmm0, %xmm0
135 ; ENABLE-NEXT: vgetmantps $88, (%rdi){1to16}, %zmm0
138 ; DISABLE-LABEL: getmantps_broadcast_512:
142 ; DISABLE-NEXT: #NO_APP
143 ; DISABLE-NEXT: vgetmantps $88, (%rdi){1to16}, %zmm0
145 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
146 %v0 = load float, ptr %p0, align 4
147 %t0 = insertelement <16 x float> undef, float %v0, i64 0
148 %a0 = shufflevector <16 x float> %t0, <16 x float> undef, <16 x i32> zeroinitializer
149 %2 = call <16 x float> @llvm.x86.avx512.mask.getmant.ps.512(<16 x float> %a0, i32 88, <16 x float> undef, i16 -1, i32 4)
153 declare <16 x float> @llvm.x86.avx512.mask.getmant.ps.512(<16 x float>, i32, <16 x float>, i16, i32)
156 define <2 x double> @getmantpd_mem_128(ptr %p0) {
157 ; ENABLE-LABEL: getmantpd_mem_128:
161 ; ENABLE-NEXT: #NO_APP
162 ; ENABLE-NEXT: vxorps %xmm0, %xmm0, %xmm0
163 ; ENABLE-NEXT: vgetmantpd $88, (%rdi), %xmm0
166 ; DISABLE-LABEL: getmantpd_mem_128:
170 ; DISABLE-NEXT: #NO_APP
171 ; DISABLE-NEXT: vgetmantpd $88, (%rdi), %xmm0
173 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
174 %a0 = load <2 x double>, ptr %p0, align 64
175 %2 = call <2 x double> @llvm.x86.avx512.mask.getmant.pd.128(<2 x double> %a0, i32 88, <2 x double> undef, i8 -1)
179 define <2 x double> @getmantpd_broadcast_128(ptr %p0) {
180 ; ENABLE-LABEL: getmantpd_broadcast_128:
184 ; ENABLE-NEXT: #NO_APP
185 ; ENABLE-NEXT: vxorps %xmm0, %xmm0, %xmm0
186 ; ENABLE-NEXT: vgetmantpd $88, (%rdi){1to2}, %xmm0
189 ; DISABLE-LABEL: getmantpd_broadcast_128:
193 ; DISABLE-NEXT: #NO_APP
194 ; DISABLE-NEXT: vgetmantpd $88, (%rdi){1to2}, %xmm0
196 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
197 %v0 = load double, ptr %p0, align 4
198 %t0 = insertelement <2 x double> undef, double %v0, i64 0
199 %a0 = shufflevector <2 x double> %t0, <2 x double> undef, <2 x i32> zeroinitializer
200 %2 = call <2 x double> @llvm.x86.avx512.mask.getmant.pd.128(<2 x double> %a0, i32 88, <2 x double> undef, i8 -1)
204 declare <2 x double> @llvm.x86.avx512.mask.getmant.pd.128(<2 x double>, i32, <2 x double>, i8)
206 define <4 x double> @getmantpd_mem_256(ptr %p0) {
207 ; ENABLE-LABEL: getmantpd_mem_256:
211 ; ENABLE-NEXT: #NO_APP
212 ; ENABLE-NEXT: vxorps %xmm0, %xmm0, %xmm0
213 ; ENABLE-NEXT: vgetmantpd $88, (%rdi), %ymm0
216 ; DISABLE-LABEL: getmantpd_mem_256:
220 ; DISABLE-NEXT: #NO_APP
221 ; DISABLE-NEXT: vgetmantpd $88, (%rdi), %ymm0
223 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
224 %a0 = load <4 x double>, ptr %p0, align 64
225 %2 = call <4 x double> @llvm.x86.avx512.mask.getmant.pd.256(<4 x double> %a0, i32 88, <4 x double> undef, i8 -1)
229 define <4 x double> @getmantpd_broadcast_256(ptr %p0) {
230 ; ENABLE-LABEL: getmantpd_broadcast_256:
234 ; ENABLE-NEXT: #NO_APP
235 ; ENABLE-NEXT: vxorps %xmm0, %xmm0, %xmm0
236 ; ENABLE-NEXT: vgetmantpd $88, (%rdi){1to4}, %ymm0
239 ; DISABLE-LABEL: getmantpd_broadcast_256:
243 ; DISABLE-NEXT: #NO_APP
244 ; DISABLE-NEXT: vgetmantpd $88, (%rdi){1to4}, %ymm0
246 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
247 %v0 = load double, ptr %p0, align 4
248 %t0 = insertelement <4 x double> undef, double %v0, i64 0
249 %a0 = shufflevector <4 x double> %t0, <4 x double> undef, <4 x i32> zeroinitializer
250 %2 = call <4 x double> @llvm.x86.avx512.mask.getmant.pd.256(<4 x double> %a0, i32 88, <4 x double> undef, i8 -1)
254 declare <4 x double> @llvm.x86.avx512.mask.getmant.pd.256(<4 x double>, i32, <4 x double>, i8)
256 define <8 x double> @getmantpd_mem_512(ptr %p0) {
257 ; ENABLE-LABEL: getmantpd_mem_512:
261 ; ENABLE-NEXT: #NO_APP
262 ; ENABLE-NEXT: vpxor %xmm0, %xmm0, %xmm0
263 ; ENABLE-NEXT: vgetmantpd $88, (%rdi), %zmm0
266 ; DISABLE-LABEL: getmantpd_mem_512:
270 ; DISABLE-NEXT: #NO_APP
271 ; DISABLE-NEXT: vgetmantpd $88, (%rdi), %zmm0
273 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
274 %a0 = load <8 x double>, ptr %p0, align 64
275 %2 = call <8 x double> @llvm.x86.avx512.mask.getmant.pd.512(<8 x double> %a0, i32 88, <8 x double> undef, i8 -1, i32 4)
279 define <8 x double> @getmantpd_broadcast_512(ptr %p0) {
280 ; ENABLE-LABEL: getmantpd_broadcast_512:
284 ; ENABLE-NEXT: #NO_APP
285 ; ENABLE-NEXT: vpxor %xmm0, %xmm0, %xmm0
286 ; ENABLE-NEXT: vgetmantpd $88, (%rdi){1to8}, %zmm0
289 ; DISABLE-LABEL: getmantpd_broadcast_512:
293 ; DISABLE-NEXT: #NO_APP
294 ; DISABLE-NEXT: vgetmantpd $88, (%rdi){1to8}, %zmm0
296 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
297 %v0 = load double, ptr %p0, align 4
298 %t0 = insertelement <8 x double> undef, double %v0, i64 0
299 %a0 = shufflevector <8 x double> %t0, <8 x double> undef, <8 x i32> zeroinitializer
300 %2 = call <8 x double> @llvm.x86.avx512.mask.getmant.pd.512(<8 x double> %a0, i32 88, <8 x double> undef, i8 -1, i32 4)
304 declare <8 x double> @llvm.x86.avx512.mask.getmant.pd.512(<8 x double>, i32, <8 x double>, i8, i32)
306 define <8 x half> @getmantsh(<8 x half> %a0, <8 x half> %a1) {
307 ; ENABLE-LABEL: getmantsh:
309 ; ENABLE-NEXT: vmovaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
312 ; ENABLE-NEXT: #NO_APP
313 ; ENABLE-NEXT: vmovaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm2 # 16-byte Reload
314 ; ENABLE-NEXT: vxorps %xmm1, %xmm1, %xmm1
315 ; ENABLE-NEXT: vgetmantsh $11, %xmm2, %xmm0, %xmm1
316 ; ENABLE-NEXT: vaddph %xmm2, %xmm0, %xmm0
317 ; ENABLE-NEXT: vaddph %xmm0, %xmm1, %xmm0
320 ; DISABLE-LABEL: getmantsh:
322 ; DISABLE-NEXT: vmovaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
325 ; DISABLE-NEXT: #NO_APP
326 ; DISABLE-NEXT: vmovaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm2 # 16-byte Reload
327 ; DISABLE-NEXT: vgetmantsh $11, %xmm2, %xmm0, %xmm1
328 ; DISABLE-NEXT: vaddph %xmm2, %xmm0, %xmm0
329 ; DISABLE-NEXT: vaddph %xmm0, %xmm1, %xmm0
331 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
332 %2 = call <8 x half> @llvm.x86.avx512fp16.mask.getmant.sh(<8 x half> %a0, <8 x half> %a1, i32 11, <8 x half> undef, i8 -1, i32 4)
333 %t = fadd <8 x half> %a0, %a1
334 %res = fadd <8 x half> %2, %t
338 define <8 x half> @getmantsh_mem(<8 x half> %a0, ptr %p1) {
339 ; ENABLE-LABEL: getmantsh_mem:
341 ; ENABLE-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
344 ; ENABLE-NEXT: #NO_APP
345 ; ENABLE-NEXT: vmovaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
346 ; ENABLE-NEXT: vxorps %xmm0, %xmm0, %xmm0
347 ; ENABLE-NEXT: vgetmantsh $11, (%rdi), %xmm1, %xmm0
348 ; ENABLE-NEXT: vaddph %xmm1, %xmm0, %xmm0
351 ; DISABLE-LABEL: getmantsh_mem:
353 ; DISABLE-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
356 ; DISABLE-NEXT: #NO_APP
357 ; DISABLE-NEXT: vmovaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
358 ; DISABLE-NEXT: vgetmantsh $11, (%rdi), %xmm1, %xmm0
359 ; DISABLE-NEXT: vaddph %xmm1, %xmm0, %xmm0
361 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
362 %a1 = load <8 x half>, ptr %p1, align 64
363 %2 = call <8 x half> @llvm.x86.avx512fp16.mask.getmant.sh(<8 x half> %a0, <8 x half> %a1, i32 11, <8 x half> undef, i8 -1, i32 4)
364 %res = fadd <8 x half> %2, %a0
368 define <8 x half> @getmantsh_maskz(<8 x half> %a0, <8 x half> %a1, ptr %mask) {
369 ; ENABLE-LABEL: getmantsh_maskz:
373 ; ENABLE-NEXT: #NO_APP
374 ; ENABLE-NEXT: kmovb (%rdi), %k1
375 ; ENABLE-NEXT: vxorps %xmm2, %xmm2, %xmm2
376 ; ENABLE-NEXT: vgetmantsh $11, %xmm1, %xmm0, %xmm2 {%k1} {z}
377 ; ENABLE-NEXT: vaddph %xmm1, %xmm0, %xmm0
378 ; ENABLE-NEXT: vaddph %xmm0, %xmm2, %xmm0
381 ; DISABLE-LABEL: getmantsh_maskz:
385 ; DISABLE-NEXT: #NO_APP
386 ; DISABLE-NEXT: kmovb (%rdi), %k1
387 ; DISABLE-NEXT: vgetmantsh $11, %xmm1, %xmm0, %xmm2 {%k1} {z}
388 ; DISABLE-NEXT: vaddph %xmm1, %xmm0, %xmm0
389 ; DISABLE-NEXT: vaddph %xmm0, %xmm2, %xmm0
391 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
392 %2 = load i8, ptr %mask
393 %3 = call <8 x half> @llvm.x86.avx512fp16.mask.getmant.sh(<8 x half> %a0, <8 x half> %a1, i32 11, <8 x half> zeroinitializer, i8 %2, i32 4)
394 %t = fadd <8 x half> %a0, %a1
395 %res = fadd <8 x half> %3, %t
399 declare <8 x half> @llvm.x86.avx512fp16.mask.getmant.sh(<8 x half>, <8 x half>, i32, <8 x half>, i8, i32)
401 define <4 x float> @getmantss(<4 x float> %a0, <4 x float> %a1) {
402 ; ENABLE-LABEL: getmantss:
404 ; ENABLE-NEXT: vmovaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
407 ; ENABLE-NEXT: #NO_APP
408 ; ENABLE-NEXT: vmovaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm2 # 16-byte Reload
409 ; ENABLE-NEXT: vxorps %xmm1, %xmm1, %xmm1
410 ; ENABLE-NEXT: vgetmantss $11, %xmm2, %xmm0, %xmm1
411 ; ENABLE-NEXT: vaddps %xmm2, %xmm0, %xmm0
412 ; ENABLE-NEXT: vaddps %xmm0, %xmm1, %xmm0
415 ; DISABLE-LABEL: getmantss:
417 ; DISABLE-NEXT: vmovaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
420 ; DISABLE-NEXT: #NO_APP
421 ; DISABLE-NEXT: vmovaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm2 # 16-byte Reload
422 ; DISABLE-NEXT: vgetmantss $11, %xmm2, %xmm0, %xmm1
423 ; DISABLE-NEXT: vaddps %xmm2, %xmm0, %xmm0
424 ; DISABLE-NEXT: vaddps %xmm0, %xmm1, %xmm0
426 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
427 %2 = call <4 x float> @llvm.x86.avx512.mask.getmant.ss(<4 x float> %a0, <4 x float> %a1, i32 11, <4 x float> undef, i8 -1, i32 4)
428 %t = fadd <4 x float> %a0, %a1
429 %res = fadd <4 x float> %2, %t
433 define <4 x float> @getmantss_mem(<4 x float> %a0, ptr %p1) {
434 ; ENABLE-LABEL: getmantss_mem:
436 ; ENABLE-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
439 ; ENABLE-NEXT: #NO_APP
440 ; ENABLE-NEXT: vmovaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
441 ; ENABLE-NEXT: vxorps %xmm0, %xmm0, %xmm0
442 ; ENABLE-NEXT: vgetmantss $11, (%rdi), %xmm1, %xmm0
443 ; ENABLE-NEXT: vaddps %xmm1, %xmm0, %xmm0
446 ; DISABLE-LABEL: getmantss_mem:
448 ; DISABLE-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
451 ; DISABLE-NEXT: #NO_APP
452 ; DISABLE-NEXT: vmovaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
453 ; DISABLE-NEXT: vgetmantss $11, (%rdi), %xmm1, %xmm0
454 ; DISABLE-NEXT: vaddps %xmm1, %xmm0, %xmm0
456 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
457 %a1 = load <4 x float>, ptr %p1, align 64
458 %2 = call <4 x float> @llvm.x86.avx512.mask.getmant.ss(<4 x float> %a0, <4 x float> %a1, i32 11, <4 x float> undef, i8 -1, i32 4)
459 %res = fadd <4 x float> %2, %a0
463 define <4 x float> @getmantss_maskz(<4 x float> %a0, <4 x float> %a1, ptr %mask) {
464 ; ENABLE-LABEL: getmantss_maskz:
468 ; ENABLE-NEXT: #NO_APP
469 ; ENABLE-NEXT: kmovb (%rdi), %k1
470 ; ENABLE-NEXT: vxorps %xmm2, %xmm2, %xmm2
471 ; ENABLE-NEXT: vgetmantss $11, %xmm1, %xmm0, %xmm2 {%k1} {z}
472 ; ENABLE-NEXT: vaddps %xmm1, %xmm0, %xmm0
473 ; ENABLE-NEXT: vaddps %xmm0, %xmm2, %xmm0
476 ; DISABLE-LABEL: getmantss_maskz:
480 ; DISABLE-NEXT: #NO_APP
481 ; DISABLE-NEXT: kmovb (%rdi), %k1
482 ; DISABLE-NEXT: vgetmantss $11, %xmm1, %xmm0, %xmm2 {%k1} {z}
483 ; DISABLE-NEXT: vaddps %xmm1, %xmm0, %xmm0
484 ; DISABLE-NEXT: vaddps %xmm0, %xmm2, %xmm0
486 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
487 %2 = load i8, ptr %mask
488 %3 = call <4 x float> @llvm.x86.avx512.mask.getmant.ss(<4 x float> %a0, <4 x float> %a1, i32 11, <4 x float> zeroinitializer, i8 %2, i32 4)
489 %t = fadd <4 x float> %a0, %a1
490 %res = fadd <4 x float> %3, %t
494 declare <4 x float> @llvm.x86.avx512.mask.getmant.ss(<4 x float>, <4 x float>, i32, <4 x float>, i8, i32)
496 define <2 x double> @getmantsd(<2 x double> %a0, <2 x double> %a1) {
497 ; ENABLE-LABEL: getmantsd:
499 ; ENABLE-NEXT: vmovaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
502 ; ENABLE-NEXT: #NO_APP
503 ; ENABLE-NEXT: vmovapd {{[-0-9]+}}(%r{{[sb]}}p), %xmm2 # 16-byte Reload
504 ; ENABLE-NEXT: vxorps %xmm1, %xmm1, %xmm1
505 ; ENABLE-NEXT: vgetmantsd $11, %xmm2, %xmm0, %xmm1
506 ; ENABLE-NEXT: vaddpd %xmm2, %xmm0, %xmm0
507 ; ENABLE-NEXT: vaddpd %xmm0, %xmm1, %xmm0
510 ; DISABLE-LABEL: getmantsd:
512 ; DISABLE-NEXT: vmovaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
515 ; DISABLE-NEXT: #NO_APP
516 ; DISABLE-NEXT: vmovapd {{[-0-9]+}}(%r{{[sb]}}p), %xmm2 # 16-byte Reload
517 ; DISABLE-NEXT: vgetmantsd $11, %xmm2, %xmm0, %xmm1
518 ; DISABLE-NEXT: vaddpd %xmm2, %xmm0, %xmm0
519 ; DISABLE-NEXT: vaddpd %xmm0, %xmm1, %xmm0
521 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
522 %2 = call <2 x double> @llvm.x86.avx512.mask.getmant.sd(<2 x double> %a0, <2 x double> %a1, i32 11, <2 x double> undef, i8 -1, i32 4)
523 %t = fadd <2 x double> %a0, %a1
524 %res = fadd <2 x double> %2, %t
525 ret <2 x double> %res
528 define <2 x double> @getmantsd_mem(<2 x double> %a0, ptr %p1) {
529 ; ENABLE-LABEL: getmantsd_mem:
531 ; ENABLE-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
534 ; ENABLE-NEXT: #NO_APP
535 ; ENABLE-NEXT: vmovapd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
536 ; ENABLE-NEXT: vxorps %xmm0, %xmm0, %xmm0
537 ; ENABLE-NEXT: vgetmantsd $11, (%rdi), %xmm1, %xmm0
538 ; ENABLE-NEXT: vaddpd %xmm1, %xmm0, %xmm0
541 ; DISABLE-LABEL: getmantsd_mem:
543 ; DISABLE-NEXT: vmovaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
546 ; DISABLE-NEXT: #NO_APP
547 ; DISABLE-NEXT: vmovapd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
548 ; DISABLE-NEXT: vgetmantsd $11, (%rdi), %xmm1, %xmm0
549 ; DISABLE-NEXT: vaddpd %xmm1, %xmm0, %xmm0
551 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
552 %a1 = load <2 x double>, ptr %p1, align 64
553 %2 = call <2 x double> @llvm.x86.avx512.mask.getmant.sd(<2 x double> %a0, <2 x double> %a1, i32 11, <2 x double> undef, i8 -1, i32 4)
554 %res = fadd <2 x double> %2, %a0
555 ret <2 x double> %res
558 define <2 x double> @getmantsd_maskz(<2 x double> %a0, <2 x double> %a1, ptr %mask) {
559 ; ENABLE-LABEL: getmantsd_maskz:
563 ; ENABLE-NEXT: #NO_APP
564 ; ENABLE-NEXT: kmovb (%rdi), %k1
565 ; ENABLE-NEXT: vxorps %xmm2, %xmm2, %xmm2
566 ; ENABLE-NEXT: vgetmantsd $11, %xmm1, %xmm0, %xmm2 {%k1} {z}
567 ; ENABLE-NEXT: vaddpd %xmm1, %xmm0, %xmm0
568 ; ENABLE-NEXT: vaddpd %xmm0, %xmm2, %xmm0
571 ; DISABLE-LABEL: getmantsd_maskz:
575 ; DISABLE-NEXT: #NO_APP
576 ; DISABLE-NEXT: kmovb (%rdi), %k1
577 ; DISABLE-NEXT: vgetmantsd $11, %xmm1, %xmm0, %xmm2 {%k1} {z}
578 ; DISABLE-NEXT: vaddpd %xmm1, %xmm0, %xmm0
579 ; DISABLE-NEXT: vaddpd %xmm0, %xmm2, %xmm0
581 %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{flags}"()
582 %2 = load i8, ptr %mask
583 %3 = call <2 x double> @llvm.x86.avx512.mask.getmant.sd(<2 x double> %a0, <2 x double> %a1, i32 11, <2 x double> zeroinitializer, i8 %2, i32 4)
584 %t = fadd <2 x double> %a0, %a1
585 %res = fadd <2 x double> %3, %t
586 ret <2 x double> %res
589 declare <2 x double> @llvm.x86.avx512.mask.getmant.sd(<2 x double>, <2 x double>, i32, <2 x double>, i8, i32)