[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / CodeGen / X86 / avx10_2ni-intrinsics.ll
blob31cec891c4cf3863e2562834ccc7397738606b60
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx10.2-256 --show-mc-encoding | FileCheck %s --check-prefixes=CHECK,X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx10.2-256 --show-mc-encoding | FileCheck %s --check-prefixes=CHECK,X64
5 ; VNNI FP16
7 define <4 x float> @test_mm_dpph_ps(<4 x float> %__W, <8 x half> %__A, <8 x half> %__B) {
8 ; CHECK-LABEL: test_mm_dpph_ps:
9 ; CHECK:       # %bb.0:
10 ; CHECK-NEXT:    vdpphps %xmm2, %xmm1, %xmm0 # encoding: [0x62,0xf2,0x74,0x08,0x52,0xc2]
11 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
12   %res = tail call <4 x float> @llvm.x86.avx10.vdpphps.128(<4 x float> %__W, <8 x half> %__A, <8 x half> %__B)
13   ret <4 x float> %res
16 define <4 x float> @test_mm_mask_dpph_ps(<4 x float> %__W, i8 zeroext %__U, <8 x half> %__A, <8 x half> %__B) {
17 ; X86-LABEL: test_mm_mask_dpph_ps:
18 ; X86:       # %bb.0:
19 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
20 ; X86-NEXT:    vdpphps %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x74,0x09,0x52,0xc2]
21 ; X86-NEXT:    retl # encoding: [0xc3]
23 ; X64-LABEL: test_mm_mask_dpph_ps:
24 ; X64:       # %bb.0:
25 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
26 ; X64-NEXT:    vdpphps %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x74,0x09,0x52,0xc2]
27 ; X64-NEXT:    retq # encoding: [0xc3]
28   %dph = tail call <4 x float> @llvm.x86.avx10.vdpphps.128(<4 x float> %__W, <8 x half> %__A, <8 x half> %__B)
29   %bst = bitcast i8 %__U to <8 x i1>
30   %ext = shufflevector <8 x i1> %bst, <8 x i1> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
31   %res = select <4 x i1> %ext, <4 x float> %dph, <4 x float> %__W
32   ret <4 x float> %res
35 define <4 x float> @test_mm_maskz_dpph_ps(i8 zeroext %__U, <4 x float> %__W, <8 x half> %__A, <8 x half> %__B) {
36 ; X86-LABEL: test_mm_maskz_dpph_ps:
37 ; X86:       # %bb.0:
38 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
39 ; X86-NEXT:    vdpphps %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x74,0x89,0x52,0xc2]
40 ; X86-NEXT:    retl # encoding: [0xc3]
42 ; X64-LABEL: test_mm_maskz_dpph_ps:
43 ; X64:       # %bb.0:
44 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
45 ; X64-NEXT:    vdpphps %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x74,0x89,0x52,0xc2]
46 ; X64-NEXT:    retq # encoding: [0xc3]
47   %dph = tail call <4 x float> @llvm.x86.avx10.vdpphps.128(<4 x float> %__W, <8 x half> %__A, <8 x half> %__B)
48   %bst = bitcast i8 %__U to <8 x i1>
49   %ext = shufflevector <8 x i1> %bst, <8 x i1> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
50   %res = select <4 x i1> %ext, <4 x float> %dph, <4 x float> zeroinitializer
51   ret <4 x float> %res
54 define <8 x float> @test_mm256_dpph_ps(<8 x float> %__W, <16 x half> %__A, <16 x half> %__B) {
55 ; CHECK-LABEL: test_mm256_dpph_ps:
56 ; CHECK:       # %bb.0:
57 ; CHECK-NEXT:    vdpphps %ymm2, %ymm1, %ymm0 # encoding: [0x62,0xf2,0x74,0x28,0x52,0xc2]
58 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
59   %res = tail call <8 x float> @llvm.x86.avx10.vdpphps.256(<8 x float> %__W, <16 x half> %__A, <16 x half> %__B)
60   ret <8 x float> %res
63 define <8 x float> @test_mm256_mask_dpph_ps(<8 x float> %__W, i8 zeroext %__U, <16 x half> %__A, <16 x half> %__B) {
64 ; X86-LABEL: test_mm256_mask_dpph_ps:
65 ; X86:       # %bb.0:
66 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
67 ; X86-NEXT:    vdpphps %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x74,0x29,0x52,0xc2]
68 ; X86-NEXT:    retl # encoding: [0xc3]
70 ; X64-LABEL: test_mm256_mask_dpph_ps:
71 ; X64:       # %bb.0:
72 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
73 ; X64-NEXT:    vdpphps %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x74,0x29,0x52,0xc2]
74 ; X64-NEXT:    retq # encoding: [0xc3]
75   %dph = tail call <8 x float> @llvm.x86.avx10.vdpphps.256(<8 x float> %__W, <16 x half> %__A, <16 x half> %__B)
76   %bst = bitcast i8 %__U to <8 x i1>
77   %res = select <8 x i1> %bst, <8 x float> %dph, <8 x float> %__W
78   ret <8 x float> %res
81 define <8 x float> @test_mm256_maskz_dpph_ps(i8 zeroext %__U, <8 x float> %__W, <16 x half> %__A, <16 x half> %__B) {
82 ; X86-LABEL: test_mm256_maskz_dpph_ps:
83 ; X86:       # %bb.0:
84 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
85 ; X86-NEXT:    vdpphps %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x74,0xa9,0x52,0xc2]
86 ; X86-NEXT:    retl # encoding: [0xc3]
88 ; X64-LABEL: test_mm256_maskz_dpph_ps:
89 ; X64:       # %bb.0:
90 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
91 ; X64-NEXT:    vdpphps %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x74,0xa9,0x52,0xc2]
92 ; X64-NEXT:    retq # encoding: [0xc3]
93   %dph = tail call <8 x float> @llvm.x86.avx10.vdpphps.256(<8 x float> %__W, <16 x half> %__A, <16 x half> %__B)
94   %bst = bitcast i8 %__U to <8 x i1>
95   %res = select <8 x i1> %bst, <8 x float> %dph, <8 x float> zeroinitializer
96   ret <8 x float> %res
99 declare <4 x float> @llvm.x86.avx10.vdpphps.128(<4 x float>, <8 x half>, <8 x half>)
100 declare <8 x float> @llvm.x86.avx10.vdpphps.256(<8 x float>, <16 x half>, <16 x half>)
102 ; VNNI INT8
104 define <4 x i32> @test_mm_mask_dpbssd_epi32(<4 x i32> %__W, i4 zeroext %__U, <4 x i32> %__A, <4 x i32> %__B) {
105 ; X86-LABEL: test_mm_mask_dpbssd_epi32:
106 ; X86:       # %bb.0:
107 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
108 ; X86-NEXT:    vpdpbssd %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x77,0x09,0x50,0xc2]
109 ; X86-NEXT:    retl # encoding: [0xc3]
111 ; X64-LABEL: test_mm_mask_dpbssd_epi32:
112 ; X64:       # %bb.0:
113 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
114 ; X64-NEXT:    vpdpbssd %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x77,0x09,0x50,0xc2]
115 ; X64-NEXT:    retq # encoding: [0xc3]
116   %dpi = tail call <4 x i32> @llvm.x86.avx2.vpdpbssd.128(<4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B)
117   %bst = bitcast i4 %__U to <4 x i1>
118   %res = select <4 x i1> %bst, <4 x i32> %dpi, <4 x i32> %__W
119   ret <4 x i32> %res
122 define <4 x i32> @test_mm_maskz_dpbssds_epi32(i4 zeroext %__U, <4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B) {
123 ; X86-LABEL: test_mm_maskz_dpbssds_epi32:
124 ; X86:       # %bb.0:
125 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
126 ; X86-NEXT:    vpdpbssds %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x77,0x89,0x51,0xc2]
127 ; X86-NEXT:    retl # encoding: [0xc3]
129 ; X64-LABEL: test_mm_maskz_dpbssds_epi32:
130 ; X64:       # %bb.0:
131 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
132 ; X64-NEXT:    vpdpbssds %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x77,0x89,0x51,0xc2]
133 ; X64-NEXT:    retq # encoding: [0xc3]
134   %dpi = tail call <4 x i32> @llvm.x86.avx2.vpdpbssds.128(<4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B)
135   %bst = bitcast i4 %__U to <4 x i1>
136   %res = select <4 x i1> %bst, <4 x i32> %dpi, <4 x i32> zeroinitializer
137   ret <4 x i32> %res
140 define <8 x i32> @test_mm256_maskz_dpbssds_epi32(<8 x i32> %__W, i8 zeroext %__U, <8 x i32> %__A, <8 x i32> %__B) {
141 ; X86-LABEL: test_mm256_maskz_dpbssds_epi32:
142 ; X86:       # %bb.0:
143 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
144 ; X86-NEXT:    vpdpbssds %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x77,0x29,0x51,0xc2]
145 ; X86-NEXT:    retl # encoding: [0xc3]
147 ; X64-LABEL: test_mm256_maskz_dpbssds_epi32:
148 ; X64:       # %bb.0:
149 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
150 ; X64-NEXT:    vpdpbssds %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x77,0x29,0x51,0xc2]
151 ; X64-NEXT:    retq # encoding: [0xc3]
152   %dpi = tail call <8 x i32> @llvm.x86.avx2.vpdpbssds.256(<8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B)
153   %bst = bitcast i8 %__U to <8 x i1>
154   %res = select <8 x i1> %bst, <8 x i32> %dpi, <8 x i32> %__W
155   ret <8 x i32> %res
158 define <8 x i32> @test_mm256_mask_dpbssd_epi32(i8 zeroext %__U, <8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B) {
159 ; X86-LABEL: test_mm256_mask_dpbssd_epi32:
160 ; X86:       # %bb.0:
161 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
162 ; X86-NEXT:    vpdpbssd %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x77,0xa9,0x50,0xc2]
163 ; X86-NEXT:    retl # encoding: [0xc3]
165 ; X64-LABEL: test_mm256_mask_dpbssd_epi32:
166 ; X64:       # %bb.0:
167 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
168 ; X64-NEXT:    vpdpbssd %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x77,0xa9,0x50,0xc2]
169 ; X64-NEXT:    retq # encoding: [0xc3]
170   %dpi = tail call <8 x i32> @llvm.x86.avx2.vpdpbssd.256(<8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B)
171   %bst = bitcast i8 %__U to <8 x i1>
172   %res = select <8 x i1> %bst, <8 x i32> %dpi, <8 x i32> zeroinitializer
173   ret <8 x i32> %res
176 declare <4 x i32> @llvm.x86.avx2.vpdpbssd.128(<4 x i32>, <4 x i32>, <4 x i32>)
177 declare <4 x i32> @llvm.x86.avx2.vpdpbssds.128(<4 x i32>, <4 x i32>, <4 x i32>)
178 declare <8 x i32> @llvm.x86.avx2.vpdpbssd.256(<8 x i32>, <8 x i32>, <8 x i32>)
179 declare <8 x i32> @llvm.x86.avx2.vpdpbssds.256(<8 x i32>, <8 x i32>, <8 x i32>)
181 define <4 x i32> @test_mm_mask_dpbsud_epi32(<4 x i32> %__W, i4 zeroext %__U, <4 x i32> %__A, <4 x i32> %__B) {
182 ; X86-LABEL: test_mm_mask_dpbsud_epi32:
183 ; X86:       # %bb.0:
184 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
185 ; X86-NEXT:    vpdpbsud %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x76,0x09,0x50,0xc2]
186 ; X86-NEXT:    retl # encoding: [0xc3]
188 ; X64-LABEL: test_mm_mask_dpbsud_epi32:
189 ; X64:       # %bb.0:
190 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
191 ; X64-NEXT:    vpdpbsud %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x76,0x09,0x50,0xc2]
192 ; X64-NEXT:    retq # encoding: [0xc3]
193   %dpi = tail call <4 x i32> @llvm.x86.avx2.vpdpbsud.128(<4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B)
194   %bst = bitcast i4 %__U to <4 x i1>
195   %res = select <4 x i1> %bst, <4 x i32> %dpi, <4 x i32> %__W
196   ret <4 x i32> %res
199 define <4 x i32> @test_mm_maskz_dpbsuds_epi32(i4 zeroext %__U, <4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B) {
200 ; X86-LABEL: test_mm_maskz_dpbsuds_epi32:
201 ; X86:       # %bb.0:
202 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
203 ; X86-NEXT:    vpdpbsuds %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x76,0x89,0x51,0xc2]
204 ; X86-NEXT:    retl # encoding: [0xc3]
206 ; X64-LABEL: test_mm_maskz_dpbsuds_epi32:
207 ; X64:       # %bb.0:
208 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
209 ; X64-NEXT:    vpdpbsuds %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x76,0x89,0x51,0xc2]
210 ; X64-NEXT:    retq # encoding: [0xc3]
211   %dpi = tail call <4 x i32> @llvm.x86.avx2.vpdpbsuds.128(<4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B)
212   %bst = bitcast i4 %__U to <4 x i1>
213   %res = select <4 x i1> %bst, <4 x i32> %dpi, <4 x i32> zeroinitializer
214   ret <4 x i32> %res
217 define <8 x i32> @test_mm256_maskz_dpbsuds_epi32(<8 x i32> %__W, i8 zeroext %__U, <8 x i32> %__A, <8 x i32> %__B) {
218 ; X86-LABEL: test_mm256_maskz_dpbsuds_epi32:
219 ; X86:       # %bb.0:
220 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
221 ; X86-NEXT:    vpdpbsuds %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x76,0x29,0x51,0xc2]
222 ; X86-NEXT:    retl # encoding: [0xc3]
224 ; X64-LABEL: test_mm256_maskz_dpbsuds_epi32:
225 ; X64:       # %bb.0:
226 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
227 ; X64-NEXT:    vpdpbsuds %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x76,0x29,0x51,0xc2]
228 ; X64-NEXT:    retq # encoding: [0xc3]
229   %dpi = tail call <8 x i32> @llvm.x86.avx2.vpdpbsuds.256(<8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B)
230   %bst = bitcast i8 %__U to <8 x i1>
231   %res = select <8 x i1> %bst, <8 x i32> %dpi, <8 x i32> %__W
232   ret <8 x i32> %res
235 define <8 x i32> @test_mm256_mask_dpbsud_epi32(i8 zeroext %__U, <8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B) {
236 ; X86-LABEL: test_mm256_mask_dpbsud_epi32:
237 ; X86:       # %bb.0:
238 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
239 ; X86-NEXT:    vpdpbsud %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x76,0xa9,0x50,0xc2]
240 ; X86-NEXT:    retl # encoding: [0xc3]
242 ; X64-LABEL: test_mm256_mask_dpbsud_epi32:
243 ; X64:       # %bb.0:
244 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
245 ; X64-NEXT:    vpdpbsud %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x76,0xa9,0x50,0xc2]
246 ; X64-NEXT:    retq # encoding: [0xc3]
247   %dpi = tail call <8 x i32> @llvm.x86.avx2.vpdpbsud.256(<8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B)
248   %bst = bitcast i8 %__U to <8 x i1>
249   %res = select <8 x i1> %bst, <8 x i32> %dpi, <8 x i32> zeroinitializer
250   ret <8 x i32> %res
253 declare <4 x i32> @llvm.x86.avx2.vpdpbsud.128(<4 x i32>, <4 x i32>, <4 x i32>)
254 declare <4 x i32> @llvm.x86.avx2.vpdpbsuds.128(<4 x i32>, <4 x i32>, <4 x i32>)
255 declare <8 x i32> @llvm.x86.avx2.vpdpbsud.256(<8 x i32>, <8 x i32>, <8 x i32>)
256 declare <8 x i32> @llvm.x86.avx2.vpdpbsuds.256(<8 x i32>, <8 x i32>, <8 x i32>)
258 define <4 x i32> @test_mm_mask_dpbuud_epi32(<4 x i32> %__W, i4 zeroext %__U, <4 x i32> %__A, <4 x i32> %__B) {
259 ; X86-LABEL: test_mm_mask_dpbuud_epi32:
260 ; X86:       # %bb.0:
261 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
262 ; X86-NEXT:    vpdpbuud %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x74,0x09,0x50,0xc2]
263 ; X86-NEXT:    retl # encoding: [0xc3]
265 ; X64-LABEL: test_mm_mask_dpbuud_epi32:
266 ; X64:       # %bb.0:
267 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
268 ; X64-NEXT:    vpdpbuud %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x74,0x09,0x50,0xc2]
269 ; X64-NEXT:    retq # encoding: [0xc3]
270   %dpi = tail call <4 x i32> @llvm.x86.avx2.vpdpbuud.128(<4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B)
271   %bst = bitcast i4 %__U to <4 x i1>
272   %res = select <4 x i1> %bst, <4 x i32> %dpi, <4 x i32> %__W
273   ret <4 x i32> %res
276 define <4 x i32> @test_mm_maskz_dpbuuds_epi32(i4 zeroext %__U, <4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B) {
277 ; X86-LABEL: test_mm_maskz_dpbuuds_epi32:
278 ; X86:       # %bb.0:
279 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
280 ; X86-NEXT:    vpdpbuuds %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x74,0x89,0x51,0xc2]
281 ; X86-NEXT:    retl # encoding: [0xc3]
283 ; X64-LABEL: test_mm_maskz_dpbuuds_epi32:
284 ; X64:       # %bb.0:
285 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
286 ; X64-NEXT:    vpdpbuuds %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x74,0x89,0x51,0xc2]
287 ; X64-NEXT:    retq # encoding: [0xc3]
288   %dpi = tail call <4 x i32> @llvm.x86.avx2.vpdpbuuds.128(<4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B)
289   %bst = bitcast i4 %__U to <4 x i1>
290   %res = select <4 x i1> %bst, <4 x i32> %dpi, <4 x i32> zeroinitializer
291   ret <4 x i32> %res
294 define <8 x i32> @test_mm256_maskz_dpbuuds_epi32(<8 x i32> %__W, i8 zeroext %__U, <8 x i32> %__A, <8 x i32> %__B) {
295 ; X86-LABEL: test_mm256_maskz_dpbuuds_epi32:
296 ; X86:       # %bb.0:
297 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
298 ; X86-NEXT:    vpdpbuuds %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x74,0x29,0x51,0xc2]
299 ; X86-NEXT:    retl # encoding: [0xc3]
301 ; X64-LABEL: test_mm256_maskz_dpbuuds_epi32:
302 ; X64:       # %bb.0:
303 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
304 ; X64-NEXT:    vpdpbuuds %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x74,0x29,0x51,0xc2]
305 ; X64-NEXT:    retq # encoding: [0xc3]
306   %dpi = tail call <8 x i32> @llvm.x86.avx2.vpdpbuuds.256(<8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B)
307   %bst = bitcast i8 %__U to <8 x i1>
308   %res = select <8 x i1> %bst, <8 x i32> %dpi, <8 x i32> %__W
309   ret <8 x i32> %res
312 define <8 x i32> @test_mm256_mask_dpbuud_epi32(i8 zeroext %__U, <8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B) {
313 ; X86-LABEL: test_mm256_mask_dpbuud_epi32:
314 ; X86:       # %bb.0:
315 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
316 ; X86-NEXT:    vpdpbuud %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x74,0xa9,0x50,0xc2]
317 ; X86-NEXT:    retl # encoding: [0xc3]
319 ; X64-LABEL: test_mm256_mask_dpbuud_epi32:
320 ; X64:       # %bb.0:
321 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
322 ; X64-NEXT:    vpdpbuud %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x74,0xa9,0x50,0xc2]
323 ; X64-NEXT:    retq # encoding: [0xc3]
324   %dpi = tail call <8 x i32> @llvm.x86.avx2.vpdpbuud.256(<8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B)
325   %bst = bitcast i8 %__U to <8 x i1>
326   %res = select <8 x i1> %bst, <8 x i32> %dpi, <8 x i32> zeroinitializer
327   ret <8 x i32> %res
330 declare <4 x i32> @llvm.x86.avx2.vpdpbuud.128(<4 x i32>, <4 x i32>, <4 x i32>)
331 declare <4 x i32> @llvm.x86.avx2.vpdpbuuds.128(<4 x i32>, <4 x i32>, <4 x i32>)
332 declare <8 x i32> @llvm.x86.avx2.vpdpbuud.256(<8 x i32>, <8 x i32>, <8 x i32>)
333 declare <8 x i32> @llvm.x86.avx2.vpdpbuuds.256(<8 x i32>, <8 x i32>, <8 x i32>)
335 ; VNNI INT16
337 define <4 x i32> @test_mm_mask_dpwsud_epi32(<4 x i32> %__W, i4 zeroext %__U, <4 x i32> %__A, <4 x i32> %__B) {
338 ; X86-LABEL: test_mm_mask_dpwsud_epi32:
339 ; X86:       # %bb.0:
340 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
341 ; X86-NEXT:    vpdpwsud %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x76,0x09,0xd2,0xc2]
342 ; X86-NEXT:    retl # encoding: [0xc3]
344 ; X64-LABEL: test_mm_mask_dpwsud_epi32:
345 ; X64:       # %bb.0:
346 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
347 ; X64-NEXT:    vpdpwsud %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x76,0x09,0xd2,0xc2]
348 ; X64-NEXT:    retq # encoding: [0xc3]
349   %dpi = tail call <4 x i32> @llvm.x86.avx2.vpdpwsud.128(<4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B)
350   %bst = bitcast i4 %__U to <4 x i1>
351   %res = select <4 x i1> %bst, <4 x i32> %dpi, <4 x i32> %__W
352   ret <4 x i32> %res
355 define <4 x i32> @test_mm_maskz_dpwsuds_epi32(i4 zeroext %__U, <4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B) {
356 ; X86-LABEL: test_mm_maskz_dpwsuds_epi32:
357 ; X86:       # %bb.0:
358 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
359 ; X86-NEXT:    vpdpwsuds %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x76,0x89,0xd3,0xc2]
360 ; X86-NEXT:    retl # encoding: [0xc3]
362 ; X64-LABEL: test_mm_maskz_dpwsuds_epi32:
363 ; X64:       # %bb.0:
364 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
365 ; X64-NEXT:    vpdpwsuds %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x76,0x89,0xd3,0xc2]
366 ; X64-NEXT:    retq # encoding: [0xc3]
367   %dpi = tail call <4 x i32> @llvm.x86.avx2.vpdpwsuds.128(<4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B)
368   %bst = bitcast i4 %__U to <4 x i1>
369   %res = select <4 x i1> %bst, <4 x i32> %dpi, <4 x i32> zeroinitializer
370   ret <4 x i32> %res
373 define <8 x i32> @test_mm256_maskz_dpwsuds_epi32(<8 x i32> %__W, i8 zeroext %__U, <8 x i32> %__A, <8 x i32> %__B) {
374 ; X86-LABEL: test_mm256_maskz_dpwsuds_epi32:
375 ; X86:       # %bb.0:
376 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
377 ; X86-NEXT:    vpdpwsuds %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x76,0x29,0xd3,0xc2]
378 ; X86-NEXT:    retl # encoding: [0xc3]
380 ; X64-LABEL: test_mm256_maskz_dpwsuds_epi32:
381 ; X64:       # %bb.0:
382 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
383 ; X64-NEXT:    vpdpwsuds %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x76,0x29,0xd3,0xc2]
384 ; X64-NEXT:    retq # encoding: [0xc3]
385   %dpi = tail call <8 x i32> @llvm.x86.avx2.vpdpwsuds.256(<8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B)
386   %bst = bitcast i8 %__U to <8 x i1>
387   %res = select <8 x i1> %bst, <8 x i32> %dpi, <8 x i32> %__W
388   ret <8 x i32> %res
391 define <8 x i32> @test_mm256_mask_dpwsud_epi32(i8 zeroext %__U, <8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B) {
392 ; X86-LABEL: test_mm256_mask_dpwsud_epi32:
393 ; X86:       # %bb.0:
394 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
395 ; X86-NEXT:    vpdpwsud %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x76,0xa9,0xd2,0xc2]
396 ; X86-NEXT:    retl # encoding: [0xc3]
398 ; X64-LABEL: test_mm256_mask_dpwsud_epi32:
399 ; X64:       # %bb.0:
400 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
401 ; X64-NEXT:    vpdpwsud %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x76,0xa9,0xd2,0xc2]
402 ; X64-NEXT:    retq # encoding: [0xc3]
403   %dpi = tail call <8 x i32> @llvm.x86.avx2.vpdpwsud.256(<8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B)
404   %bst = bitcast i8 %__U to <8 x i1>
405   %res = select <8 x i1> %bst, <8 x i32> %dpi, <8 x i32> zeroinitializer
406   ret <8 x i32> %res
409 declare <4 x i32> @llvm.x86.avx2.vpdpwsud.128(<4 x i32>, <4 x i32>, <4 x i32>)
410 declare <4 x i32> @llvm.x86.avx2.vpdpwsuds.128(<4 x i32>, <4 x i32>, <4 x i32>)
411 declare <8 x i32> @llvm.x86.avx2.vpdpwsud.256(<8 x i32>, <8 x i32>, <8 x i32>)
412 declare <8 x i32> @llvm.x86.avx2.vpdpwsuds.256(<8 x i32>, <8 x i32>, <8 x i32>)
414 define <4 x i32> @test_mm_mask_dpwusd_epi32(<4 x i32> %__W, i4 zeroext %__U, <4 x i32> %__A, <4 x i32> %__B) {
415 ; X86-LABEL: test_mm_mask_dpwusd_epi32:
416 ; X86:       # %bb.0:
417 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
418 ; X86-NEXT:    vpdpwusd %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x75,0x09,0xd2,0xc2]
419 ; X86-NEXT:    retl # encoding: [0xc3]
421 ; X64-LABEL: test_mm_mask_dpwusd_epi32:
422 ; X64:       # %bb.0:
423 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
424 ; X64-NEXT:    vpdpwusd %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x75,0x09,0xd2,0xc2]
425 ; X64-NEXT:    retq # encoding: [0xc3]
426   %dpi = tail call <4 x i32> @llvm.x86.avx2.vpdpwusd.128(<4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B)
427   %bst = bitcast i4 %__U to <4 x i1>
428   %res = select <4 x i1> %bst, <4 x i32> %dpi, <4 x i32> %__W
429   ret <4 x i32> %res
432 define <4 x i32> @test_mm_maskz_dpwusds_epi32(i4 zeroext %__U, <4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B) {
433 ; X86-LABEL: test_mm_maskz_dpwusds_epi32:
434 ; X86:       # %bb.0:
435 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
436 ; X86-NEXT:    vpdpwusds %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x75,0x89,0xd3,0xc2]
437 ; X86-NEXT:    retl # encoding: [0xc3]
439 ; X64-LABEL: test_mm_maskz_dpwusds_epi32:
440 ; X64:       # %bb.0:
441 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
442 ; X64-NEXT:    vpdpwusds %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x75,0x89,0xd3,0xc2]
443 ; X64-NEXT:    retq # encoding: [0xc3]
444   %dpi = tail call <4 x i32> @llvm.x86.avx2.vpdpwusds.128(<4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B)
445   %bst = bitcast i4 %__U to <4 x i1>
446   %res = select <4 x i1> %bst, <4 x i32> %dpi, <4 x i32> zeroinitializer
447   ret <4 x i32> %res
450 define <8 x i32> @test_mm256_maskz_dpwusds_epi32(<8 x i32> %__W, i8 zeroext %__U, <8 x i32> %__A, <8 x i32> %__B) {
451 ; X86-LABEL: test_mm256_maskz_dpwusds_epi32:
452 ; X86:       # %bb.0:
453 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
454 ; X86-NEXT:    vpdpwusds %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x75,0x29,0xd3,0xc2]
455 ; X86-NEXT:    retl # encoding: [0xc3]
457 ; X64-LABEL: test_mm256_maskz_dpwusds_epi32:
458 ; X64:       # %bb.0:
459 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
460 ; X64-NEXT:    vpdpwusds %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x75,0x29,0xd3,0xc2]
461 ; X64-NEXT:    retq # encoding: [0xc3]
462   %dpi = tail call <8 x i32> @llvm.x86.avx2.vpdpwusds.256(<8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B)
463   %bst = bitcast i8 %__U to <8 x i1>
464   %res = select <8 x i1> %bst, <8 x i32> %dpi, <8 x i32> %__W
465   ret <8 x i32> %res
468 define <8 x i32> @test_mm256_mask_dpwusd_epi32(i8 zeroext %__U, <8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B) {
469 ; X86-LABEL: test_mm256_mask_dpwusd_epi32:
470 ; X86:       # %bb.0:
471 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
472 ; X86-NEXT:    vpdpwusd %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x75,0xa9,0xd2,0xc2]
473 ; X86-NEXT:    retl # encoding: [0xc3]
475 ; X64-LABEL: test_mm256_mask_dpwusd_epi32:
476 ; X64:       # %bb.0:
477 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
478 ; X64-NEXT:    vpdpwusd %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x75,0xa9,0xd2,0xc2]
479 ; X64-NEXT:    retq # encoding: [0xc3]
480   %dpi = tail call <8 x i32> @llvm.x86.avx2.vpdpwusd.256(<8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B)
481   %bst = bitcast i8 %__U to <8 x i1>
482   %res = select <8 x i1> %bst, <8 x i32> %dpi, <8 x i32> zeroinitializer
483   ret <8 x i32> %res
486 declare <4 x i32> @llvm.x86.avx2.vpdpwusd.128(<4 x i32>, <4 x i32>, <4 x i32>)
487 declare <4 x i32> @llvm.x86.avx2.vpdpwusds.128(<4 x i32>, <4 x i32>, <4 x i32>)
488 declare <8 x i32> @llvm.x86.avx2.vpdpwusd.256(<8 x i32>, <8 x i32>, <8 x i32>)
489 declare <8 x i32> @llvm.x86.avx2.vpdpwusds.256(<8 x i32>, <8 x i32>, <8 x i32>)
491 define <4 x i32> @test_mm_mask_dpwuud_epi32(<4 x i32> %__W, i4 zeroext %__U, <4 x i32> %__A, <4 x i32> %__B) {
492 ; X86-LABEL: test_mm_mask_dpwuud_epi32:
493 ; X86:       # %bb.0:
494 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
495 ; X86-NEXT:    vpdpwuud %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x74,0x09,0xd2,0xc2]
496 ; X86-NEXT:    retl # encoding: [0xc3]
498 ; X64-LABEL: test_mm_mask_dpwuud_epi32:
499 ; X64:       # %bb.0:
500 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
501 ; X64-NEXT:    vpdpwuud %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x74,0x09,0xd2,0xc2]
502 ; X64-NEXT:    retq # encoding: [0xc3]
503   %dpi = tail call <4 x i32> @llvm.x86.avx2.vpdpwuud.128(<4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B)
504   %bst = bitcast i4 %__U to <4 x i1>
505   %res = select <4 x i1> %bst, <4 x i32> %dpi, <4 x i32> %__W
506   ret <4 x i32> %res
509 define <4 x i32> @test_mm_maskz_dpwuuds_epi32(i4 zeroext %__U, <4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B) {
510 ; X86-LABEL: test_mm_maskz_dpwuuds_epi32:
511 ; X86:       # %bb.0:
512 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
513 ; X86-NEXT:    vpdpwuuds %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x74,0x89,0xd3,0xc2]
514 ; X86-NEXT:    retl # encoding: [0xc3]
516 ; X64-LABEL: test_mm_maskz_dpwuuds_epi32:
517 ; X64:       # %bb.0:
518 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
519 ; X64-NEXT:    vpdpwuuds %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0x74,0x89,0xd3,0xc2]
520 ; X64-NEXT:    retq # encoding: [0xc3]
521   %dpi = tail call <4 x i32> @llvm.x86.avx2.vpdpwuuds.128(<4 x i32> %__W, <4 x i32> %__A, <4 x i32> %__B)
522   %bst = bitcast i4 %__U to <4 x i1>
523   %res = select <4 x i1> %bst, <4 x i32> %dpi, <4 x i32> zeroinitializer
524   ret <4 x i32> %res
527 define <8 x i32> @test_mm256_maskz_dpwuuds_epi32(<8 x i32> %__W, i8 zeroext %__U, <8 x i32> %__A, <8 x i32> %__B) {
528 ; X86-LABEL: test_mm256_maskz_dpwuuds_epi32:
529 ; X86:       # %bb.0:
530 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
531 ; X86-NEXT:    vpdpwuuds %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x74,0x29,0xd3,0xc2]
532 ; X86-NEXT:    retl # encoding: [0xc3]
534 ; X64-LABEL: test_mm256_maskz_dpwuuds_epi32:
535 ; X64:       # %bb.0:
536 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
537 ; X64-NEXT:    vpdpwuuds %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x74,0x29,0xd3,0xc2]
538 ; X64-NEXT:    retq # encoding: [0xc3]
539   %dpi = tail call <8 x i32> @llvm.x86.avx2.vpdpwuuds.256(<8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B)
540   %bst = bitcast i8 %__U to <8 x i1>
541   %res = select <8 x i1> %bst, <8 x i32> %dpi, <8 x i32> %__W
542   ret <8 x i32> %res
545 define <8 x i32> @test_mm256_mask_dpwuud_epi32(i8 zeroext %__U, <8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B) {
546 ; X86-LABEL: test_mm256_mask_dpwuud_epi32:
547 ; X86:       # %bb.0:
548 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
549 ; X86-NEXT:    vpdpwuud %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x74,0xa9,0xd2,0xc2]
550 ; X86-NEXT:    retl # encoding: [0xc3]
552 ; X64-LABEL: test_mm256_mask_dpwuud_epi32:
553 ; X64:       # %bb.0:
554 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
555 ; X64-NEXT:    vpdpwuud %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x74,0xa9,0xd2,0xc2]
556 ; X64-NEXT:    retq # encoding: [0xc3]
557   %dpi = tail call <8 x i32> @llvm.x86.avx2.vpdpwuud.256(<8 x i32> %__W, <8 x i32> %__A, <8 x i32> %__B)
558   %bst = bitcast i8 %__U to <8 x i1>
559   %res = select <8 x i1> %bst, <8 x i32> %dpi, <8 x i32> zeroinitializer
560   ret <8 x i32> %res
563 declare <4 x i32> @llvm.x86.avx2.vpdpwuud.128(<4 x i32>, <4 x i32>, <4 x i32>)
564 declare <4 x i32> @llvm.x86.avx2.vpdpwuuds.128(<4 x i32>, <4 x i32>, <4 x i32>)
565 declare <8 x i32> @llvm.x86.avx2.vpdpwuud.256(<8 x i32>, <8 x i32>, <8 x i32>)
566 declare <8 x i32> @llvm.x86.avx2.vpdpwuuds.256(<8 x i32>, <8 x i32>, <8 x i32>)
568 ; VMPSADBW
570 define { <8 x i16>, <8 x i16>, <8 x i16> } @test_mask_mpsadbw_128(<16 x i8> %x0, <16 x i8> %x1, <8 x i16> %x3, i8 %x4) {
571 ; X86-LABEL: test_mask_mpsadbw_128:
572 ; X86:       # %bb.0:
573 ; X86-NEXT:    vmovdqa %xmm2, %xmm4 # EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xe2]
574 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
575 ; X86-NEXT:    vmpsadbw $2, %xmm1, %xmm0, %xmm3 # EVEX TO VEX Compression encoding: [0xc4,0xe3,0x79,0x42,0xd9,0x02]
576 ; X86-NEXT:    vmpsadbw $3, %xmm1, %xmm0, %xmm4 {%k1} # encoding: [0x62,0xf3,0x7e,0x09,0x42,0xe1,0x03]
577 ; X86-NEXT:    vmpsadbw $4, %xmm1, %xmm0, %xmm2 {%k1} {z} # encoding: [0x62,0xf3,0x7e,0x89,0x42,0xd1,0x04]
578 ; X86-NEXT:    vmovdqa %xmm3, %xmm0 # EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc3]
579 ; X86-NEXT:    vmovdqa %xmm4, %xmm1 # EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xcc]
580 ; X86-NEXT:    retl # encoding: [0xc3]
582 ; X64-LABEL: test_mask_mpsadbw_128:
583 ; X64:       # %bb.0:
584 ; X64-NEXT:    vmovdqa %xmm2, %xmm4 # EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xe2]
585 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
586 ; X64-NEXT:    vmpsadbw $2, %xmm1, %xmm0, %xmm3 # EVEX TO VEX Compression encoding: [0xc4,0xe3,0x79,0x42,0xd9,0x02]
587 ; X64-NEXT:    vmpsadbw $3, %xmm1, %xmm0, %xmm4 {%k1} # encoding: [0x62,0xf3,0x7e,0x09,0x42,0xe1,0x03]
588 ; X64-NEXT:    vmpsadbw $4, %xmm1, %xmm0, %xmm2 {%k1} {z} # encoding: [0x62,0xf3,0x7e,0x89,0x42,0xd1,0x04]
589 ; X64-NEXT:    vmovdqa %xmm3, %xmm0 # EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc3]
590 ; X64-NEXT:    vmovdqa %xmm4, %xmm1 # EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xcc]
591 ; X64-NEXT:    retq # encoding: [0xc3]
592   %msk = bitcast i8 %x4 to <8 x i1>
593   %rs1 = call <8 x i16> @llvm.x86.sse41.mpsadbw(<16 x i8> %x0, <16 x i8> %x1, i8 2)
594   %ad2 = call <8 x i16> @llvm.x86.sse41.mpsadbw(<16 x i8> %x0, <16 x i8> %x1, i8 3)
595   %rs2 = select <8 x i1> %msk, <8 x i16> %ad2, <8 x i16> %x3
596   %ad3 = call <8 x i16> @llvm.x86.sse41.mpsadbw(<16 x i8> %x0, <16 x i8> %x1, i8 4)
597   %rs3 = select <8 x i1> %msk, <8 x i16> %ad3, <8 x i16> zeroinitializer
598   %rs4 = insertvalue { <8 x i16>, <8 x i16>, <8 x i16> } undef, <8 x i16> %rs1, 0
599   %rs5 = insertvalue { <8 x i16>, <8 x i16>, <8 x i16> } %rs4, <8 x i16> %rs2, 1
600   %rs6 = insertvalue { <8 x i16>, <8 x i16>, <8 x i16> } %rs5, <8 x i16> %rs3, 2
601   ret { <8 x i16>, <8 x i16>, <8 x i16> } %rs6
604 define { <16 x i16>, <16 x i16>, <16 x i16> } @test_mask_mpsadbw_256(<32 x i8> %x0, <32 x i8> %x1, <16 x i16> %x3, i16 %x4) {
605 ; X86-LABEL: test_mask_mpsadbw_256:
606 ; X86:       # %bb.0:
607 ; X86-NEXT:    vmovdqa %ymm2, %ymm4 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xe2]
608 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
609 ; X86-NEXT:    vmpsadbw $2, %ymm1, %ymm0, %ymm3 # EVEX TO VEX Compression encoding: [0xc4,0xe3,0x7d,0x42,0xd9,0x02]
610 ; X86-NEXT:    vmpsadbw $3, %ymm1, %ymm0, %ymm4 {%k1} # encoding: [0x62,0xf3,0x7e,0x29,0x42,0xe1,0x03]
611 ; X86-NEXT:    vmpsadbw $4, %ymm1, %ymm0, %ymm2 {%k1} {z} # encoding: [0x62,0xf3,0x7e,0xa9,0x42,0xd1,0x04]
612 ; X86-NEXT:    vmovdqa %ymm3, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc3]
613 ; X86-NEXT:    vmovdqa %ymm4, %ymm1 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xcc]
614 ; X86-NEXT:    retl # encoding: [0xc3]
616 ; X64-LABEL: test_mask_mpsadbw_256:
617 ; X64:       # %bb.0:
618 ; X64-NEXT:    vmovdqa %ymm2, %ymm4 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xe2]
619 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
620 ; X64-NEXT:    vmpsadbw $2, %ymm1, %ymm0, %ymm3 # EVEX TO VEX Compression encoding: [0xc4,0xe3,0x7d,0x42,0xd9,0x02]
621 ; X64-NEXT:    vmpsadbw $3, %ymm1, %ymm0, %ymm4 {%k1} # encoding: [0x62,0xf3,0x7e,0x29,0x42,0xe1,0x03]
622 ; X64-NEXT:    vmpsadbw $4, %ymm1, %ymm0, %ymm2 {%k1} {z} # encoding: [0x62,0xf3,0x7e,0xa9,0x42,0xd1,0x04]
623 ; X64-NEXT:    vmovdqa %ymm3, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc3]
624 ; X64-NEXT:    vmovdqa %ymm4, %ymm1 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xcc]
625 ; X64-NEXT:    retq # encoding: [0xc3]
626   %msk = bitcast i16 %x4 to <16 x i1>
627   %rs1 = call <16 x i16> @llvm.x86.avx2.mpsadbw(<32 x i8> %x0, <32 x i8> %x1, i8 2)
628   %ad2 = call <16 x i16> @llvm.x86.avx2.mpsadbw(<32 x i8> %x0, <32 x i8> %x1, i8 3)
629   %rs2 = select <16 x i1> %msk, <16 x i16> %ad2, <16 x i16> %x3
630   %ad3 = call <16 x i16> @llvm.x86.avx2.mpsadbw(<32 x i8> %x0, <32 x i8> %x1, i8 4)
631   %rs3 = select <16 x i1> %msk, <16 x i16> %ad3, <16 x i16> zeroinitializer
632   %rs4 = insertvalue { <16 x i16>, <16 x i16>, <16 x i16> } undef, <16 x i16> %rs1, 0
633   %rs5 = insertvalue { <16 x i16>, <16 x i16>, <16 x i16> } %rs4, <16 x i16> %rs2, 1
634   %rs6 = insertvalue { <16 x i16>, <16 x i16>, <16 x i16> } %rs5, <16 x i16> %rs3, 2
635   ret { <16 x i16>, <16 x i16>, <16 x i16> } %rs6
638 declare <8 x i16> @llvm.x86.sse41.mpsadbw(<16 x i8>, <16 x i8>, i8)
639 declare <16 x i16> @llvm.x86.avx2.mpsadbw(<32 x i8>, <32 x i8>, i8)
641 ; YMM Rounding
643 declare <4 x double> @llvm.x86.avx10.vaddpd256(<4 x double>, <4 x double>, i32)
644 define <4 x double> @test_int_x86_vaddpd256(<4 x double> %A, <4 x double> %B) nounwind {
645 ; CHECK-LABEL: test_int_x86_vaddpd256:
646 ; CHECK:       # %bb.0:
647 ; CHECK-NEXT:    vaddpd {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xf9,0x78,0x58,0xc1]
648 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
649   %ret = call <4 x double> @llvm.x86.avx10.vaddpd256(<4 x double> %A, <4 x double> %B, i32 11)
650   ret <4 x double> %ret
653 define <4 x double> @test_int_x86_mask_vaddpd256(<4 x double> %A, i4 %B, <4 x double> %C, <4 x double> %D) nounwind {
654 ; X86-LABEL: test_int_x86_mask_vaddpd256:
655 ; X86:       # %bb.0:
656 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
657 ; X86-NEXT:    vaddpd {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf1,0x59,0x58,0xc2]
658 ; X86-NEXT:    retl # encoding: [0xc3]
660 ; X64-LABEL: test_int_x86_mask_vaddpd256:
661 ; X64:       # %bb.0:
662 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
663 ; X64-NEXT:    vaddpd {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf1,0x59,0x58,0xc2]
664 ; X64-NEXT:    retq # encoding: [0xc3]
665   %ret0 = call <4 x double> @llvm.x86.avx10.vaddpd256(<4 x double> %C, <4 x double> %D, i32 10)
666   %msk = bitcast i4 %B to <4 x i1>
667   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> %A
668   ret <4 x double> %ret
671 define <4 x double> @test_int_x86_maskz_vaddpd256(i4 %A, <4 x double> %B, <4 x double> %C) nounwind {
672 ; X86-LABEL: test_int_x86_maskz_vaddpd256:
673 ; X86:       # %bb.0:
674 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
675 ; X86-NEXT:    vaddpd {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x58,0xc1]
676 ; X86-NEXT:    retl # encoding: [0xc3]
678 ; X64-LABEL: test_int_x86_maskz_vaddpd256:
679 ; X64:       # %bb.0:
680 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
681 ; X64-NEXT:    vaddpd {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x58,0xc1]
682 ; X64-NEXT:    retq # encoding: [0xc3]
683   %ret0 = call <4 x double> @llvm.x86.avx10.vaddpd256(<4 x double> %B, <4 x double> %C, i32 9)
684   %msk = bitcast i4 %A to <4 x i1>
685   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> zeroinitializer
686   ret <4 x double> %ret
689 declare <16 x half> @llvm.x86.avx10.vaddph256(<16 x half>, <16 x half>, i32)
690 define <16 x half> @test_int_x86_vaddph256(<16 x half> %A, <16 x half> %B) nounwind {
691 ; CHECK-LABEL: test_int_x86_vaddph256:
692 ; CHECK:       # %bb.0:
693 ; CHECK-NEXT:    vaddph {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x78,0x78,0x58,0xc1]
694 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
695   %ret = call <16 x half> @llvm.x86.avx10.vaddph256(<16 x half> %A, <16 x half> %B, i32 11)
696   ret <16 x half> %ret
699 define <16 x half> @test_int_x86_mask_vaddph256(<16 x half> %A, i16 %B, <16 x half> %C, <16 x half> %D) nounwind {
700 ; X86-LABEL: test_int_x86_mask_vaddph256:
701 ; X86:       # %bb.0:
702 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
703 ; X86-NEXT:    vaddph {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x70,0x59,0x58,0xc2]
704 ; X86-NEXT:    retl # encoding: [0xc3]
706 ; X64-LABEL: test_int_x86_mask_vaddph256:
707 ; X64:       # %bb.0:
708 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
709 ; X64-NEXT:    vaddph {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x70,0x59,0x58,0xc2]
710 ; X64-NEXT:    retq # encoding: [0xc3]
711   %ret0 = call <16 x half> @llvm.x86.avx10.vaddph256(<16 x half> %C, <16 x half> %D, i32 10)
712   %msk = bitcast i16 %B to <16 x i1>
713   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> %A
714   ret <16 x half> %ret
717 define <16 x half> @test_int_x86_maskz_vaddph256(i16 %A, <16 x half> %B, <16 x half> %C) nounwind {
718 ; X86-LABEL: test_int_x86_maskz_vaddph256:
719 ; X86:       # %bb.0:
720 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
721 ; X86-NEXT:    vaddph {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x58,0xc1]
722 ; X86-NEXT:    retl # encoding: [0xc3]
724 ; X64-LABEL: test_int_x86_maskz_vaddph256:
725 ; X64:       # %bb.0:
726 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
727 ; X64-NEXT:    vaddph {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x58,0xc1]
728 ; X64-NEXT:    retq # encoding: [0xc3]
729   %ret0 = call <16 x half> @llvm.x86.avx10.vaddph256(<16 x half> %B, <16 x half> %C, i32 9)
730   %msk = bitcast i16 %A to <16 x i1>
731   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> zeroinitializer
732   ret <16 x half> %ret
735 declare <8 x float> @llvm.x86.avx10.vaddps256(<8 x float>, <8 x float>, i32)
736 define <8 x float> @test_int_x86_vaddps256(<8 x float> %A, <8 x float> %B) nounwind {
737 ; CHECK-LABEL: test_int_x86_vaddps256:
738 ; CHECK:       # %bb.0:
739 ; CHECK-NEXT:    vaddps {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x78,0x78,0x58,0xc1]
740 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
741   %ret = call <8 x float> @llvm.x86.avx10.vaddps256(<8 x float> %A, <8 x float> %B, i32 11)
742   ret <8 x float> %ret
745 define <8 x float> @test_int_x86_mask_vaddps256(<8 x float> %A, i8 %B, <8 x float> %C, <8 x float> %D) nounwind {
746 ; X86-LABEL: test_int_x86_mask_vaddps256:
747 ; X86:       # %bb.0:
748 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
749 ; X86-NEXT:    vaddps {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x70,0x59,0x58,0xc2]
750 ; X86-NEXT:    retl # encoding: [0xc3]
752 ; X64-LABEL: test_int_x86_mask_vaddps256:
753 ; X64:       # %bb.0:
754 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
755 ; X64-NEXT:    vaddps {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x70,0x59,0x58,0xc2]
756 ; X64-NEXT:    retq # encoding: [0xc3]
757   %ret0 = call <8 x float> @llvm.x86.avx10.vaddps256(<8 x float> %C, <8 x float> %D, i32 10)
758   %msk = bitcast i8 %B to <8 x i1>
759   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> %A
760   ret <8 x float> %ret
763 define <8 x float> @test_int_x86_maskz_vaddps256(i8 %A, <8 x float> %B, <8 x float> %C) nounwind {
764 ; X86-LABEL: test_int_x86_maskz_vaddps256:
765 ; X86:       # %bb.0:
766 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
767 ; X86-NEXT:    vaddps {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x58,0xc1]
768 ; X86-NEXT:    retl # encoding: [0xc3]
770 ; X64-LABEL: test_int_x86_maskz_vaddps256:
771 ; X64:       # %bb.0:
772 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
773 ; X64-NEXT:    vaddps {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x58,0xc1]
774 ; X64-NEXT:    retq # encoding: [0xc3]
775   %ret0 = call <8 x float> @llvm.x86.avx10.vaddps256(<8 x float> %B, <8 x float> %C, i32 9)
776   %msk = bitcast i8 %A to <8 x i1>
777   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> zeroinitializer
778   ret <8 x float> %ret
781 declare <4 x i1> @llvm.x86.avx10.mask.vcmppd256(<4 x double>, <4 x double>, i32, <4 x i1>, i32)
782 define i4 @test_int_x86_vcmppd256(<4 x double> %A, <4 x double> %B, i4 %C) nounwind {
783 ; CHECK-LABEL: test_int_x86_vcmppd256:
784 ; CHECK:       # %bb.0:
785 ; CHECK-NEXT:    vcmppd $0, {sae}, %ymm1, %ymm0, %k0 # encoding: [0x62,0xf1,0xf9,0x18,0xc2,0xc1,0x00]
786 ; CHECK-NEXT:    kmovd %k0, %eax # encoding: [0xc5,0xfb,0x93,0xc0]
787 ; CHECK-NEXT:    # kill: def $al killed $al killed $eax
788 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
789 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
790   %ret0 = call <4 x i1> @llvm.x86.avx10.mask.vcmppd256(<4 x double> %A, <4 x double> %B, i32 0, <4 x i1> <i1 1, i1 1, i1 1, i1 1>, i32 8)
791   %ret = bitcast <4 x i1> %ret0 to i4
792   ret i4 %ret
795 define i4 @test_int_x86_mask_vcmppd256(<4 x double> %A, <4 x double> %B, i4 %C) nounwind {
796 ; X86-LABEL: test_int_x86_mask_vcmppd256:
797 ; X86:       # %bb.0:
798 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
799 ; X86-NEXT:    vcmpeqpd %ymm1, %ymm0, %k0 {%k1} # encoding: [0x62,0xf1,0xfd,0x29,0xc2,0xc1,0x00]
800 ; X86-NEXT:    kmovd %k0, %eax # encoding: [0xc5,0xfb,0x93,0xc0]
801 ; X86-NEXT:    # kill: def $al killed $al killed $eax
802 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
803 ; X86-NEXT:    retl # encoding: [0xc3]
805 ; X64-LABEL: test_int_x86_mask_vcmppd256:
806 ; X64:       # %bb.0:
807 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
808 ; X64-NEXT:    vcmpeqpd %ymm1, %ymm0, %k0 {%k1} # encoding: [0x62,0xf1,0xfd,0x29,0xc2,0xc1,0x00]
809 ; X64-NEXT:    kmovd %k0, %eax # encoding: [0xc5,0xfb,0x93,0xc0]
810 ; X64-NEXT:    # kill: def $al killed $al killed $eax
811 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
812 ; X64-NEXT:    retq # encoding: [0xc3]
813   %msk = bitcast i4 %C to <4 x i1>
814   %ret0 = call <4 x i1> @llvm.x86.avx10.mask.vcmppd256(<4 x double> %A, <4 x double> %B, i32 0, <4 x i1> %msk, i32 4)
815   %ret = bitcast <4 x i1> %ret0 to i4
816   ret i4 %ret
819 declare <16 x i1> @llvm.x86.avx10.mask.vcmpph256(<16 x half>, <16 x half>, i32, <16 x i1>, i32)
820 define i16 @test_int_x86_vcmpph256(<16 x half> %A, <16 x half> %B, i16 %C) nounwind {
821 ; CHECK-LABEL: test_int_x86_vcmpph256:
822 ; CHECK:       # %bb.0:
823 ; CHECK-NEXT:    vcmpph $0, {sae}, %ymm1, %ymm0, %k0 # encoding: [0x62,0xf3,0x78,0x18,0xc2,0xc1,0x00]
824 ; CHECK-NEXT:    kmovd %k0, %eax # encoding: [0xc5,0xfb,0x93,0xc0]
825 ; CHECK-NEXT:    # kill: def $ax killed $ax killed $eax
826 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
827 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
828   %ret0 = call <16 x i1> @llvm.x86.avx10.mask.vcmpph256(<16 x half> %A, <16 x half> %B, i32 0, <16 x i1> <i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1>, i32 8)
829   %ret = bitcast <16 x i1> %ret0 to i16
830   ret i16 %ret
833 define i16 @test_int_x86_mask_vcmpph256(<16 x half> %A, <16 x half> %B, i16 %C) nounwind {
834 ; X86-LABEL: test_int_x86_mask_vcmpph256:
835 ; X86:       # %bb.0:
836 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
837 ; X86-NEXT:    vcmpeqph %ymm1, %ymm0, %k0 {%k1} # encoding: [0x62,0xf3,0x7c,0x29,0xc2,0xc1,0x00]
838 ; X86-NEXT:    kmovd %k0, %eax # encoding: [0xc5,0xfb,0x93,0xc0]
839 ; X86-NEXT:    # kill: def $ax killed $ax killed $eax
840 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
841 ; X86-NEXT:    retl # encoding: [0xc3]
843 ; X64-LABEL: test_int_x86_mask_vcmpph256:
844 ; X64:       # %bb.0:
845 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
846 ; X64-NEXT:    vcmpeqph %ymm1, %ymm0, %k0 {%k1} # encoding: [0x62,0xf3,0x7c,0x29,0xc2,0xc1,0x00]
847 ; X64-NEXT:    kmovd %k0, %eax # encoding: [0xc5,0xfb,0x93,0xc0]
848 ; X64-NEXT:    # kill: def $ax killed $ax killed $eax
849 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
850 ; X64-NEXT:    retq # encoding: [0xc3]
851   %msk = bitcast i16 %C to <16 x i1>
852   %ret0 = call <16 x i1> @llvm.x86.avx10.mask.vcmpph256(<16 x half> %A, <16 x half> %B, i32 0, <16 x i1> %msk, i32 4)
853   %ret = bitcast <16 x i1> %ret0 to i16
854   ret i16 %ret
857 declare <8 x i1> @llvm.x86.avx10.mask.vcmpps256(<8 x float>, <8 x float>, i32, <8 x i1>, i32)
858 define i8 @test_int_x86_vcmpps256(<8 x float> %A, <8 x float> %B, i8 %C) nounwind {
859 ; CHECK-LABEL: test_int_x86_vcmpps256:
860 ; CHECK:       # %bb.0:
861 ; CHECK-NEXT:    vcmpps $0, {sae}, %ymm1, %ymm0, %k0 # encoding: [0x62,0xf1,0x78,0x18,0xc2,0xc1,0x00]
862 ; CHECK-NEXT:    kmovd %k0, %eax # encoding: [0xc5,0xfb,0x93,0xc0]
863 ; CHECK-NEXT:    # kill: def $al killed $al killed $eax
864 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
865 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
866   %ret0 = call <8 x i1> @llvm.x86.avx10.mask.vcmpps256(<8 x float> %A, <8 x float> %B, i32 0, <8 x i1> <i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1>, i32 8)
867   %ret = bitcast <8 x i1> %ret0 to i8
868   ret i8 %ret
871 define i8 @test_int_x86_mask_vcmpps256(<8 x float> %A, <8 x float> %B, i8 %C) nounwind {
872 ; X86-LABEL: test_int_x86_mask_vcmpps256:
873 ; X86:       # %bb.0:
874 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
875 ; X86-NEXT:    vcmpeqps %ymm1, %ymm0, %k0 {%k1} # encoding: [0x62,0xf1,0x7c,0x29,0xc2,0xc1,0x00]
876 ; X86-NEXT:    kmovd %k0, %eax # encoding: [0xc5,0xfb,0x93,0xc0]
877 ; X86-NEXT:    # kill: def $al killed $al killed $eax
878 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
879 ; X86-NEXT:    retl # encoding: [0xc3]
881 ; X64-LABEL: test_int_x86_mask_vcmpps256:
882 ; X64:       # %bb.0:
883 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
884 ; X64-NEXT:    vcmpeqps %ymm1, %ymm0, %k0 {%k1} # encoding: [0x62,0xf1,0x7c,0x29,0xc2,0xc1,0x00]
885 ; X64-NEXT:    kmovd %k0, %eax # encoding: [0xc5,0xfb,0x93,0xc0]
886 ; X64-NEXT:    # kill: def $al killed $al killed $eax
887 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
888 ; X64-NEXT:    retq # encoding: [0xc3]
889   %msk = bitcast i8 %C to <8 x i1>
890   %ret0 = call <8 x i1> @llvm.x86.avx10.mask.vcmpps256(<8 x float> %A, <8 x float> %B, i32 0, <8 x i1> %msk, i32 4)
891   %ret = bitcast <8 x i1> %ret0 to i8
892   ret i8 %ret
895 declare <8 x half> @llvm.x86.avx512.sitofp.round.v8f16.v8i32(<8 x i32>, i32)
896 define <8 x half> @test_int_x86_vcvtdq2ph256(<8 x i32> %A) nounwind {
897 ; CHECK-LABEL: test_int_x86_vcvtdq2ph256:
898 ; CHECK:       # %bb.0:
899 ; CHECK-NEXT:    vcvtdq2ph {rz-sae}, %ymm0, %xmm0 # encoding: [0x62,0xf5,0x78,0x78,0x5b,0xc0]
900 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
901 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
902   %ret = call <8 x half> @llvm.x86.avx512.sitofp.round.v8f16.v8i32(<8 x i32> %A, i32 11)
903   ret <8 x half> %ret
906 define <8 x half> @test_int_x86_mask_vcvtdq2ph256(<8 x half> %A, i8 %B, <8 x i32> %C) nounwind {
907 ; X86-LABEL: test_int_x86_mask_vcvtdq2ph256:
908 ; X86:       # %bb.0:
909 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
910 ; X86-NEXT:    vcvtdq2ph {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf5,0x78,0x59,0x5b,0xc1]
911 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
912 ; X86-NEXT:    retl # encoding: [0xc3]
914 ; X64-LABEL: test_int_x86_mask_vcvtdq2ph256:
915 ; X64:       # %bb.0:
916 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
917 ; X64-NEXT:    vcvtdq2ph {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf5,0x78,0x59,0x5b,0xc1]
918 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
919 ; X64-NEXT:    retq # encoding: [0xc3]
920   %ret0 = call <8 x half> @llvm.x86.avx512.sitofp.round.v8f16.v8i32(<8 x i32> %C, i32 10)
921   %msk = bitcast i8 %B to <8 x i1>
922   %ret = select <8 x i1> %msk, <8 x half> %ret0, <8 x half> %A
923   ret <8 x half> %ret
926 define <8 x half> @test_int_x86_maskz_vcvtdq2ph256(i8 %A, <8 x i32> %B) nounwind {
927 ; X86-LABEL: test_int_x86_maskz_vcvtdq2ph256:
928 ; X86:       # %bb.0:
929 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
930 ; X86-NEXT:    vcvtdq2ph {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x5b,0xc0]
931 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
932 ; X86-NEXT:    retl # encoding: [0xc3]
934 ; X64-LABEL: test_int_x86_maskz_vcvtdq2ph256:
935 ; X64:       # %bb.0:
936 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
937 ; X64-NEXT:    vcvtdq2ph {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x5b,0xc0]
938 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
939 ; X64-NEXT:    retq # encoding: [0xc3]
940   %ret0 = call <8 x half> @llvm.x86.avx512.sitofp.round.v8f16.v8i32(<8 x i32> %B, i32 9)
941   %msk = bitcast i8 %A to <8 x i1>
942   %ret = select <8 x i1> %msk, <8 x half> %ret0, <8 x half> zeroinitializer
943   ret <8 x half> %ret
946 declare <8 x float> @llvm.x86.avx512.sitofp.round.v8f32.v8i32(<8 x i32>, i32)
947 define <8 x float> @test_int_x86_vcvtdq2ps256(<8 x i32> %A) nounwind {
948 ; CHECK-LABEL: test_int_x86_vcvtdq2ps256:
949 ; CHECK:       # %bb.0:
950 ; CHECK-NEXT:    vcvtdq2ps {rz-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x78,0x78,0x5b,0xc0]
951 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
952   %ret = call <8 x float> @llvm.x86.avx512.sitofp.round.v8f32.v8i32(<8 x i32> %A, i32 11)
953   ret <8 x float> %ret
956 define <8 x float> @test_int_x86_mask_vcvtdq2ps256(<8 x float> %A, i8 %B, <8 x i32> %C) nounwind {
957 ; X86-LABEL: test_int_x86_mask_vcvtdq2ps256:
958 ; X86:       # %bb.0:
959 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
960 ; X86-NEXT:    vcvtdq2ps {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x78,0x59,0x5b,0xc1]
961 ; X86-NEXT:    retl # encoding: [0xc3]
963 ; X64-LABEL: test_int_x86_mask_vcvtdq2ps256:
964 ; X64:       # %bb.0:
965 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
966 ; X64-NEXT:    vcvtdq2ps {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x78,0x59,0x5b,0xc1]
967 ; X64-NEXT:    retq # encoding: [0xc3]
968   %ret0 = call <8 x float> @llvm.x86.avx512.sitofp.round.v8f32.v8i32(<8 x i32> %C, i32 10)
969   %msk = bitcast i8 %B to <8 x i1>
970   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> %A
971   ret <8 x float> %ret
974 define <8 x float> @test_int_x86_maskz_vcvtdq2ps256(i8 %A, <8 x i32> %B) nounwind {
975 ; X86-LABEL: test_int_x86_maskz_vcvtdq2ps256:
976 ; X86:       # %bb.0:
977 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
978 ; X86-NEXT:    vcvtdq2ps {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x5b,0xc0]
979 ; X86-NEXT:    retl # encoding: [0xc3]
981 ; X64-LABEL: test_int_x86_maskz_vcvtdq2ps256:
982 ; X64:       # %bb.0:
983 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
984 ; X64-NEXT:    vcvtdq2ps {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x5b,0xc0]
985 ; X64-NEXT:    retq # encoding: [0xc3]
986   %ret0 = call <8 x float> @llvm.x86.avx512.sitofp.round.v8f32.v8i32(<8 x i32> %B, i32 9)
987   %msk = bitcast i8 %A to <8 x i1>
988   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> zeroinitializer
989   ret <8 x float> %ret
992 declare <4 x i32> @llvm.x86.avx10.mask.vcvtpd2dq256(<4 x double>, <4 x i32>, i8, i32)
993 define <4 x i32> @test_int_x86_vcvtpd2dq256(<4 x double> %A) nounwind {
994 ; CHECK-LABEL: test_int_x86_vcvtpd2dq256:
995 ; CHECK:       # %bb.0:
996 ; CHECK-NEXT:    vcvtpd2dq {rz-sae}, %ymm0, %xmm0 # encoding: [0x62,0xf1,0xfb,0x78,0xe6,0xc0]
997 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
998 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
999   %ret = call <4 x i32> @llvm.x86.avx10.mask.vcvtpd2dq256(<4 x double> %A, <4 x i32> undef, i8 -1, i32 11)
1000   ret <4 x i32> %ret
1003 define <4 x i32> @test_int_x86_mask_vcvtpd2dq256(<4 x i32> %A, i8 %B, <4 x double> %C) nounwind {
1004 ; X86-LABEL: test_int_x86_mask_vcvtpd2dq256:
1005 ; X86:       # %bb.0:
1006 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1007 ; X86-NEXT:    vcvtpd2dq {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xfb,0x59,0xe6,0xc1]
1008 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1009 ; X86-NEXT:    retl # encoding: [0xc3]
1011 ; X64-LABEL: test_int_x86_mask_vcvtpd2dq256:
1012 ; X64:       # %bb.0:
1013 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1014 ; X64-NEXT:    vcvtpd2dq {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xfb,0x59,0xe6,0xc1]
1015 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1016 ; X64-NEXT:    retq # encoding: [0xc3]
1017   %ret = call <4 x i32> @llvm.x86.avx10.mask.vcvtpd2dq256(<4 x double> %C, <4 x i32> %A, i8 %B, i32 10)
1018   ret <4 x i32> %ret
1021 define <4 x i32> @test_int_x86_maskz_vcvtpd2dq256(i8 %A, <4 x double> %B) nounwind {
1022 ; X86-LABEL: test_int_x86_maskz_vcvtpd2dq256:
1023 ; X86:       # %bb.0:
1024 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1025 ; X86-NEXT:    vcvtpd2dq {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xfb,0xb9,0xe6,0xc0]
1026 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1027 ; X86-NEXT:    retl # encoding: [0xc3]
1029 ; X64-LABEL: test_int_x86_maskz_vcvtpd2dq256:
1030 ; X64:       # %bb.0:
1031 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1032 ; X64-NEXT:    vcvtpd2dq {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xfb,0xb9,0xe6,0xc0]
1033 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1034 ; X64-NEXT:    retq # encoding: [0xc3]
1035   %ret = call <4 x i32> @llvm.x86.avx10.mask.vcvtpd2dq256(<4 x double> %B, <4 x i32> zeroinitializer, i8 %A, i32 9)
1036   ret <4 x i32> %ret
1039 declare <8 x half> @llvm.x86.avx10.mask.vcvtpd2ph256(<4 x double>, <8 x half>, i8, i32)
1040 define <8 x half> @test_int_x86_vcvtpd2ph256(<4 x double> %A) nounwind {
1041 ; CHECK-LABEL: test_int_x86_vcvtpd2ph256:
1042 ; CHECK:       # %bb.0:
1043 ; CHECK-NEXT:    vcvtpd2ph {rz-sae}, %ymm0, %xmm0 # encoding: [0x62,0xf5,0xf9,0x78,0x5a,0xc0]
1044 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1045 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1046   %ret = call <8 x half> @llvm.x86.avx10.mask.vcvtpd2ph256(<4 x double> %A, <8 x half> undef, i8 -1, i32 11)
1047   ret <8 x half> %ret
1050 define <8 x half> @test_int_x86_mask_vcvtpd2ph256(<8 x half> %A, i8 %B, <4 x double> %C) {
1051 ; X86-LABEL: test_int_x86_mask_vcvtpd2ph256:
1052 ; X86:       # %bb.0:
1053 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1054 ; X86-NEXT:    vcvtpd2ph {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf5,0xf9,0x59,0x5a,0xc1]
1055 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1056 ; X86-NEXT:    retl # encoding: [0xc3]
1058 ; X64-LABEL: test_int_x86_mask_vcvtpd2ph256:
1059 ; X64:       # %bb.0:
1060 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1061 ; X64-NEXT:    vcvtpd2ph {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf5,0xf9,0x59,0x5a,0xc1]
1062 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1063 ; X64-NEXT:    retq # encoding: [0xc3]
1064   %ret = call <8 x half> @llvm.x86.avx10.mask.vcvtpd2ph256(<4 x double> %C, <8 x half> %A, i8 %B, i32 10)
1065   ret <8 x half> %ret
1068 define <8 x half> @test_int_x86_maskz_vcvtpd2ph256(i8 %A, <4 x double> %B) nounwind {
1069 ; X86-LABEL: test_int_x86_maskz_vcvtpd2ph256:
1070 ; X86:       # %bb.0:
1071 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1072 ; X86-NEXT:    vcvtpd2ph {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf5,0xf9,0xb9,0x5a,0xc0]
1073 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1074 ; X86-NEXT:    retl # encoding: [0xc3]
1076 ; X64-LABEL: test_int_x86_maskz_vcvtpd2ph256:
1077 ; X64:       # %bb.0:
1078 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1079 ; X64-NEXT:    vcvtpd2ph {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf5,0xf9,0xb9,0x5a,0xc0]
1080 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1081 ; X64-NEXT:    retq # encoding: [0xc3]
1082   %ret = call <8 x half> @llvm.x86.avx10.mask.vcvtpd2ph256(<4 x double> %B, <8 x half> zeroinitializer, i8 %A, i32 9)
1083   ret <8 x half> %ret
1086 declare <4 x float> @llvm.x86.avx10.mask.vcvtpd2ps256(<4 x double>, <4 x float>, i8, i32)
1087 define <4 x float> @test_int_x86_vcvtpd2ps256(<4 x double> %A) nounwind {
1088 ; CHECK-LABEL: test_int_x86_vcvtpd2ps256:
1089 ; CHECK:       # %bb.0:
1090 ; CHECK-NEXT:    vcvtpd2ps {rz-sae}, %ymm0, %xmm0 # encoding: [0x62,0xf1,0xf9,0x78,0x5a,0xc0]
1091 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1092 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1093   %ret = call <4 x float> @llvm.x86.avx10.mask.vcvtpd2ps256(<4 x double> %A, <4 x float> undef, i8 -1, i32 11)
1094   ret <4 x float> %ret
1097 define <4 x float> @test_int_x86_mask_vcvtpd2ps256(<4 x float> %A, i8 %B, <4 x double> %C) nounwind {
1098 ; X86-LABEL: test_int_x86_mask_vcvtpd2ps256:
1099 ; X86:       # %bb.0:
1100 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1101 ; X86-NEXT:    vcvtpd2ps {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x59,0x5a,0xc1]
1102 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1103 ; X86-NEXT:    retl # encoding: [0xc3]
1105 ; X64-LABEL: test_int_x86_mask_vcvtpd2ps256:
1106 ; X64:       # %bb.0:
1107 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1108 ; X64-NEXT:    vcvtpd2ps {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x59,0x5a,0xc1]
1109 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1110 ; X64-NEXT:    retq # encoding: [0xc3]
1111   %ret = call <4 x float> @llvm.x86.avx10.mask.vcvtpd2ps256(<4 x double> %C, <4 x float> %A, i8 %B, i32 10)
1112   ret <4 x float> %ret
1115 define <4 x float> @test_int_x86_maskz_vcvtpd2ps256(i8 %A, <4 x double> %B) nounwind {
1116 ; X86-LABEL: test_int_x86_maskz_vcvtpd2ps256:
1117 ; X86:       # %bb.0:
1118 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1119 ; X86-NEXT:    vcvtpd2ps {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x5a,0xc0]
1120 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1121 ; X86-NEXT:    retl # encoding: [0xc3]
1123 ; X64-LABEL: test_int_x86_maskz_vcvtpd2ps256:
1124 ; X64:       # %bb.0:
1125 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1126 ; X64-NEXT:    vcvtpd2ps {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x5a,0xc0]
1127 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1128 ; X64-NEXT:    retq # encoding: [0xc3]
1129   %ret = call <4 x float> @llvm.x86.avx10.mask.vcvtpd2ps256(<4 x double> %B, <4 x float> zeroinitializer, i8 %A, i32 9)
1130   ret <4 x float> %ret
1133 declare <4 x i64> @llvm.x86.avx10.mask.vcvtpd2qq256(<4 x double>, <4 x i64>, i8, i32)
1134 define <4 x i64> @test_int_x86_vcvtpd2qq256(<4 x double> %A) nounwind {
1135 ; CHECK-LABEL: test_int_x86_vcvtpd2qq256:
1136 ; CHECK:       # %bb.0:
1137 ; CHECK-NEXT:    vcvtpd2qq {rz-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xf9,0x78,0x7b,0xc0]
1138 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1139   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtpd2qq256(<4 x double> %A, <4 x i64> undef, i8 -1, i32 11)
1140   ret <4 x i64> %ret
1143 define <4 x i64> @test_int_x86_mask_vcvtpd2qq256(<4 x i64> %A, i8 %B, <4 x double> %C) nounwind {
1144 ; X86-LABEL: test_int_x86_mask_vcvtpd2qq256:
1145 ; X86:       # %bb.0:
1146 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1147 ; X86-NEXT:    vcvtpd2qq {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x59,0x7b,0xc1]
1148 ; X86-NEXT:    retl # encoding: [0xc3]
1150 ; X64-LABEL: test_int_x86_mask_vcvtpd2qq256:
1151 ; X64:       # %bb.0:
1152 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1153 ; X64-NEXT:    vcvtpd2qq {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x59,0x7b,0xc1]
1154 ; X64-NEXT:    retq # encoding: [0xc3]
1155   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtpd2qq256(<4 x double> %C, <4 x i64> %A, i8 %B, i32 10)
1156   ret <4 x i64> %ret
1159 define <4 x i64> @test_int_x86_maskz_vcvtpd2qq256(i8 %A, <4 x double> %B) nounwind {
1160 ; X86-LABEL: test_int_x86_maskz_vcvtpd2qq256:
1161 ; X86:       # %bb.0:
1162 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1163 ; X86-NEXT:    vcvtpd2qq {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x7b,0xc0]
1164 ; X86-NEXT:    retl # encoding: [0xc3]
1166 ; X64-LABEL: test_int_x86_maskz_vcvtpd2qq256:
1167 ; X64:       # %bb.0:
1168 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1169 ; X64-NEXT:    vcvtpd2qq {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x7b,0xc0]
1170 ; X64-NEXT:    retq # encoding: [0xc3]
1171   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtpd2qq256(<4 x double> %B, <4 x i64> zeroinitializer, i8 %A, i32 9)
1172   ret <4 x i64> %ret
1175 declare <4 x i32> @llvm.x86.avx10.mask.vcvtpd2udq256(<4 x double>, <4 x i32>, i8, i32)
1176 define <4 x i32> @test_int_x86_vcvtpd2udq256(<4 x double> %A) nounwind {
1177 ; CHECK-LABEL: test_int_x86_vcvtpd2udq256:
1178 ; CHECK:       # %bb.0:
1179 ; CHECK-NEXT:    vcvtpd2udq {rz-sae}, %ymm0, %xmm0 # encoding: [0x62,0xf1,0xf8,0x78,0x79,0xc0]
1180 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1181 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1182   %ret = call <4 x i32> @llvm.x86.avx10.mask.vcvtpd2udq256(<4 x double> %A, <4 x i32> undef, i8 -1, i32 11)
1183   ret <4 x i32> %ret
1186 define <4 x i32> @test_int_x86_mask_vcvtpd2udq256(<4 x i32> %A, i8 %B, <4 x double> %C) nounwind {
1187 ; X86-LABEL: test_int_x86_mask_vcvtpd2udq256:
1188 ; X86:       # %bb.0:
1189 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1190 ; X86-NEXT:    vcvtpd2udq {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xf8,0x59,0x79,0xc1]
1191 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1192 ; X86-NEXT:    retl # encoding: [0xc3]
1194 ; X64-LABEL: test_int_x86_mask_vcvtpd2udq256:
1195 ; X64:       # %bb.0:
1196 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1197 ; X64-NEXT:    vcvtpd2udq {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xf8,0x59,0x79,0xc1]
1198 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1199 ; X64-NEXT:    retq # encoding: [0xc3]
1200   %ret = call <4 x i32> @llvm.x86.avx10.mask.vcvtpd2udq256(<4 x double> %C, <4 x i32> %A, i8 %B, i32 10)
1201   ret <4 x i32> %ret
1204 define <4 x i32> @test_int_x86_maskz_vcvtpd2udq256(i8 %A, <4 x double> %B) nounwind {
1205 ; X86-LABEL: test_int_x86_maskz_vcvtpd2udq256:
1206 ; X86:       # %bb.0:
1207 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1208 ; X86-NEXT:    vcvtpd2udq {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xf8,0xb9,0x79,0xc0]
1209 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1210 ; X86-NEXT:    retl # encoding: [0xc3]
1212 ; X64-LABEL: test_int_x86_maskz_vcvtpd2udq256:
1213 ; X64:       # %bb.0:
1214 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1215 ; X64-NEXT:    vcvtpd2udq {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xf8,0xb9,0x79,0xc0]
1216 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1217 ; X64-NEXT:    retq # encoding: [0xc3]
1218   %ret = call <4 x i32> @llvm.x86.avx10.mask.vcvtpd2udq256(<4 x double> %B, <4 x i32> zeroinitializer, i8 %A, i32 9)
1219   ret <4 x i32> %ret
1222 declare <4 x i64> @llvm.x86.avx10.mask.vcvtpd2uqq256(<4 x double>, <4 x i64>, i8, i32)
1223 define <4 x i64> @test_int_x86_vcvtpd2uqq256(<4 x double> %A) nounwind {
1224 ; CHECK-LABEL: test_int_x86_vcvtpd2uqq256:
1225 ; CHECK:       # %bb.0:
1226 ; CHECK-NEXT:    vcvtpd2uqq {rz-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xf9,0x78,0x79,0xc0]
1227 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1228   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtpd2uqq256(<4 x double> %A, <4 x i64> undef, i8 -1, i32 11)
1229   ret <4 x i64> %ret
1232 define <4 x i64> @test_int_x86_mask_vcvtpd2uqq256(<4 x i64> %A, i8 %B, <4 x double> %C) nounwind {
1233 ; X86-LABEL: test_int_x86_mask_vcvtpd2uqq256:
1234 ; X86:       # %bb.0:
1235 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1236 ; X86-NEXT:    vcvtpd2uqq {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x59,0x79,0xc1]
1237 ; X86-NEXT:    retl # encoding: [0xc3]
1239 ; X64-LABEL: test_int_x86_mask_vcvtpd2uqq256:
1240 ; X64:       # %bb.0:
1241 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1242 ; X64-NEXT:    vcvtpd2uqq {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x59,0x79,0xc1]
1243 ; X64-NEXT:    retq # encoding: [0xc3]
1244   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtpd2uqq256(<4 x double> %C, <4 x i64> %A, i8 %B, i32 10)
1245   ret <4 x i64> %ret
1248 define <4 x i64> @test_int_x86_maskz_vcvtpd2uqq256(i8 %A, <4 x double> %B) nounwind {
1249 ; X86-LABEL: test_int_x86_maskz_vcvtpd2uqq256:
1250 ; X86:       # %bb.0:
1251 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1252 ; X86-NEXT:    vcvtpd2uqq {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x79,0xc0]
1253 ; X86-NEXT:    retl # encoding: [0xc3]
1255 ; X64-LABEL: test_int_x86_maskz_vcvtpd2uqq256:
1256 ; X64:       # %bb.0:
1257 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1258 ; X64-NEXT:    vcvtpd2uqq {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x79,0xc0]
1259 ; X64-NEXT:    retq # encoding: [0xc3]
1260   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtpd2uqq256(<4 x double> %B, <4 x i64> zeroinitializer, i8 %A, i32 9)
1261   ret <4 x i64> %ret
1264 declare <8 x i32> @llvm.x86.avx10.mask.vcvtph2dq256(<8 x half>, <8 x i32>, i8, i32)
1265 define <8 x i32> @test_int_x86_vcvtph2dq256(<8 x half> %A) nounwind {
1266 ; CHECK-LABEL: test_int_x86_vcvtph2dq256:
1267 ; CHECK:       # %bb.0:
1268 ; CHECK-NEXT:    vcvtph2dq {rz-sae}, %xmm0, %ymm0 # encoding: [0x62,0xf5,0x79,0x78,0x5b,0xc0]
1269 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1270   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvtph2dq256(<8 x half> %A, <8 x i32> undef, i8 -1, i32 11)
1271   ret <8 x i32> %ret
1274 define <8 x i32> @test_int_x86_mask_vcvtph2dq256(<8 x i32> %A, i8 %B, <8 x half> %C) nounwind {
1275 ; X86-LABEL: test_int_x86_mask_vcvtph2dq256:
1276 ; X86:       # %bb.0:
1277 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1278 ; X86-NEXT:    vcvtph2dq {ru-sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x59,0x5b,0xc1]
1279 ; X86-NEXT:    retl # encoding: [0xc3]
1281 ; X64-LABEL: test_int_x86_mask_vcvtph2dq256:
1282 ; X64:       # %bb.0:
1283 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1284 ; X64-NEXT:    vcvtph2dq {ru-sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x59,0x5b,0xc1]
1285 ; X64-NEXT:    retq # encoding: [0xc3]
1286   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvtph2dq256(<8 x half> %C, <8 x i32> %A, i8 %B, i32 10)
1287   ret <8 x i32> %ret
1290 define <8 x i32> @test_int_x86_maskz_vcvtph2dq256(i8 %A, <8 x half> %B) nounwind {
1291 ; X86-LABEL: test_int_x86_maskz_vcvtph2dq256:
1292 ; X86:       # %bb.0:
1293 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1294 ; X86-NEXT:    vcvtph2dq {rd-sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0xb9,0x5b,0xc0]
1295 ; X86-NEXT:    retl # encoding: [0xc3]
1297 ; X64-LABEL: test_int_x86_maskz_vcvtph2dq256:
1298 ; X64:       # %bb.0:
1299 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1300 ; X64-NEXT:    vcvtph2dq {rd-sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0xb9,0x5b,0xc0]
1301 ; X64-NEXT:    retq # encoding: [0xc3]
1302   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvtph2dq256(<8 x half> %B, <8 x i32> zeroinitializer, i8 %A, i32 9)
1303   ret <8 x i32> %ret
1306 declare <4 x double> @llvm.x86.avx10.mask.vcvtph2pd256(<8 x half>, <4 x double>, i8, i32)
1307 define <4 x double> @test_int_x86_vcvtph2pd256(<8 x half> %A) nounwind {
1308 ; CHECK-LABEL: test_int_x86_vcvtph2pd256:
1309 ; CHECK:       # %bb.0:
1310 ; CHECK-NEXT:    vcvtph2pd {sae}, %xmm0, %ymm0 # encoding: [0x62,0xf5,0x78,0x18,0x5a,0xc0]
1311 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1312   %ret = call <4 x double> @llvm.x86.avx10.mask.vcvtph2pd256(<8 x half> %A, <4 x double> undef, i8 -1, i32 8)
1313   ret <4 x double> %ret
1316 define <4 x double> @test_int_x86_mask_vcvtph2pd256(<4 x double> %A, i8 %B, <8 x half> %C) nounwind {
1317 ; X86-LABEL: test_int_x86_mask_vcvtph2pd256:
1318 ; X86:       # %bb.0:
1319 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1320 ; X86-NEXT:    vcvtph2pd {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x78,0x19,0x5a,0xc1]
1321 ; X86-NEXT:    retl # encoding: [0xc3]
1323 ; X64-LABEL: test_int_x86_mask_vcvtph2pd256:
1324 ; X64:       # %bb.0:
1325 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1326 ; X64-NEXT:    vcvtph2pd {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x78,0x19,0x5a,0xc1]
1327 ; X64-NEXT:    retq # encoding: [0xc3]
1328   %ret = call <4 x double> @llvm.x86.avx10.mask.vcvtph2pd256(<8 x half> %C, <4 x double> %A, i8 %B, i32 8)
1329   ret <4 x double> %ret
1332 define <4 x double> @test_int_x86_maskz_vcvtph2pd256(i8 %A, <8 x half> %B) nounwind {
1333 ; X86-LABEL: test_int_x86_maskz_vcvtph2pd256:
1334 ; X86:       # %bb.0:
1335 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1336 ; X86-NEXT:    vcvtph2pd {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0x99,0x5a,0xc0]
1337 ; X86-NEXT:    retl # encoding: [0xc3]
1339 ; X64-LABEL: test_int_x86_maskz_vcvtph2pd256:
1340 ; X64:       # %bb.0:
1341 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1342 ; X64-NEXT:    vcvtph2pd {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0x99,0x5a,0xc0]
1343 ; X64-NEXT:    retq # encoding: [0xc3]
1344   %ret = call <4 x double> @llvm.x86.avx10.mask.vcvtph2pd256(<8 x half> %B, <4 x double> zeroinitializer, i8 %A, i32 8)
1345   ret <4 x double> %ret
1348 declare <8 x float> @llvm.x86.avx10.mask.vcvtph2psx256(<8 x half>, <8 x float>, i8, i32)
1349 define <8 x float> @test_int_x86_vcvtph2psx256(<8 x half> %A) nounwind {
1350 ; CHECK-LABEL: test_int_x86_vcvtph2psx256:
1351 ; CHECK:       # %bb.0:
1352 ; CHECK-NEXT:    vcvtph2psx {sae}, %xmm0, %ymm0 # encoding: [0x62,0xf6,0x79,0x18,0x13,0xc0]
1353 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1354   %ret = call <8 x float> @llvm.x86.avx10.mask.vcvtph2psx256(<8 x half> %A, <8 x float> undef, i8 -1, i32 8)
1355   ret <8 x float> %ret
1358 define <8 x float> @test_int_x86_mask_vcvtph2psx256(<8 x float> %A, i8 %B, <8 x half> %C) nounwind {
1359 ; X86-LABEL: test_int_x86_mask_vcvtph2psx256:
1360 ; X86:       # %bb.0:
1361 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1362 ; X86-NEXT:    vcvtph2psx {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf6,0x79,0x19,0x13,0xc1]
1363 ; X86-NEXT:    retl # encoding: [0xc3]
1365 ; X64-LABEL: test_int_x86_mask_vcvtph2psx256:
1366 ; X64:       # %bb.0:
1367 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1368 ; X64-NEXT:    vcvtph2psx {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf6,0x79,0x19,0x13,0xc1]
1369 ; X64-NEXT:    retq # encoding: [0xc3]
1370   %ret = call <8 x float> @llvm.x86.avx10.mask.vcvtph2psx256(<8 x half> %C, <8 x float> %A, i8 %B, i32 8)
1371   ret <8 x float> %ret
1374 define <8 x float> @test_int_x86_maskz_vcvtph2psx256(i8 %A, <8 x half> %B) nounwind {
1375 ; X86-LABEL: test_int_x86_maskz_vcvtph2psx256:
1376 ; X86:       # %bb.0:
1377 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1378 ; X86-NEXT:    vcvtph2psx {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf6,0x79,0x99,0x13,0xc0]
1379 ; X86-NEXT:    retl # encoding: [0xc3]
1381 ; X64-LABEL: test_int_x86_maskz_vcvtph2psx256:
1382 ; X64:       # %bb.0:
1383 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1384 ; X64-NEXT:    vcvtph2psx {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf6,0x79,0x99,0x13,0xc0]
1385 ; X64-NEXT:    retq # encoding: [0xc3]
1386   %ret = call <8 x float> @llvm.x86.avx10.mask.vcvtph2psx256(<8 x half> %B, <8 x float> zeroinitializer, i8 %A, i32 8)
1387   ret <8 x float> %ret
1390 declare <4 x i64> @llvm.x86.avx10.mask.vcvtph2qq256(<8 x half>, <4 x i64>, i8, i32)
1391 define <4 x i64> @test_int_x86_vcvtph2qq256(<8 x half> %A) nounwind {
1392 ; CHECK-LABEL: test_int_x86_vcvtph2qq256:
1393 ; CHECK:       # %bb.0:
1394 ; CHECK-NEXT:    vcvtph2qq {rz-sae}, %xmm0, %ymm0 # encoding: [0x62,0xf5,0x79,0x78,0x7b,0xc0]
1395 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1396   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtph2qq256(<8 x half> %A, <4 x i64> undef, i8 -1, i32 11)
1397   ret <4 x i64> %ret
1400 define <4 x i64> @test_int_x86_mask_vcvtph2qq256(<4 x i64> %A, i8 %B, <8 x half> %C) nounwind {
1401 ; X86-LABEL: test_int_x86_mask_vcvtph2qq256:
1402 ; X86:       # %bb.0:
1403 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1404 ; X86-NEXT:    vcvtph2qq {ru-sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x59,0x7b,0xc1]
1405 ; X86-NEXT:    retl # encoding: [0xc3]
1407 ; X64-LABEL: test_int_x86_mask_vcvtph2qq256:
1408 ; X64:       # %bb.0:
1409 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1410 ; X64-NEXT:    vcvtph2qq {ru-sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x59,0x7b,0xc1]
1411 ; X64-NEXT:    retq # encoding: [0xc3]
1412   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtph2qq256(<8 x half> %C, <4 x i64> %A, i8 %B, i32 10)
1413   ret <4 x i64> %ret
1416 define <4 x i64> @test_int_x86_maskz_vcvtph2qq256(i8 %A, <8 x half> %B) nounwind {
1417 ; X86-LABEL: test_int_x86_maskz_vcvtph2qq256:
1418 ; X86:       # %bb.0:
1419 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1420 ; X86-NEXT:    vcvtph2qq {rd-sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0xb9,0x7b,0xc0]
1421 ; X86-NEXT:    retl # encoding: [0xc3]
1423 ; X64-LABEL: test_int_x86_maskz_vcvtph2qq256:
1424 ; X64:       # %bb.0:
1425 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1426 ; X64-NEXT:    vcvtph2qq {rd-sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0xb9,0x7b,0xc0]
1427 ; X64-NEXT:    retq # encoding: [0xc3]
1428   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtph2qq256(<8 x half> %B, <4 x i64> zeroinitializer, i8 %A, i32 9)
1429   ret <4 x i64> %ret
1432 declare <8 x i32> @llvm.x86.avx10.mask.vcvtph2udq256(<8 x half>, <8 x i32>, i8, i32)
1433 define <8 x i32> @test_int_x86_vcvtph2udq256(<8 x half> %A) nounwind {
1434 ; CHECK-LABEL: test_int_x86_vcvtph2udq256:
1435 ; CHECK:       # %bb.0:
1436 ; CHECK-NEXT:    vcvtph2udq {rz-sae}, %xmm0, %ymm0 # encoding: [0x62,0xf5,0x78,0x78,0x79,0xc0]
1437 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1438   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvtph2udq256(<8 x half> %A, <8 x i32> undef, i8 -1, i32 11)
1439   ret <8 x i32> %ret
1442 define <8 x i32> @test_int_x86_mask_vcvtph2udq256(<8 x i32> %A, i8 %B, <8 x half> %C) nounwind {
1443 ; X86-LABEL: test_int_x86_mask_vcvtph2udq256:
1444 ; X86:       # %bb.0:
1445 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1446 ; X86-NEXT:    vcvtph2udq {ru-sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x78,0x59,0x79,0xc1]
1447 ; X86-NEXT:    retl # encoding: [0xc3]
1449 ; X64-LABEL: test_int_x86_mask_vcvtph2udq256:
1450 ; X64:       # %bb.0:
1451 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1452 ; X64-NEXT:    vcvtph2udq {ru-sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x78,0x59,0x79,0xc1]
1453 ; X64-NEXT:    retq # encoding: [0xc3]
1454   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvtph2udq256(<8 x half> %C, <8 x i32> %A, i8 %B, i32 10)
1455   ret <8 x i32> %ret
1458 define <8 x i32> @test_int_x86_maskz_vcvtph2udq256(i8 %A, <8 x half> %B) nounwind {
1459 ; X86-LABEL: test_int_x86_maskz_vcvtph2udq256:
1460 ; X86:       # %bb.0:
1461 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1462 ; X86-NEXT:    vcvtph2udq {rd-sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x79,0xc0]
1463 ; X86-NEXT:    retl # encoding: [0xc3]
1465 ; X64-LABEL: test_int_x86_maskz_vcvtph2udq256:
1466 ; X64:       # %bb.0:
1467 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1468 ; X64-NEXT:    vcvtph2udq {rd-sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x79,0xc0]
1469 ; X64-NEXT:    retq # encoding: [0xc3]
1470   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvtph2udq256(<8 x half> %B, <8 x i32> zeroinitializer, i8 %A, i32 9)
1471   ret <8 x i32> %ret
1474 declare <4 x i64> @llvm.x86.avx10.mask.vcvtph2uqq256(<8 x half>, <4 x i64>, i8, i32)
1475 define <4 x i64> @test_int_x86_vcvtph2uqq256(<8 x half> %A) nounwind {
1476 ; CHECK-LABEL: test_int_x86_vcvtph2uqq256:
1477 ; CHECK:       # %bb.0:
1478 ; CHECK-NEXT:    vcvtph2uqq {rz-sae}, %xmm0, %ymm0 # encoding: [0x62,0xf5,0x79,0x78,0x79,0xc0]
1479 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1480   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtph2uqq256(<8 x half> %A, <4 x i64> undef, i8 -1, i32 11)
1481   ret <4 x i64> %ret
1484 define <4 x i64> @test_int_x86_mask_vcvtph2uqq256(<4 x i64> %A, i8 %B, <8 x half> %C) nounwind {
1485 ; X86-LABEL: test_int_x86_mask_vcvtph2uqq256:
1486 ; X86:       # %bb.0:
1487 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1488 ; X86-NEXT:    vcvtph2uqq {ru-sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x59,0x79,0xc1]
1489 ; X86-NEXT:    retl # encoding: [0xc3]
1491 ; X64-LABEL: test_int_x86_mask_vcvtph2uqq256:
1492 ; X64:       # %bb.0:
1493 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1494 ; X64-NEXT:    vcvtph2uqq {ru-sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x59,0x79,0xc1]
1495 ; X64-NEXT:    retq # encoding: [0xc3]
1496   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtph2uqq256(<8 x half> %C, <4 x i64> %A, i8 %B, i32 10)
1497   ret <4 x i64> %ret
1500 define <4 x i64> @test_int_x86_maskz_vcvtph2uqq256(i8 %A, <8 x half> %B) nounwind {
1501 ; X86-LABEL: test_int_x86_maskz_vcvtph2uqq256:
1502 ; X86:       # %bb.0:
1503 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1504 ; X86-NEXT:    vcvtph2uqq {rd-sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0xb9,0x79,0xc0]
1505 ; X86-NEXT:    retl # encoding: [0xc3]
1507 ; X64-LABEL: test_int_x86_maskz_vcvtph2uqq256:
1508 ; X64:       # %bb.0:
1509 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1510 ; X64-NEXT:    vcvtph2uqq {rd-sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0xb9,0x79,0xc0]
1511 ; X64-NEXT:    retq # encoding: [0xc3]
1512   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtph2uqq256(<8 x half> %B, <4 x i64> zeroinitializer, i8 %A, i32 9)
1513   ret <4 x i64> %ret
1516 declare <16 x i16> @llvm.x86.avx10.mask.vcvtph2uw256(<16 x half>, <16 x i16>, i16, i32)
1517 define <16 x i16> @test_int_x86_vcvtph2uw256(<16 x half> %A) nounwind {
1518 ; CHECK-LABEL: test_int_x86_vcvtph2uw256:
1519 ; CHECK:       # %bb.0:
1520 ; CHECK-NEXT:    vcvtph2uw {rz-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x78,0x78,0x7d,0xc0]
1521 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1522   %ret = call <16 x i16> @llvm.x86.avx10.mask.vcvtph2uw256(<16 x half> %A, <16 x i16> undef, i16 -1, i32 11)
1523   ret <16 x i16> %ret
1526 define <16 x i16> @test_int_x86_mask_vcvtph2uw256(<16 x i16> %A, i16 %B, <16 x half> %C) nounwind {
1527 ; X86-LABEL: test_int_x86_mask_vcvtph2uw256:
1528 ; X86:       # %bb.0:
1529 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
1530 ; X86-NEXT:    vcvtph2uw {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x78,0x59,0x7d,0xc1]
1531 ; X86-NEXT:    retl # encoding: [0xc3]
1533 ; X64-LABEL: test_int_x86_mask_vcvtph2uw256:
1534 ; X64:       # %bb.0:
1535 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1536 ; X64-NEXT:    vcvtph2uw {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x78,0x59,0x7d,0xc1]
1537 ; X64-NEXT:    retq # encoding: [0xc3]
1538   %ret = call <16 x i16> @llvm.x86.avx10.mask.vcvtph2uw256(<16 x half> %C, <16 x i16> %A, i16 %B, i32 10)
1539   ret <16 x i16> %ret
1542 define <16 x i16> @test_int_x86_maskz_vcvtph2uw256(i16 %A, <16 x half> %B) nounwind {
1543 ; X86-LABEL: test_int_x86_maskz_vcvtph2uw256:
1544 ; X86:       # %bb.0:
1545 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
1546 ; X86-NEXT:    vcvtph2uw {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x7d,0xc0]
1547 ; X86-NEXT:    retl # encoding: [0xc3]
1549 ; X64-LABEL: test_int_x86_maskz_vcvtph2uw256:
1550 ; X64:       # %bb.0:
1551 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1552 ; X64-NEXT:    vcvtph2uw {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x7d,0xc0]
1553 ; X64-NEXT:    retq # encoding: [0xc3]
1554   %ret = call <16 x i16> @llvm.x86.avx10.mask.vcvtph2uw256(<16 x half> %B, <16 x i16> zeroinitializer, i16 %A, i32 9)
1555   ret <16 x i16> %ret
1558 declare <16 x i16> @llvm.x86.avx10.mask.vcvtph2w256(<16 x half>, <16 x i16>, i16, i32)
1559 define <16 x i16> @test_int_x86_vcvtph2w256(<16 x half> %A) nounwind {
1560 ; CHECK-LABEL: test_int_x86_vcvtph2w256:
1561 ; CHECK:       # %bb.0:
1562 ; CHECK-NEXT:    vcvtph2w {rz-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x79,0x78,0x7d,0xc0]
1563 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1564   %ret = call <16 x i16> @llvm.x86.avx10.mask.vcvtph2w256(<16 x half> %A, <16 x i16> undef, i16 -1, i32 11)
1565   ret <16 x i16> %ret
1568 define <16 x i16> @test_int_x86_mask_vcvtph2w256(<16 x i16> %A, i16 %B, <16 x half> %C) nounwind {
1569 ; X86-LABEL: test_int_x86_mask_vcvtph2w256:
1570 ; X86:       # %bb.0:
1571 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
1572 ; X86-NEXT:    vcvtph2w {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x59,0x7d,0xc1]
1573 ; X86-NEXT:    retl # encoding: [0xc3]
1575 ; X64-LABEL: test_int_x86_mask_vcvtph2w256:
1576 ; X64:       # %bb.0:
1577 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1578 ; X64-NEXT:    vcvtph2w {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x59,0x7d,0xc1]
1579 ; X64-NEXT:    retq # encoding: [0xc3]
1580   %ret = call <16 x i16> @llvm.x86.avx10.mask.vcvtph2w256(<16 x half> %C, <16 x i16> %A, i16 %B, i32 10)
1581   ret <16 x i16> %ret
1584 define <16 x i16> @test_int_x86_maskz_vcvtph2w256(i16 %A, <16 x half> %B) nounwind {
1585 ; X86-LABEL: test_int_x86_maskz_vcvtph2w256:
1586 ; X86:       # %bb.0:
1587 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
1588 ; X86-NEXT:    vcvtph2w {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0xb9,0x7d,0xc0]
1589 ; X86-NEXT:    retl # encoding: [0xc3]
1591 ; X64-LABEL: test_int_x86_maskz_vcvtph2w256:
1592 ; X64:       # %bb.0:
1593 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1594 ; X64-NEXT:    vcvtph2w {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0xb9,0x7d,0xc0]
1595 ; X64-NEXT:    retq # encoding: [0xc3]
1596   %ret = call <16 x i16> @llvm.x86.avx10.mask.vcvtph2w256(<16 x half> %B, <16 x i16> zeroinitializer, i16 %A, i32 9)
1597   ret <16 x i16> %ret
1600 declare <8 x i32> @llvm.x86.avx10.mask.vcvtps2dq256(<8 x float>, <8 x i32>, i8, i32)
1601 define <8 x i32> @test_int_x86_vcvtps2dq256(<8 x float> %a) nounwind {
1602 ; CHECK-LABEL: test_int_x86_vcvtps2dq256:
1603 ; CHECK:       # %bb.0:
1604 ; CHECK-NEXT:    vcvtps2dq {rz-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x79,0x78,0x5b,0xc0]
1605 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1606   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvtps2dq256(<8 x float> %a, <8 x i32> undef, i8 -1, i32 11)
1607   ret <8 x i32> %ret
1610 define <8 x i32> @test_int_x86_mask_vcvtps2dq256(<8 x i32> %a, i8 %b, <8 x float> %c) nounwind {
1611 ; X86-LABEL: test_int_x86_mask_vcvtps2dq256:
1612 ; X86:       # %bb.0:
1613 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1614 ; X86-NEXT:    vcvtps2dq {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x79,0x59,0x5b,0xc1]
1615 ; X86-NEXT:    retl # encoding: [0xc3]
1617 ; X64-LABEL: test_int_x86_mask_vcvtps2dq256:
1618 ; X64:       # %bb.0:
1619 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1620 ; X64-NEXT:    vcvtps2dq {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x79,0x59,0x5b,0xc1]
1621 ; X64-NEXT:    retq # encoding: [0xc3]
1622   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvtps2dq256(<8 x float> %c, <8 x i32> %a, i8 %b, i32 10)
1623   ret <8 x i32> %ret
1626 define <8 x i32> @test_int_x86_maskz_vcvtps2dq256(i8 %a, <8 x float> %b) nounwind {
1627 ; X86-LABEL: test_int_x86_maskz_vcvtps2dq256:
1628 ; X86:       # %bb.0:
1629 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1630 ; X86-NEXT:    vcvtps2dq {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x79,0xb9,0x5b,0xc0]
1631 ; X86-NEXT:    retl # encoding: [0xc3]
1633 ; X64-LABEL: test_int_x86_maskz_vcvtps2dq256:
1634 ; X64:       # %bb.0:
1635 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1636 ; X64-NEXT:    vcvtps2dq {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x79,0xb9,0x5b,0xc0]
1637 ; X64-NEXT:    retq # encoding: [0xc3]
1638   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvtps2dq256(<8 x float> %b, <8 x i32> zeroinitializer, i8 %a, i32 9)
1639   ret <8 x i32> %ret
1642 declare <4 x double> @llvm.x86.avx10.mask.vcvtps2pd256(<4 x float>, <4 x double>, i8, i32)
1643 define <4 x double> @test_int_x86_vcvtps2pd256(<4 x float> %a) nounwind {
1644 ; CHECK-LABEL: test_int_x86_vcvtps2pd256:
1645 ; CHECK:       # %bb.0:
1646 ; CHECK-NEXT:    vcvtps2pd {sae}, %xmm0, %ymm0 # encoding: [0x62,0xf1,0x78,0x18,0x5a,0xc0]
1647 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1648   %ret = call <4 x double> @llvm.x86.avx10.mask.vcvtps2pd256(<4 x float> %a, <4 x double> undef, i8 -1, i32 8)
1649   ret <4 x double> %ret
1652 define <4 x double> @test_int_x86_mask_vcvtps2pd256(<4 x double> %a, i8 %b, <4 x float> %c) nounwind {
1653 ; X86-LABEL: test_int_x86_mask_vcvtps2pd256:
1654 ; X86:       # %bb.0:
1655 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1656 ; X86-NEXT:    vcvtps2pd {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x78,0x19,0x5a,0xc1]
1657 ; X86-NEXT:    retl # encoding: [0xc3]
1659 ; X64-LABEL: test_int_x86_mask_vcvtps2pd256:
1660 ; X64:       # %bb.0:
1661 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1662 ; X64-NEXT:    vcvtps2pd {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x78,0x19,0x5a,0xc1]
1663 ; X64-NEXT:    retq # encoding: [0xc3]
1664   %ret = call <4 x double> @llvm.x86.avx10.mask.vcvtps2pd256(<4 x float> %c, <4 x double> %a, i8 %b, i32 8)
1665   ret <4 x double> %ret
1668 define <4 x double> @test_int_x86_maskz_vcvtps2pd256(i8 %a, <4 x float> %b) nounwind {
1669 ; X86-LABEL: test_int_x86_maskz_vcvtps2pd256:
1670 ; X86:       # %bb.0:
1671 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1672 ; X86-NEXT:    vcvtps2pd {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0x99,0x5a,0xc0]
1673 ; X86-NEXT:    retl # encoding: [0xc3]
1675 ; X64-LABEL: test_int_x86_maskz_vcvtps2pd256:
1676 ; X64:       # %bb.0:
1677 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1678 ; X64-NEXT:    vcvtps2pd {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0x99,0x5a,0xc0]
1679 ; X64-NEXT:    retq # encoding: [0xc3]
1680   %ret = call <4 x double> @llvm.x86.avx10.mask.vcvtps2pd256(<4 x float> %b, <4 x double> zeroinitializer, i8 %a, i32 8)
1681   ret <4 x double> %ret
1684 declare <8 x half> @llvm.x86.avx10.mask.vcvtps2phx256(<8 x float>, <8 x half>, i8, i32)
1685 define <8 x half> @test_int_x86_vcvtps2phx256(<8 x float> %a) nounwind {
1686 ; CHECK-LABEL: test_int_x86_vcvtps2phx256:
1687 ; CHECK:       # %bb.0:
1688 ; CHECK-NEXT:    vcvtps2phx {rz-sae}, %ymm0, %xmm0 # encoding: [0x62,0xf5,0x79,0x78,0x1d,0xc0]
1689 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1690 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1691   %ret = call <8 x half> @llvm.x86.avx10.mask.vcvtps2phx256(<8 x float> %a, <8 x half> undef, i8 -1, i32 11)
1692   ret <8 x half> %ret
1695 define <8 x half> @test_int_x86_mask_vcvtps2phx256(<8 x half> %a, i8 %b, <8 x float> %c) nounwind {
1696 ; X86-LABEL: test_int_x86_mask_vcvtps2phx256:
1697 ; X86:       # %bb.0:
1698 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1699 ; X86-NEXT:    vcvtps2phx {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf5,0x79,0x59,0x1d,0xc1]
1700 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1701 ; X86-NEXT:    retl # encoding: [0xc3]
1703 ; X64-LABEL: test_int_x86_mask_vcvtps2phx256:
1704 ; X64:       # %bb.0:
1705 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1706 ; X64-NEXT:    vcvtps2phx {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf5,0x79,0x59,0x1d,0xc1]
1707 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1708 ; X64-NEXT:    retq # encoding: [0xc3]
1709   %ret = call <8 x half> @llvm.x86.avx10.mask.vcvtps2phx256(<8 x float> %c, <8 x half> %a, i8 %b, i32 10)
1710   ret <8 x half> %ret
1713 define <8 x half> @test_int_x86_maskz_vcvtps2phx256(i8 %a, <8 x float> %b) nounwind {
1714 ; X86-LABEL: test_int_x86_maskz_vcvtps2phx256:
1715 ; X86:       # %bb.0:
1716 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1717 ; X86-NEXT:    vcvtps2phx {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0xb9,0x1d,0xc0]
1718 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1719 ; X86-NEXT:    retl # encoding: [0xc3]
1721 ; X64-LABEL: test_int_x86_maskz_vcvtps2phx256:
1722 ; X64:       # %bb.0:
1723 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1724 ; X64-NEXT:    vcvtps2phx {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0xb9,0x1d,0xc0]
1725 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1726 ; X64-NEXT:    retq # encoding: [0xc3]
1727   %ret = call <8 x half> @llvm.x86.avx10.mask.vcvtps2phx256(<8 x float> %b, <8 x half> zeroinitializer, i8 %a, i32 9)
1728   ret <8 x half> %ret
1731 declare <4 x i64> @llvm.x86.avx10.mask.vcvtps2qq256(<4 x float>, <4 x i64>, i8, i32)
1732 define <4 x i64> @test_int_x86_vcvtps2qq256(<4 x float> %a) nounwind {
1733 ; CHECK-LABEL: test_int_x86_vcvtps2qq256:
1734 ; CHECK:       # %bb.0:
1735 ; CHECK-NEXT:    vcvtps2qq {rz-sae}, %xmm0, %ymm0 # encoding: [0x62,0xf1,0x79,0x78,0x7b,0xc0]
1736 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1737   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtps2qq256(<4 x float> %a, <4 x i64> undef, i8 -1, i32 11)
1738   ret <4 x i64> %ret
1741 define <4 x i64> @test_int_x86_mask_vcvtps2qq256(<4 x i64> %a, i8 %b, <4 x float> %c) nounwind {
1742 ; X86-LABEL: test_int_x86_mask_vcvtps2qq256:
1743 ; X86:       # %bb.0:
1744 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1745 ; X86-NEXT:    vcvtps2qq {ru-sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x79,0x59,0x7b,0xc1]
1746 ; X86-NEXT:    retl # encoding: [0xc3]
1748 ; X64-LABEL: test_int_x86_mask_vcvtps2qq256:
1749 ; X64:       # %bb.0:
1750 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1751 ; X64-NEXT:    vcvtps2qq {ru-sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x79,0x59,0x7b,0xc1]
1752 ; X64-NEXT:    retq # encoding: [0xc3]
1753   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtps2qq256(<4 x float> %c, <4 x i64> %a, i8 %b, i32 10)
1754   ret <4 x i64> %ret
1757 define <4 x i64> @test_int_x86_maskz_vcvtps2qq256(i8 %a, <4 x float> %b) nounwind {
1758 ; X86-LABEL: test_int_x86_maskz_vcvtps2qq256:
1759 ; X86:       # %bb.0:
1760 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1761 ; X86-NEXT:    vcvtps2qq {rd-sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x79,0xb9,0x7b,0xc0]
1762 ; X86-NEXT:    retl # encoding: [0xc3]
1764 ; X64-LABEL: test_int_x86_maskz_vcvtps2qq256:
1765 ; X64:       # %bb.0:
1766 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1767 ; X64-NEXT:    vcvtps2qq {rd-sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x79,0xb9,0x7b,0xc0]
1768 ; X64-NEXT:    retq # encoding: [0xc3]
1769   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtps2qq256(<4 x float> %b, <4 x i64> zeroinitializer, i8 %a, i32 9)
1770   ret <4 x i64> %ret
1773 declare <8 x i32> @llvm.x86.avx10.mask.vcvtps2udq256(<8 x float>, <8 x i32>, i8, i32)
1774 define <8 x i32> @test_int_x86_vcvtps2udq256(<8 x float> %a) nounwind {
1775 ; CHECK-LABEL: test_int_x86_vcvtps2udq256:
1776 ; CHECK:       # %bb.0:
1777 ; CHECK-NEXT:    vcvtps2udq {rz-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x78,0x78,0x79,0xc0]
1778 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1779   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvtps2udq256(<8 x float> %a, <8 x i32> undef, i8 -1, i32 11)
1780   ret <8 x i32> %ret
1783 define <8 x i32> @test_int_x86_mask_vcvtps2udq256(<8 x i32> %a, i8 %b, <8 x float> %c) nounwind {
1784 ; X86-LABEL: test_int_x86_mask_vcvtps2udq256:
1785 ; X86:       # %bb.0:
1786 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1787 ; X86-NEXT:    vcvtps2udq {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x78,0x59,0x79,0xc1]
1788 ; X86-NEXT:    retl # encoding: [0xc3]
1790 ; X64-LABEL: test_int_x86_mask_vcvtps2udq256:
1791 ; X64:       # %bb.0:
1792 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1793 ; X64-NEXT:    vcvtps2udq {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x78,0x59,0x79,0xc1]
1794 ; X64-NEXT:    retq # encoding: [0xc3]
1795   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvtps2udq256(<8 x float> %c, <8 x i32> %a, i8 %b, i32 10)
1796   ret <8 x i32> %ret
1799 define <8 x i32> @test_int_x86_maskz_vcvtps2udq256(i8 %a, <8 x float> %b) nounwind {
1800 ; X86-LABEL: test_int_x86_maskz_vcvtps2udq256:
1801 ; X86:       # %bb.0:
1802 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1803 ; X86-NEXT:    vcvtps2udq {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x79,0xc0]
1804 ; X86-NEXT:    retl # encoding: [0xc3]
1806 ; X64-LABEL: test_int_x86_maskz_vcvtps2udq256:
1807 ; X64:       # %bb.0:
1808 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1809 ; X64-NEXT:    vcvtps2udq {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x79,0xc0]
1810 ; X64-NEXT:    retq # encoding: [0xc3]
1811   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvtps2udq256(<8 x float> %b, <8 x i32> zeroinitializer, i8 %a, i32 9)
1812   ret <8 x i32> %ret
1815 declare <4 x i64> @llvm.x86.avx10.mask.vcvtps2uqq256(<4 x float>, <4 x i64>, i8, i32)
1816 define <4 x i64> @test_int_x86_vcvtps2uqq256(<4 x float> %a) nounwind {
1817 ; CHECK-LABEL: test_int_x86_vcvtps2uqq256:
1818 ; CHECK:       # %bb.0:
1819 ; CHECK-NEXT:    vcvtps2uqq {rz-sae}, %xmm0, %ymm0 # encoding: [0x62,0xf1,0x79,0x78,0x79,0xc0]
1820 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1821   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtps2uqq256(<4 x float> %a, <4 x i64> undef, i8 -1, i32 11)
1822   ret <4 x i64> %ret
1825 define <4 x i64> @test_int_x86_mask_vcvtps2uqq256(<4 x i64> %a, i8 %b, <4 x float> %c) nounwind {
1826 ; X86-LABEL: test_int_x86_mask_vcvtps2uqq256:
1827 ; X86:       # %bb.0:
1828 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1829 ; X86-NEXT:    vcvtps2uqq {ru-sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x79,0x59,0x79,0xc1]
1830 ; X86-NEXT:    retl # encoding: [0xc3]
1832 ; X64-LABEL: test_int_x86_mask_vcvtps2uqq256:
1833 ; X64:       # %bb.0:
1834 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1835 ; X64-NEXT:    vcvtps2uqq {ru-sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x79,0x59,0x79,0xc1]
1836 ; X64-NEXT:    retq # encoding: [0xc3]
1837   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtps2uqq256(<4 x float> %c, <4 x i64> %a, i8 %b, i32 10)
1838   ret <4 x i64> %ret
1841 define <4 x i64> @test_int_x86_maskz_vcvtps2uqq256(i8 %a, <4 x float> %b) nounwind {
1842 ; X86-LABEL: test_int_x86_maskz_vcvtps2uqq256:
1843 ; X86:       # %bb.0:
1844 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1845 ; X86-NEXT:    vcvtps2uqq {rd-sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x79,0xb9,0x79,0xc0]
1846 ; X86-NEXT:    retl # encoding: [0xc3]
1848 ; X64-LABEL: test_int_x86_maskz_vcvtps2uqq256:
1849 ; X64:       # %bb.0:
1850 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1851 ; X64-NEXT:    vcvtps2uqq {rd-sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x79,0xb9,0x79,0xc0]
1852 ; X64-NEXT:    retq # encoding: [0xc3]
1853   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvtps2uqq256(<4 x float> %b, <4 x i64> zeroinitializer, i8 %a, i32 9)
1854   ret <4 x i64> %ret
1857 declare <4 x double> @llvm.x86.avx512.sitofp.round.v4f64.v4i64(<4 x i64>, i32)
1858 define <4 x double> @test_int_x86_vcvtqq2pd256(<4 x i64> %a) nounwind {
1859 ; CHECK-LABEL: test_int_x86_vcvtqq2pd256:
1860 ; CHECK:       # %bb.0:
1861 ; CHECK-NEXT:    vcvtqq2pd {rn-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xfa,0x18,0xe6,0xc0]
1862 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1863   %ret = call <4 x double> @llvm.x86.avx512.sitofp.round.v4f64.v4i64(<4 x i64> %a, i32 8)
1864   ret <4 x double> %ret
1867 define <4 x double> @test_int_x86_mask_vcvtqq2pd256(<4 x double> %a, i4 %b, <4 x i64> %c) nounwind {
1868 ; X86-LABEL: test_int_x86_mask_vcvtqq2pd256:
1869 ; X86:       # %bb.0:
1870 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1871 ; X86-NEXT:    vcvtqq2pd {rn-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xfa,0x19,0xe6,0xc1]
1872 ; X86-NEXT:    retl # encoding: [0xc3]
1874 ; X64-LABEL: test_int_x86_mask_vcvtqq2pd256:
1875 ; X64:       # %bb.0:
1876 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1877 ; X64-NEXT:    vcvtqq2pd {rn-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xfa,0x19,0xe6,0xc1]
1878 ; X64-NEXT:    retq # encoding: [0xc3]
1879   %ret0 = call <4 x double> @llvm.x86.avx512.sitofp.round.v4f64.v4i64(<4 x i64> %c, i32 8)
1880   %msk = bitcast i4 %b to <4 x i1>
1881   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> %a
1882   ret <4 x double> %ret
1885 define <4 x double> @test_int_x86_maskz_vcvtqq2pd256(i4 %a, <4 x i64> %b) nounwind {
1886 ; X86-LABEL: test_int_x86_maskz_vcvtqq2pd256:
1887 ; X86:       # %bb.0:
1888 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1889 ; X86-NEXT:    vcvtqq2pd {rn-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xfa,0x99,0xe6,0xc0]
1890 ; X86-NEXT:    retl # encoding: [0xc3]
1892 ; X64-LABEL: test_int_x86_maskz_vcvtqq2pd256:
1893 ; X64:       # %bb.0:
1894 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1895 ; X64-NEXT:    vcvtqq2pd {rn-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xfa,0x99,0xe6,0xc0]
1896 ; X64-NEXT:    retq # encoding: [0xc3]
1897   %ret0 = call <4 x double> @llvm.x86.avx512.sitofp.round.v4f64.v4i64(<4 x i64> %b, i32 8)
1898   %msk = bitcast i4 %a to <4 x i1>
1899   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> zeroinitializer
1900   ret <4 x double> %ret
1903 declare <8 x half> @llvm.x86.avx512.sitofp.round.v8f16.v4i64(<4 x i64>, i32)
1904 define <8 x half> @test_int_x86_vcvtqq2ph256(<4 x i64> %a) nounwind {
1905 ; CHECK-LABEL: test_int_x86_vcvtqq2ph256:
1906 ; CHECK:       # %bb.0:
1907 ; CHECK-NEXT:    vcvtqq2ph {rn-sae}, %ymm0, %xmm0 # encoding: [0x62,0xf5,0xf8,0x18,0x5b,0xc0]
1908 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1909 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1910   %ret = call <8 x half> @llvm.x86.avx512.sitofp.round.v8f16.v4i64(<4 x i64> %a, i32 8)
1911   ret <8 x half> %ret
1914 define <8 x half> @test_int_x86_mask_vcvtqq2ph256(<8 x half> %a, i8 %b, <4 x i64> %c) nounwind {
1915 ; X86-LABEL: test_int_x86_mask_vcvtqq2ph256:
1916 ; X86:       # %bb.0:
1917 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1918 ; X86-NEXT:    vcvtqq2ph {rn-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf5,0xf8,0x19,0x5b,0xc1]
1919 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1920 ; X86-NEXT:    retl # encoding: [0xc3]
1922 ; X64-LABEL: test_int_x86_mask_vcvtqq2ph256:
1923 ; X64:       # %bb.0:
1924 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1925 ; X64-NEXT:    vcvtqq2ph {rn-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf5,0xf8,0x19,0x5b,0xc1]
1926 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1927 ; X64-NEXT:    retq # encoding: [0xc3]
1928   %ret0 = call <8 x half> @llvm.x86.avx512.sitofp.round.v8f16.v4i64(<4 x i64> %c, i32 8)
1929   %msk = bitcast i8 %b to <8 x i1>
1930   %ret = select <8 x i1> %msk, <8 x half> %ret0, <8 x half> %a
1931   ret <8 x half> %ret
1934 define <8 x half> @test_int_x86_maskz_vcvtqq2ph256(i8 %a, <4 x i64> %b) nounwind {
1935 ; X86-LABEL: test_int_x86_maskz_vcvtqq2ph256:
1936 ; X86:       # %bb.0:
1937 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1938 ; X86-NEXT:    vcvtqq2ph {rn-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf5,0xf8,0x99,0x5b,0xc0]
1939 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1940 ; X86-NEXT:    retl # encoding: [0xc3]
1942 ; X64-LABEL: test_int_x86_maskz_vcvtqq2ph256:
1943 ; X64:       # %bb.0:
1944 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1945 ; X64-NEXT:    vcvtqq2ph {rn-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf5,0xf8,0x99,0x5b,0xc0]
1946 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1947 ; X64-NEXT:    retq # encoding: [0xc3]
1948   %ret0 = call <8 x half> @llvm.x86.avx512.sitofp.round.v8f16.v4i64(<4 x i64> %b, i32 8)
1949   %msk = bitcast i8 %a to <8 x i1>
1950   %ret = select <8 x i1> %msk, <8 x half> %ret0, <8 x half> zeroinitializer
1951   ret <8 x half> %ret
1954 declare <4 x float> @llvm.x86.avx512.sitofp.round.v4f32.v4i64(<4 x i64>, i32)
1955 define <4 x float> @test_int_x86_vcvtqq2ps256(<4 x i64> %a) nounwind {
1956 ; CHECK-LABEL: test_int_x86_vcvtqq2ps256:
1957 ; CHECK:       # %bb.0:
1958 ; CHECK-NEXT:    vcvtqq2ps {rn-sae}, %ymm0, %xmm0 # encoding: [0x62,0xf1,0xf8,0x18,0x5b,0xc0]
1959 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1960 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
1961   %ret = call <4 x float> @llvm.x86.avx512.sitofp.round.v4f32.v4i64(<4 x i64> %a, i32 8)
1962   ret <4 x float> %ret
1965 define <4 x float> @test_int_x86_mask_vcvtqq2ps256(<4 x float> %a, i4 %b, <4 x i64> %c) nounwind {
1966 ; X86-LABEL: test_int_x86_mask_vcvtqq2ps256:
1967 ; X86:       # %bb.0:
1968 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1969 ; X86-NEXT:    vcvtqq2ps {rn-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xf8,0x19,0x5b,0xc1]
1970 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1971 ; X86-NEXT:    retl # encoding: [0xc3]
1973 ; X64-LABEL: test_int_x86_mask_vcvtqq2ps256:
1974 ; X64:       # %bb.0:
1975 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1976 ; X64-NEXT:    vcvtqq2ps {rn-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xf8,0x19,0x5b,0xc1]
1977 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1978 ; X64-NEXT:    retq # encoding: [0xc3]
1979   %ret0 = call <4 x float> @llvm.x86.avx512.sitofp.round.v4f32.v4i64(<4 x i64> %c, i32 8)
1980   %msk = bitcast i4 %b to <4 x i1>
1981   %ret = select <4 x i1> %msk, <4 x float> %ret0, <4 x float> %a
1982   ret <4 x float> %ret
1985 define <4 x float> @test_int_x86_maskz_vcvtqq2ps256(i4 %a, <4 x i64> %b) nounwind {
1986 ; X86-LABEL: test_int_x86_maskz_vcvtqq2ps256:
1987 ; X86:       # %bb.0:
1988 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
1989 ; X86-NEXT:    vcvtqq2ps {rn-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xf8,0x99,0x5b,0xc0]
1990 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1991 ; X86-NEXT:    retl # encoding: [0xc3]
1993 ; X64-LABEL: test_int_x86_maskz_vcvtqq2ps256:
1994 ; X64:       # %bb.0:
1995 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
1996 ; X64-NEXT:    vcvtqq2ps {rn-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xf8,0x99,0x5b,0xc0]
1997 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
1998 ; X64-NEXT:    retq # encoding: [0xc3]
1999   %ret0 = call <4 x float> @llvm.x86.avx512.sitofp.round.v4f32.v4i64(<4 x i64> %b, i32 8)
2000   %msk = bitcast i4 %a to <4 x i1>
2001   %ret = select <4 x i1> %msk, <4 x float> %ret0, <4 x float> zeroinitializer
2002   ret <4 x float> %ret
2005 declare <4 x i32> @llvm.x86.avx10.mask.vcvttpd2dq256(<4 x double>, <4 x i32>, i8, i32)
2006 define <4 x i32> @test_int_x86_vcvttpd2dq256(<4 x double> %a) nounwind {
2007 ; CHECK-LABEL: test_int_x86_vcvttpd2dq256:
2008 ; CHECK:       # %bb.0:
2009 ; CHECK-NEXT:    vcvttpd2dq {sae}, %ymm0, %xmm0 # encoding: [0x62,0xf1,0xf9,0x18,0xe6,0xc0]
2010 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2011 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2012   %ret = call <4 x i32> @llvm.x86.avx10.mask.vcvttpd2dq256(<4 x double> %a, <4 x i32> undef, i8 -1, i32 8)
2013   ret <4 x i32> %ret
2016 define <4 x i32> @test_int_x86_mask_vcvttpd2dq256(<4 x i32> %a, i8 %b, <4 x double> %c) nounwind {
2017 ; X86-LABEL: test_int_x86_mask_vcvttpd2dq256:
2018 ; X86:       # %bb.0:
2019 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2020 ; X86-NEXT:    vcvttpd2dq {sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x19,0xe6,0xc1]
2021 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2022 ; X86-NEXT:    retl # encoding: [0xc3]
2024 ; X64-LABEL: test_int_x86_mask_vcvttpd2dq256:
2025 ; X64:       # %bb.0:
2026 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2027 ; X64-NEXT:    vcvttpd2dq {sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x19,0xe6,0xc1]
2028 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2029 ; X64-NEXT:    retq # encoding: [0xc3]
2030   %ret = call <4 x i32> @llvm.x86.avx10.mask.vcvttpd2dq256(<4 x double> %c, <4 x i32> %a, i8 %b, i32 8)
2031   ret <4 x i32> %ret
2034 define <4 x i32> @test_int_x86_maskz_vcvttpd2dq256(i8 %a, <4 x double> %b) nounwind {
2035 ; X86-LABEL: test_int_x86_maskz_vcvttpd2dq256:
2036 ; X86:       # %bb.0:
2037 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2038 ; X86-NEXT:    vcvttpd2dq {sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0x99,0xe6,0xc0]
2039 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2040 ; X86-NEXT:    retl # encoding: [0xc3]
2042 ; X64-LABEL: test_int_x86_maskz_vcvttpd2dq256:
2043 ; X64:       # %bb.0:
2044 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2045 ; X64-NEXT:    vcvttpd2dq {sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0x99,0xe6,0xc0]
2046 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2047 ; X64-NEXT:    retq # encoding: [0xc3]
2048   %ret = call <4 x i32> @llvm.x86.avx10.mask.vcvttpd2dq256(<4 x double> %b, <4 x i32> zeroinitializer, i8 %a, i32 8)
2049   ret <4 x i32> %ret
2052 declare <4 x i64> @llvm.x86.avx10.mask.vcvttpd2qq256(<4 x double>, <4 x i64>, i8, i32)
2053 define <4 x i64> @test_int_x86_vcvttpd2qq256(<4 x double> %a) nounwind {
2054 ; CHECK-LABEL: test_int_x86_vcvttpd2qq256:
2055 ; CHECK:       # %bb.0:
2056 ; CHECK-NEXT:    vcvttpd2qq {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xf9,0x18,0x7a,0xc0]
2057 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2058   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttpd2qq256(<4 x double> %a, <4 x i64> undef, i8 -1, i32 8)
2059   ret <4 x i64> %ret
2062 define <4 x i64> @test_int_x86_mask_vcvttpd2qq256(<4 x i64> %a, i8 %b, <4 x double> %c) nounwind {
2063 ; X86-LABEL: test_int_x86_mask_vcvttpd2qq256:
2064 ; X86:       # %bb.0:
2065 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2066 ; X86-NEXT:    vcvttpd2qq {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x19,0x7a,0xc1]
2067 ; X86-NEXT:    retl # encoding: [0xc3]
2069 ; X64-LABEL: test_int_x86_mask_vcvttpd2qq256:
2070 ; X64:       # %bb.0:
2071 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2072 ; X64-NEXT:    vcvttpd2qq {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x19,0x7a,0xc1]
2073 ; X64-NEXT:    retq # encoding: [0xc3]
2074   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttpd2qq256(<4 x double> %c, <4 x i64> %a, i8 %b, i32 8)
2075   ret <4 x i64> %ret
2078 define <4 x i64> @test_int_x86_maskz_vcvttpd2qq256(i8 %a, <4 x double> %b) nounwind {
2079 ; X86-LABEL: test_int_x86_maskz_vcvttpd2qq256:
2080 ; X86:       # %bb.0:
2081 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2082 ; X86-NEXT:    vcvttpd2qq {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0x99,0x7a,0xc0]
2083 ; X86-NEXT:    retl # encoding: [0xc3]
2085 ; X64-LABEL: test_int_x86_maskz_vcvttpd2qq256:
2086 ; X64:       # %bb.0:
2087 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2088 ; X64-NEXT:    vcvttpd2qq {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0x99,0x7a,0xc0]
2089 ; X64-NEXT:    retq # encoding: [0xc3]
2090   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttpd2qq256(<4 x double> %b, <4 x i64> zeroinitializer, i8 %a, i32 8)
2091   ret <4 x i64> %ret
2094 declare <4 x i32> @llvm.x86.avx10.mask.vcvttpd2udq256(<4 x double>, <4 x i32>, i8, i32)
2095 define <4 x i32> @test_int_x86_vcvttpd2udq256(<4 x double> %a) nounwind {
2096 ; CHECK-LABEL: test_int_x86_vcvttpd2udq256:
2097 ; CHECK:       # %bb.0:
2098 ; CHECK-NEXT:    vcvttpd2udq {sae}, %ymm0, %xmm0 # encoding: [0x62,0xf1,0xf8,0x18,0x78,0xc0]
2099 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2100 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2101   %ret = call <4 x i32> @llvm.x86.avx10.mask.vcvttpd2udq256(<4 x double> %a, <4 x i32> undef, i8 -1, i32 8)
2102   ret <4 x i32> %ret
2105 define <4 x i32> @test_int_x86_mask_vcvttpd2udq256(<4 x i32> %a, i8 %b, <4 x double> %c) nounwind {
2106 ; X86-LABEL: test_int_x86_mask_vcvttpd2udq256:
2107 ; X86:       # %bb.0:
2108 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2109 ; X86-NEXT:    vcvttpd2udq {sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xf8,0x19,0x78,0xc1]
2110 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2111 ; X86-NEXT:    retl # encoding: [0xc3]
2113 ; X64-LABEL: test_int_x86_mask_vcvttpd2udq256:
2114 ; X64:       # %bb.0:
2115 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2116 ; X64-NEXT:    vcvttpd2udq {sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xf8,0x19,0x78,0xc1]
2117 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2118 ; X64-NEXT:    retq # encoding: [0xc3]
2119   %ret = call <4 x i32> @llvm.x86.avx10.mask.vcvttpd2udq256(<4 x double> %c, <4 x i32> %a, i8 %b, i32 8)
2120   ret <4 x i32> %ret
2123 define <4 x i32> @test_int_x86_maskz_vcvttpd2udq256(i8 %a, <4 x double> %b) nounwind {
2124 ; X86-LABEL: test_int_x86_maskz_vcvttpd2udq256:
2125 ; X86:       # %bb.0:
2126 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2127 ; X86-NEXT:    vcvttpd2udq {sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xf8,0x99,0x78,0xc0]
2128 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2129 ; X86-NEXT:    retl # encoding: [0xc3]
2131 ; X64-LABEL: test_int_x86_maskz_vcvttpd2udq256:
2132 ; X64:       # %bb.0:
2133 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2134 ; X64-NEXT:    vcvttpd2udq {sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xf8,0x99,0x78,0xc0]
2135 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2136 ; X64-NEXT:    retq # encoding: [0xc3]
2137   %ret = call <4 x i32> @llvm.x86.avx10.mask.vcvttpd2udq256(<4 x double> %b, <4 x i32> zeroinitializer, i8 %a, i32 8)
2138   ret <4 x i32> %ret
2141 declare <4 x i64> @llvm.x86.avx10.mask.vcvttpd2uqq256(<4 x double>, <4 x i64>, i8, i32)
2142 define <4 x i64> @test_int_x86_vcvttpd2uqq256(<4 x double> %a) nounwind {
2143 ; CHECK-LABEL: test_int_x86_vcvttpd2uqq256:
2144 ; CHECK:       # %bb.0:
2145 ; CHECK-NEXT:    vcvttpd2uqq {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xf9,0x18,0x78,0xc0]
2146 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2147   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttpd2uqq256(<4 x double> %a, <4 x i64> undef, i8 -1, i32 8)
2148   ret <4 x i64> %ret
2151 define <4 x i64> @test_int_x86_mask_vcvttpd2uqq256(<4 x i64> %a, i8 %b, <4 x double> %c) nounwind {
2152 ; X86-LABEL: test_int_x86_mask_vcvttpd2uqq256:
2153 ; X86:       # %bb.0:
2154 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2155 ; X86-NEXT:    vcvttpd2uqq {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x19,0x78,0xc1]
2156 ; X86-NEXT:    retl # encoding: [0xc3]
2158 ; X64-LABEL: test_int_x86_mask_vcvttpd2uqq256:
2159 ; X64:       # %bb.0:
2160 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2161 ; X64-NEXT:    vcvttpd2uqq {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x19,0x78,0xc1]
2162 ; X64-NEXT:    retq # encoding: [0xc3]
2163   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttpd2uqq256(<4 x double> %c, <4 x i64> %a, i8 %b, i32 8)
2164   ret <4 x i64> %ret
2167 define <4 x i64> @test_int_x86_maskz_vcvttpd2uqq256(i8 %a, <4 x double> %b) nounwind {
2168 ; X86-LABEL: test_int_x86_maskz_vcvttpd2uqq256:
2169 ; X86:       # %bb.0:
2170 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2171 ; X86-NEXT:    vcvttpd2uqq {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0x99,0x78,0xc0]
2172 ; X86-NEXT:    retl # encoding: [0xc3]
2174 ; X64-LABEL: test_int_x86_maskz_vcvttpd2uqq256:
2175 ; X64:       # %bb.0:
2176 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2177 ; X64-NEXT:    vcvttpd2uqq {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0x99,0x78,0xc0]
2178 ; X64-NEXT:    retq # encoding: [0xc3]
2179   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttpd2uqq256(<4 x double> %b, <4 x i64> zeroinitializer, i8 %a, i32 8)
2180   ret <4 x i64> %ret
2183 declare <8 x i32> @llvm.x86.avx10.mask.vcvttph2dq256(<8 x half>, <8 x i32>, i8, i32)
2184 define <8 x i32> @test_int_x86_vcvttph2dq256(<8 x half> %a) nounwind {
2185 ; CHECK-LABEL: test_int_x86_vcvttph2dq256:
2186 ; CHECK:       # %bb.0:
2187 ; CHECK-NEXT:    vcvttph2dq {sae}, %xmm0, %ymm0 # encoding: [0x62,0xf5,0x7a,0x18,0x5b,0xc0]
2188 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2189   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvttph2dq256(<8 x half> %a, <8 x i32> undef, i8 -1, i32 8)
2190   ret <8 x i32> %ret
2193 define <8 x i32> @test_int_x86_mask_vcvttph2dq256(<8 x i32> %a, i8 %b, <8 x half> %c) nounwind {
2194 ; X86-LABEL: test_int_x86_mask_vcvttph2dq256:
2195 ; X86:       # %bb.0:
2196 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2197 ; X86-NEXT:    vcvttph2dq {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x7a,0x19,0x5b,0xc1]
2198 ; X86-NEXT:    retl # encoding: [0xc3]
2200 ; X64-LABEL: test_int_x86_mask_vcvttph2dq256:
2201 ; X64:       # %bb.0:
2202 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2203 ; X64-NEXT:    vcvttph2dq {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x7a,0x19,0x5b,0xc1]
2204 ; X64-NEXT:    retq # encoding: [0xc3]
2205   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvttph2dq256(<8 x half> %c, <8 x i32> %a, i8 %b, i32 8)
2206   ret <8 x i32> %ret
2209 define <8 x i32> @test_int_x86_maskz_vcvttph2dq256(i8 %a, <8 x half> %b) nounwind {
2210 ; X86-LABEL: test_int_x86_maskz_vcvttph2dq256:
2211 ; X86:       # %bb.0:
2212 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2213 ; X86-NEXT:    vcvttph2dq {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x7a,0x99,0x5b,0xc0]
2214 ; X86-NEXT:    retl # encoding: [0xc3]
2216 ; X64-LABEL: test_int_x86_maskz_vcvttph2dq256:
2217 ; X64:       # %bb.0:
2218 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2219 ; X64-NEXT:    vcvttph2dq {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x7a,0x99,0x5b,0xc0]
2220 ; X64-NEXT:    retq # encoding: [0xc3]
2221   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvttph2dq256(<8 x half> %b, <8 x i32> zeroinitializer, i8 %a, i32 8)
2222   ret <8 x i32> %ret
2225 declare <4 x i64> @llvm.x86.avx10.mask.vcvttph2qq256(<8 x half>, <4 x i64>, i8, i32)
2226 define <4 x i64> @test_int_x86_vcvttph2qq256(<8 x half> %a) nounwind {
2227 ; CHECK-LABEL: test_int_x86_vcvttph2qq256:
2228 ; CHECK:       # %bb.0:
2229 ; CHECK-NEXT:    vcvttph2qq {sae}, %xmm0, %ymm0 # encoding: [0x62,0xf5,0x79,0x18,0x7a,0xc0]
2230 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2231   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttph2qq256(<8 x half> %a, <4 x i64> undef, i8 -1, i32 8)
2232   ret <4 x i64> %ret
2235 define <4 x i64> @test_int_x86_mask_vcvttph2qq256(<4 x i64> %a, i8 %b, <8 x half> %c) nounwind {
2236 ; X86-LABEL: test_int_x86_mask_vcvttph2qq256:
2237 ; X86:       # %bb.0:
2238 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2239 ; X86-NEXT:    vcvttph2qq {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x19,0x7a,0xc1]
2240 ; X86-NEXT:    retl # encoding: [0xc3]
2242 ; X64-LABEL: test_int_x86_mask_vcvttph2qq256:
2243 ; X64:       # %bb.0:
2244 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2245 ; X64-NEXT:    vcvttph2qq {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x19,0x7a,0xc1]
2246 ; X64-NEXT:    retq # encoding: [0xc3]
2247   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttph2qq256(<8 x half> %c, <4 x i64> %a, i8 %b, i32 8)
2248   ret <4 x i64> %ret
2251 define <4 x i64> @test_int_x86_maskz_vcvttph2qq256(i8 %a, <8 x half> %b) nounwind {
2252 ; X86-LABEL: test_int_x86_maskz_vcvttph2qq256:
2253 ; X86:       # %bb.0:
2254 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2255 ; X86-NEXT:    vcvttph2qq {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0x99,0x7a,0xc0]
2256 ; X86-NEXT:    retl # encoding: [0xc3]
2258 ; X64-LABEL: test_int_x86_maskz_vcvttph2qq256:
2259 ; X64:       # %bb.0:
2260 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2261 ; X64-NEXT:    vcvttph2qq {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0x99,0x7a,0xc0]
2262 ; X64-NEXT:    retq # encoding: [0xc3]
2263   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttph2qq256(<8 x half> %b, <4 x i64> zeroinitializer, i8 %a, i32 8)
2264   ret <4 x i64> %ret
2267 declare <8 x i32> @llvm.x86.avx10.mask.vcvttph2udq256(<8 x half>, <8 x i32>, i8, i32)
2268 define <8 x i32> @test_int_x86_vcvttph2udq256(<8 x half> %a) nounwind {
2269 ; CHECK-LABEL: test_int_x86_vcvttph2udq256:
2270 ; CHECK:       # %bb.0:
2271 ; CHECK-NEXT:    vcvttph2udq {sae}, %xmm0, %ymm0 # encoding: [0x62,0xf5,0x78,0x18,0x78,0xc0]
2272 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2273   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvttph2udq256(<8 x half> %a, <8 x i32> undef, i8 -1, i32 8)
2274   ret <8 x i32> %ret
2277 define <8 x i32> @test_int_x86_mask_vcvttph2udq256(<8 x i32> %a, i8 %b, <8 x half> %c) nounwind {
2278 ; X86-LABEL: test_int_x86_mask_vcvttph2udq256:
2279 ; X86:       # %bb.0:
2280 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2281 ; X86-NEXT:    vcvttph2udq {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x78,0x19,0x78,0xc1]
2282 ; X86-NEXT:    retl # encoding: [0xc3]
2284 ; X64-LABEL: test_int_x86_mask_vcvttph2udq256:
2285 ; X64:       # %bb.0:
2286 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2287 ; X64-NEXT:    vcvttph2udq {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x78,0x19,0x78,0xc1]
2288 ; X64-NEXT:    retq # encoding: [0xc3]
2289   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvttph2udq256(<8 x half> %c, <8 x i32> %a, i8 %b, i32 8)
2290   ret <8 x i32> %ret
2293 define <8 x i32> @test_int_x86_maskz_vcvttph2udq256(i8 %a, <8 x half> %b) nounwind {
2294 ; X86-LABEL: test_int_x86_maskz_vcvttph2udq256:
2295 ; X86:       # %bb.0:
2296 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2297 ; X86-NEXT:    vcvttph2udq {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0x99,0x78,0xc0]
2298 ; X86-NEXT:    retl # encoding: [0xc3]
2300 ; X64-LABEL: test_int_x86_maskz_vcvttph2udq256:
2301 ; X64:       # %bb.0:
2302 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2303 ; X64-NEXT:    vcvttph2udq {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0x99,0x78,0xc0]
2304 ; X64-NEXT:    retq # encoding: [0xc3]
2305   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvttph2udq256(<8 x half> %b, <8 x i32> zeroinitializer, i8 %a, i32 8)
2306   ret <8 x i32> %ret
2309 declare <4 x i64> @llvm.x86.avx10.mask.vcvttph2uqq256(<8 x half>, <4 x i64>, i8, i32)
2310 define <4 x i64> @test_int_x86_vcvttph2uqq256(<8 x half> %a) nounwind {
2311 ; CHECK-LABEL: test_int_x86_vcvttph2uqq256:
2312 ; CHECK:       # %bb.0:
2313 ; CHECK-NEXT:    vcvttph2uqq {sae}, %xmm0, %ymm0 # encoding: [0x62,0xf5,0x79,0x18,0x78,0xc0]
2314 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2315   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttph2uqq256(<8 x half> %a, <4 x i64> undef, i8 -1, i32 8)
2316   ret <4 x i64> %ret
2319 define <4 x i64> @test_int_x86_mask_vcvttph2uqq256(<4 x i64> %a, i8 %b, <8 x half> %c) nounwind {
2320 ; X86-LABEL: test_int_x86_mask_vcvttph2uqq256:
2321 ; X86:       # %bb.0:
2322 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2323 ; X86-NEXT:    vcvttph2uqq {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x19,0x78,0xc1]
2324 ; X86-NEXT:    retl # encoding: [0xc3]
2326 ; X64-LABEL: test_int_x86_mask_vcvttph2uqq256:
2327 ; X64:       # %bb.0:
2328 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2329 ; X64-NEXT:    vcvttph2uqq {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x19,0x78,0xc1]
2330 ; X64-NEXT:    retq # encoding: [0xc3]
2331   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttph2uqq256(<8 x half> %c, <4 x i64> %a, i8 %b, i32 8)
2332   ret <4 x i64> %ret
2335 define <4 x i64> @test_int_x86_maskz_vcvttph2uqq256(i8 %a, <8 x half> %b) nounwind {
2336 ; X86-LABEL: test_int_x86_maskz_vcvttph2uqq256:
2337 ; X86:       # %bb.0:
2338 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2339 ; X86-NEXT:    vcvttph2uqq {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0x99,0x78,0xc0]
2340 ; X86-NEXT:    retl # encoding: [0xc3]
2342 ; X64-LABEL: test_int_x86_maskz_vcvttph2uqq256:
2343 ; X64:       # %bb.0:
2344 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2345 ; X64-NEXT:    vcvttph2uqq {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0x99,0x78,0xc0]
2346 ; X64-NEXT:    retq # encoding: [0xc3]
2347   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttph2uqq256(<8 x half> %b, <4 x i64> zeroinitializer, i8 %a, i32 8)
2348   ret <4 x i64> %ret
2351 declare <16 x i16> @llvm.x86.avx10.mask.vcvttph2uw256(<16 x half>, <16 x i16>, i16, i32)
2352 define <16 x i16> @test_int_x86_vcvttph2uw256(<16 x half> %a) nounwind {
2353 ; CHECK-LABEL: test_int_x86_vcvttph2uw256:
2354 ; CHECK:       # %bb.0:
2355 ; CHECK-NEXT:    vcvttph2uw {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x78,0x18,0x7c,0xc0]
2356 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2357   %ret = call <16 x i16> @llvm.x86.avx10.mask.vcvttph2uw256(<16 x half> %a, <16 x i16> undef, i16 -1, i32 8)
2358   ret <16 x i16> %ret
2361 define <16 x i16> @test_int_x86_mask_vcvttph2uw256(<16 x i16> %a, i16 %b, <16 x half> %c) nounwind {
2362 ; X86-LABEL: test_int_x86_mask_vcvttph2uw256:
2363 ; X86:       # %bb.0:
2364 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
2365 ; X86-NEXT:    vcvttph2uw {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x78,0x19,0x7c,0xc1]
2366 ; X86-NEXT:    retl # encoding: [0xc3]
2368 ; X64-LABEL: test_int_x86_mask_vcvttph2uw256:
2369 ; X64:       # %bb.0:
2370 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2371 ; X64-NEXT:    vcvttph2uw {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x78,0x19,0x7c,0xc1]
2372 ; X64-NEXT:    retq # encoding: [0xc3]
2373   %ret = call <16 x i16> @llvm.x86.avx10.mask.vcvttph2uw256(<16 x half> %c, <16 x i16> %a, i16 %b, i32 8)
2374   ret <16 x i16> %ret
2377 define <16 x i16> @test_int_x86_maskz_vcvttph2uw256(i16 %a, <16 x half> %b) nounwind {
2378 ; X86-LABEL: test_int_x86_maskz_vcvttph2uw256:
2379 ; X86:       # %bb.0:
2380 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
2381 ; X86-NEXT:    vcvttph2uw {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0x99,0x7c,0xc0]
2382 ; X86-NEXT:    retl # encoding: [0xc3]
2384 ; X64-LABEL: test_int_x86_maskz_vcvttph2uw256:
2385 ; X64:       # %bb.0:
2386 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2387 ; X64-NEXT:    vcvttph2uw {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0x99,0x7c,0xc0]
2388 ; X64-NEXT:    retq # encoding: [0xc3]
2389   %ret = call <16 x i16> @llvm.x86.avx10.mask.vcvttph2uw256(<16 x half> %b, <16 x i16> zeroinitializer, i16 %a, i32 8)
2390   ret <16 x i16> %ret
2393 declare <16 x i16> @llvm.x86.avx10.mask.vcvttph2w256(<16 x half>, <16 x i16>, i16, i32)
2394 define <16 x i16> @test_int_x86_vcvttph2w256(<16 x half> %a) nounwind {
2395 ; CHECK-LABEL: test_int_x86_vcvttph2w256:
2396 ; CHECK:       # %bb.0:
2397 ; CHECK-NEXT:    vcvttph2w {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x79,0x18,0x7c,0xc0]
2398 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2399   %ret = call <16 x i16> @llvm.x86.avx10.mask.vcvttph2w256(<16 x half> %a, <16 x i16> undef, i16 -1, i32 8)
2400   ret <16 x i16> %ret
2403 define <16 x i16> @test_int_x86_mask_vcvttph2w256(<16 x i16> %a, i16 %b, <16 x half> %c) nounwind {
2404 ; X86-LABEL: test_int_x86_mask_vcvttph2w256:
2405 ; X86:       # %bb.0:
2406 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
2407 ; X86-NEXT:    vcvttph2w {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x19,0x7c,0xc1]
2408 ; X86-NEXT:    retl # encoding: [0xc3]
2410 ; X64-LABEL: test_int_x86_mask_vcvttph2w256:
2411 ; X64:       # %bb.0:
2412 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2413 ; X64-NEXT:    vcvttph2w {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x79,0x19,0x7c,0xc1]
2414 ; X64-NEXT:    retq # encoding: [0xc3]
2415   %ret = call <16 x i16> @llvm.x86.avx10.mask.vcvttph2w256(<16 x half> %c, <16 x i16> %a, i16 %b, i32 8)
2416   ret <16 x i16> %ret
2419 define <16 x i16> @test_int_x86_maskz_vcvttph2w256(i16 %a, <16 x half> %b) nounwind {
2420 ; X86-LABEL: test_int_x86_maskz_vcvttph2w256:
2421 ; X86:       # %bb.0:
2422 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
2423 ; X86-NEXT:    vcvttph2w {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0x99,0x7c,0xc0]
2424 ; X86-NEXT:    retl # encoding: [0xc3]
2426 ; X64-LABEL: test_int_x86_maskz_vcvttph2w256:
2427 ; X64:       # %bb.0:
2428 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2429 ; X64-NEXT:    vcvttph2w {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x79,0x99,0x7c,0xc0]
2430 ; X64-NEXT:    retq # encoding: [0xc3]
2431   %ret = call <16 x i16> @llvm.x86.avx10.mask.vcvttph2w256(<16 x half> %b, <16 x i16> zeroinitializer, i16 %a, i32 8)
2432   ret <16 x i16> %ret
2435 declare <8 x i32> @llvm.x86.avx10.mask.vcvttps2dq256(<8 x float>, <8 x i32>, i8, i32)
2436 define <8 x i32> @test_int_x86_vcvttps2dq256(<8 x float> %a) nounwind {
2437 ; CHECK-LABEL: test_int_x86_vcvttps2dq256:
2438 ; CHECK:       # %bb.0:
2439 ; CHECK-NEXT:    vcvttps2dq {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x7a,0x18,0x5b,0xc0]
2440 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2441   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvttps2dq256(<8 x float> %a, <8 x i32> undef, i8 -1, i32 8)
2442   ret <8 x i32> %ret
2445 define <8 x i32> @test_int_x86_mask_vcvttps2dq256(<8 x i32> %a, i8 %b, <8 x float> %c) nounwind {
2446 ; X86-LABEL: test_int_x86_mask_vcvttps2dq256:
2447 ; X86:       # %bb.0:
2448 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2449 ; X86-NEXT:    vcvttps2dq {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x7a,0x19,0x5b,0xc1]
2450 ; X86-NEXT:    retl # encoding: [0xc3]
2452 ; X64-LABEL: test_int_x86_mask_vcvttps2dq256:
2453 ; X64:       # %bb.0:
2454 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2455 ; X64-NEXT:    vcvttps2dq {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x7a,0x19,0x5b,0xc1]
2456 ; X64-NEXT:    retq # encoding: [0xc3]
2457   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvttps2dq256(<8 x float> %c, <8 x i32> %a, i8 %b, i32 8)
2458   ret <8 x i32> %ret
2461 define <8 x i32> @test_int_x86_maskz_vcvttps2dq256(i8 %a, <8 x float> %b) nounwind {
2462 ; X86-LABEL: test_int_x86_maskz_vcvttps2dq256:
2463 ; X86:       # %bb.0:
2464 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2465 ; X86-NEXT:    vcvttps2dq {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x7a,0x99,0x5b,0xc0]
2466 ; X86-NEXT:    retl # encoding: [0xc3]
2468 ; X64-LABEL: test_int_x86_maskz_vcvttps2dq256:
2469 ; X64:       # %bb.0:
2470 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2471 ; X64-NEXT:    vcvttps2dq {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x7a,0x99,0x5b,0xc0]
2472 ; X64-NEXT:    retq # encoding: [0xc3]
2473   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvttps2dq256(<8 x float> %b, <8 x i32> zeroinitializer, i8 %a, i32 8)
2474   ret <8 x i32> %ret
2477 declare <4 x i64> @llvm.x86.avx10.mask.vcvttps2qq256(<4 x float>, <4 x i64>, i8, i32)
2478 define <4 x i64> @test_int_x86_vcvttps2qq256(<4 x float> %a) nounwind {
2479 ; CHECK-LABEL: test_int_x86_vcvttps2qq256:
2480 ; CHECK:       # %bb.0:
2481 ; CHECK-NEXT:    vcvttps2qq {sae}, %xmm0, %ymm0 # encoding: [0x62,0xf1,0x79,0x18,0x7a,0xc0]
2482 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2483   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttps2qq256(<4 x float> %a, <4 x i64> undef, i8 -1, i32 8)
2484   ret <4 x i64> %ret
2487 define <4 x i64> @test_int_x86_mask_vcvttps2qq256(<4 x i64> %a, i8 %b, <4 x float> %c) nounwind {
2488 ; X86-LABEL: test_int_x86_mask_vcvttps2qq256:
2489 ; X86:       # %bb.0:
2490 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2491 ; X86-NEXT:    vcvttps2qq {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x79,0x19,0x7a,0xc1]
2492 ; X86-NEXT:    retl # encoding: [0xc3]
2494 ; X64-LABEL: test_int_x86_mask_vcvttps2qq256:
2495 ; X64:       # %bb.0:
2496 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2497 ; X64-NEXT:    vcvttps2qq {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x79,0x19,0x7a,0xc1]
2498 ; X64-NEXT:    retq # encoding: [0xc3]
2499   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttps2qq256(<4 x float> %c, <4 x i64> %a, i8 %b, i32 8)
2500   ret <4 x i64> %ret
2503 define <4 x i64> @test_int_x86_maskz_vcvttps2qq256(i8 %a, <4 x float> %b) nounwind {
2504 ; X86-LABEL: test_int_x86_maskz_vcvttps2qq256:
2505 ; X86:       # %bb.0:
2506 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2507 ; X86-NEXT:    vcvttps2qq {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x79,0x99,0x7a,0xc0]
2508 ; X86-NEXT:    retl # encoding: [0xc3]
2510 ; X64-LABEL: test_int_x86_maskz_vcvttps2qq256:
2511 ; X64:       # %bb.0:
2512 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2513 ; X64-NEXT:    vcvttps2qq {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x79,0x99,0x7a,0xc0]
2514 ; X64-NEXT:    retq # encoding: [0xc3]
2515   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttps2qq256(<4 x float> %b, <4 x i64> zeroinitializer, i8 %a, i32 8)
2516   ret <4 x i64> %ret
2519 declare <8 x i32> @llvm.x86.avx10.mask.vcvttps2udq256(<8 x float>, <8 x i32>, i8, i32)
2520 define <8 x i32> @test_int_x86_vcvttps2udq256(<8 x float> %a) nounwind {
2521 ; CHECK-LABEL: test_int_x86_vcvttps2udq256:
2522 ; CHECK:       # %bb.0:
2523 ; CHECK-NEXT:    vcvttps2udq {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x78,0x18,0x78,0xc0]
2524 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2525   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvttps2udq256(<8 x float> %a, <8 x i32> undef, i8 -1, i32 8)
2526   ret <8 x i32> %ret
2529 define <8 x i32> @test_int_x86_mask_vcvttps2udq256(<8 x i32> %a, i8 %b, <8 x float> %c) nounwind {
2530 ; X86-LABEL: test_int_x86_mask_vcvttps2udq256:
2531 ; X86:       # %bb.0:
2532 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2533 ; X86-NEXT:    vcvttps2udq {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x78,0x19,0x78,0xc1]
2534 ; X86-NEXT:    retl # encoding: [0xc3]
2536 ; X64-LABEL: test_int_x86_mask_vcvttps2udq256:
2537 ; X64:       # %bb.0:
2538 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2539 ; X64-NEXT:    vcvttps2udq {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x78,0x19,0x78,0xc1]
2540 ; X64-NEXT:    retq # encoding: [0xc3]
2541   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvttps2udq256(<8 x float> %c, <8 x i32> %a, i8 %b, i32 8)
2542   ret <8 x i32> %ret
2545 define <8 x i32> @test_int_x86_maskz_vcvttps2udq256(i8 %a, <8 x float> %b) nounwind {
2546 ; X86-LABEL: test_int_x86_maskz_vcvttps2udq256:
2547 ; X86:       # %bb.0:
2548 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2549 ; X86-NEXT:    vcvttps2udq {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0x99,0x78,0xc0]
2550 ; X86-NEXT:    retl # encoding: [0xc3]
2552 ; X64-LABEL: test_int_x86_maskz_vcvttps2udq256:
2553 ; X64:       # %bb.0:
2554 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2555 ; X64-NEXT:    vcvttps2udq {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0x99,0x78,0xc0]
2556 ; X64-NEXT:    retq # encoding: [0xc3]
2557   %ret = call <8 x i32> @llvm.x86.avx10.mask.vcvttps2udq256(<8 x float> %b, <8 x i32> zeroinitializer, i8 %a, i32 8)
2558   ret <8 x i32> %ret
2561 declare <4 x i64> @llvm.x86.avx10.mask.vcvttps2uqq256(<4 x float>, <4 x i64>, i8, i32)
2562 define <4 x i64> @test_int_x86_vcvttps2uqq256(<4 x float> %a) nounwind {
2563 ; CHECK-LABEL: test_int_x86_vcvttps2uqq256:
2564 ; CHECK:       # %bb.0:
2565 ; CHECK-NEXT:    vcvttps2uqq {sae}, %xmm0, %ymm0 # encoding: [0x62,0xf1,0x79,0x18,0x78,0xc0]
2566 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2567   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttps2uqq256(<4 x float> %a, <4 x i64> undef, i8 -1, i32 8)
2568   ret <4 x i64> %ret
2571 define <4 x i64> @test_int_x86_mask_vcvttps2uqq256(<4 x i64> %a, i8 %b, <4 x float> %c) nounwind {
2572 ; X86-LABEL: test_int_x86_mask_vcvttps2uqq256:
2573 ; X86:       # %bb.0:
2574 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2575 ; X86-NEXT:    vcvttps2uqq {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x79,0x19,0x78,0xc1]
2576 ; X86-NEXT:    retl # encoding: [0xc3]
2578 ; X64-LABEL: test_int_x86_mask_vcvttps2uqq256:
2579 ; X64:       # %bb.0:
2580 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2581 ; X64-NEXT:    vcvttps2uqq {sae}, %xmm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x79,0x19,0x78,0xc1]
2582 ; X64-NEXT:    retq # encoding: [0xc3]
2583   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttps2uqq256(<4 x float> %c, <4 x i64> %a, i8 %b, i32 8)
2584   ret <4 x i64> %ret
2587 define <4 x i64> @test_int_x86_maskz_vcvttps2uqq256(i8 %a, <4 x float> %b) nounwind {
2588 ; X86-LABEL: test_int_x86_maskz_vcvttps2uqq256:
2589 ; X86:       # %bb.0:
2590 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2591 ; X86-NEXT:    vcvttps2uqq {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x79,0x99,0x78,0xc0]
2592 ; X86-NEXT:    retl # encoding: [0xc3]
2594 ; X64-LABEL: test_int_x86_maskz_vcvttps2uqq256:
2595 ; X64:       # %bb.0:
2596 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2597 ; X64-NEXT:    vcvttps2uqq {sae}, %xmm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x79,0x99,0x78,0xc0]
2598 ; X64-NEXT:    retq # encoding: [0xc3]
2599   %ret = call <4 x i64> @llvm.x86.avx10.mask.vcvttps2uqq256(<4 x float> %b, <4 x i64> zeroinitializer, i8 %a, i32 8)
2600   ret <4 x i64> %ret
2603 declare <8 x half> @llvm.x86.avx512.uitofp.round.v8f16.v8i32(<8 x i32>, i32)
2604 define <8 x half> @test_int_x86_vcvtudq2ph256(<8 x i32> %A) nounwind {
2605 ; CHECK-LABEL: test_int_x86_vcvtudq2ph256:
2606 ; CHECK:       # %bb.0:
2607 ; CHECK-NEXT:    vcvtudq2ph {rz-sae}, %ymm0, %xmm0 # encoding: [0x62,0xf5,0x7b,0x78,0x7a,0xc0]
2608 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2609 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2610   %ret = call <8 x half> @llvm.x86.avx512.uitofp.round.v8f16.v8i32(<8 x i32> %A, i32 11)
2611   ret <8 x half> %ret
2614 define <8 x half> @test_int_x86_mask_vcvtudq2ph256(<8 x half> %A, i8 %B, <8 x i32> %C) nounwind {
2615 ; X86-LABEL: test_int_x86_mask_vcvtudq2ph256:
2616 ; X86:       # %bb.0:
2617 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2618 ; X86-NEXT:    vcvtudq2ph {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf5,0x7b,0x59,0x7a,0xc1]
2619 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2620 ; X86-NEXT:    retl # encoding: [0xc3]
2622 ; X64-LABEL: test_int_x86_mask_vcvtudq2ph256:
2623 ; X64:       # %bb.0:
2624 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2625 ; X64-NEXT:    vcvtudq2ph {ru-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf5,0x7b,0x59,0x7a,0xc1]
2626 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2627 ; X64-NEXT:    retq # encoding: [0xc3]
2628   %ret0 = call <8 x half> @llvm.x86.avx512.uitofp.round.v8f16.v8i32(<8 x i32> %C, i32 10)
2629   %msk = bitcast i8 %B to <8 x i1>
2630   %ret = select <8 x i1> %msk, <8 x half> %ret0, <8 x half> %A
2631   ret <8 x half> %ret
2634 define <8 x half> @test_int_x86_maskz_vcvtudq2ph256(i8 %A, <8 x i32> %B) nounwind {
2635 ; X86-LABEL: test_int_x86_maskz_vcvtudq2ph256:
2636 ; X86:       # %bb.0:
2637 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2638 ; X86-NEXT:    vcvtudq2ph {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf5,0x7b,0xb9,0x7a,0xc0]
2639 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2640 ; X86-NEXT:    retl # encoding: [0xc3]
2642 ; X64-LABEL: test_int_x86_maskz_vcvtudq2ph256:
2643 ; X64:       # %bb.0:
2644 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2645 ; X64-NEXT:    vcvtudq2ph {rd-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf5,0x7b,0xb9,0x7a,0xc0]
2646 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2647 ; X64-NEXT:    retq # encoding: [0xc3]
2648   %ret0 = call <8 x half> @llvm.x86.avx512.uitofp.round.v8f16.v8i32(<8 x i32> %B, i32 9)
2649   %msk = bitcast i8 %A to <8 x i1>
2650   %ret = select <8 x i1> %msk, <8 x half> %ret0, <8 x half> zeroinitializer
2651   ret <8 x half> %ret
2654 declare <8 x float> @llvm.x86.avx512.uitofp.round.v8f32.v8i32(<8 x i32>, i32)
2655 define <8 x float> @test_int_x86_vcvtudq2ps256(<8 x i32> %A) nounwind {
2656 ; CHECK-LABEL: test_int_x86_vcvtudq2ps256:
2657 ; CHECK:       # %bb.0:
2658 ; CHECK-NEXT:    vcvtudq2ps {rz-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x7b,0x78,0x7a,0xc0]
2659 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2660   %ret = call <8 x float> @llvm.x86.avx512.uitofp.round.v8f32.v8i32(<8 x i32> %A, i32 11)
2661   ret <8 x float> %ret
2664 define <8 x float> @test_int_x86_mask_vcvtudq2ps256(<8 x float> %A, i8 %B, <8 x i32> %C) nounwind {
2665 ; X86-LABEL: test_int_x86_mask_vcvtudq2ps256:
2666 ; X86:       # %bb.0:
2667 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2668 ; X86-NEXT:    vcvtudq2ps {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x7b,0x59,0x7a,0xc1]
2669 ; X86-NEXT:    retl # encoding: [0xc3]
2671 ; X64-LABEL: test_int_x86_mask_vcvtudq2ps256:
2672 ; X64:       # %bb.0:
2673 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2674 ; X64-NEXT:    vcvtudq2ps {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x7b,0x59,0x7a,0xc1]
2675 ; X64-NEXT:    retq # encoding: [0xc3]
2676   %ret0 = call <8 x float> @llvm.x86.avx512.uitofp.round.v8f32.v8i32(<8 x i32> %C, i32 10)
2677   %msk = bitcast i8 %B to <8 x i1>
2678   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> %A
2679   ret <8 x float> %ret
2682 define <8 x float> @test_int_x86_maskz_vcvtudq2ps256(i8 %A, <8 x i32> %B) nounwind {
2683 ; X86-LABEL: test_int_x86_maskz_vcvtudq2ps256:
2684 ; X86:       # %bb.0:
2685 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2686 ; X86-NEXT:    vcvtudq2ps {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x7b,0xb9,0x7a,0xc0]
2687 ; X86-NEXT:    retl # encoding: [0xc3]
2689 ; X64-LABEL: test_int_x86_maskz_vcvtudq2ps256:
2690 ; X64:       # %bb.0:
2691 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2692 ; X64-NEXT:    vcvtudq2ps {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x7b,0xb9,0x7a,0xc0]
2693 ; X64-NEXT:    retq # encoding: [0xc3]
2694   %ret0 = call <8 x float> @llvm.x86.avx512.uitofp.round.v8f32.v8i32(<8 x i32> %B, i32 9)
2695   %msk = bitcast i8 %A to <8 x i1>
2696   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> zeroinitializer
2697   ret <8 x float> %ret
2700 declare <4 x double> @llvm.x86.avx512.uitofp.round.v4f64.v4i64(<4 x i64>, i32)
2701 define <4 x double> @test_int_x86_vcvtuqq2pd256(<4 x i64> %a) nounwind {
2702 ; CHECK-LABEL: test_int_x86_vcvtuqq2pd256:
2703 ; CHECK:       # %bb.0:
2704 ; CHECK-NEXT:    vcvtuqq2pd {rn-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xfa,0x18,0x7a,0xc0]
2705 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2706   %ret = call <4 x double> @llvm.x86.avx512.uitofp.round.v4f64.v4i64(<4 x i64> %a, i32 8)
2707   ret <4 x double> %ret
2710 define <4 x double> @test_int_x86_mask_vcvtuqq2pd256(<4 x double> %a, i4 %b, <4 x i64> %c) nounwind {
2711 ; X86-LABEL: test_int_x86_mask_vcvtuqq2pd256:
2712 ; X86:       # %bb.0:
2713 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2714 ; X86-NEXT:    vcvtuqq2pd {rn-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xfa,0x19,0x7a,0xc1]
2715 ; X86-NEXT:    retl # encoding: [0xc3]
2717 ; X64-LABEL: test_int_x86_mask_vcvtuqq2pd256:
2718 ; X64:       # %bb.0:
2719 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2720 ; X64-NEXT:    vcvtuqq2pd {rn-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xfa,0x19,0x7a,0xc1]
2721 ; X64-NEXT:    retq # encoding: [0xc3]
2722   %ret0 = call <4 x double> @llvm.x86.avx512.uitofp.round.v4f64.v4i64(<4 x i64> %c, i32 8)
2723   %msk = bitcast i4 %b to <4 x i1>
2724   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> %a
2725   ret <4 x double> %ret
2728 define <4 x double> @test_int_x86_maskz_vcvtuqq2pd256(i4 %a, <4 x i64> %b) nounwind {
2729 ; X86-LABEL: test_int_x86_maskz_vcvtuqq2pd256:
2730 ; X86:       # %bb.0:
2731 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2732 ; X86-NEXT:    vcvtuqq2pd {rn-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xfa,0x99,0x7a,0xc0]
2733 ; X86-NEXT:    retl # encoding: [0xc3]
2735 ; X64-LABEL: test_int_x86_maskz_vcvtuqq2pd256:
2736 ; X64:       # %bb.0:
2737 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2738 ; X64-NEXT:    vcvtuqq2pd {rn-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xfa,0x99,0x7a,0xc0]
2739 ; X64-NEXT:    retq # encoding: [0xc3]
2740   %ret0 = call <4 x double> @llvm.x86.avx512.uitofp.round.v4f64.v4i64(<4 x i64> %b, i32 8)
2741   %msk = bitcast i4 %a to <4 x i1>
2742   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> zeroinitializer
2743   ret <4 x double> %ret
2746 declare <8 x half> @llvm.x86.avx512.uitofp.round.v8f16.v4i64(<4 x i64>, i32)
2747 define <8 x half> @test_int_x86_vcvtuqq2ph256(<4 x i64> %a) nounwind {
2748 ; CHECK-LABEL: test_int_x86_vcvtuqq2ph256:
2749 ; CHECK:       # %bb.0:
2750 ; CHECK-NEXT:    vcvtuqq2ph {rn-sae}, %ymm0, %xmm0 # encoding: [0x62,0xf5,0xfb,0x18,0x7a,0xc0]
2751 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2752 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2753   %ret = call <8 x half> @llvm.x86.avx512.uitofp.round.v8f16.v4i64(<4 x i64> %a, i32 8)
2754   ret <8 x half> %ret
2757 define <8 x half> @test_int_x86_mask_vcvtuqq2ph256(<8 x half> %a, i8 %b, <4 x i64> %c) nounwind {
2758 ; X86-LABEL: test_int_x86_mask_vcvtuqq2ph256:
2759 ; X86:       # %bb.0:
2760 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2761 ; X86-NEXT:    vcvtuqq2ph {rn-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf5,0xfb,0x19,0x7a,0xc1]
2762 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2763 ; X86-NEXT:    retl # encoding: [0xc3]
2765 ; X64-LABEL: test_int_x86_mask_vcvtuqq2ph256:
2766 ; X64:       # %bb.0:
2767 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2768 ; X64-NEXT:    vcvtuqq2ph {rn-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf5,0xfb,0x19,0x7a,0xc1]
2769 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2770 ; X64-NEXT:    retq # encoding: [0xc3]
2771   %ret0 = call <8 x half> @llvm.x86.avx512.uitofp.round.v8f16.v4i64(<4 x i64> %c, i32 8)
2772   %msk = bitcast i8 %b to <8 x i1>
2773   %ret = select <8 x i1> %msk, <8 x half> %ret0, <8 x half> %a
2774   ret <8 x half> %ret
2777 define <8 x half> @test_int_x86_maskz_vcvtuqq2ph256(i8 %a, <4 x i64> %b) nounwind {
2778 ; X86-LABEL: test_int_x86_maskz_vcvtuqq2ph256:
2779 ; X86:       # %bb.0:
2780 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2781 ; X86-NEXT:    vcvtuqq2ph {rn-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf5,0xfb,0x99,0x7a,0xc0]
2782 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2783 ; X86-NEXT:    retl # encoding: [0xc3]
2785 ; X64-LABEL: test_int_x86_maskz_vcvtuqq2ph256:
2786 ; X64:       # %bb.0:
2787 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2788 ; X64-NEXT:    vcvtuqq2ph {rn-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf5,0xfb,0x99,0x7a,0xc0]
2789 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2790 ; X64-NEXT:    retq # encoding: [0xc3]
2791   %ret0 = call <8 x half> @llvm.x86.avx512.uitofp.round.v8f16.v4i64(<4 x i64> %b, i32 8)
2792   %msk = bitcast i8 %a to <8 x i1>
2793   %ret = select <8 x i1> %msk, <8 x half> %ret0, <8 x half> zeroinitializer
2794   ret <8 x half> %ret
2797 declare <4 x float> @llvm.x86.avx512.uitofp.round.v4f32.v4i64(<4 x i64>, i32)
2798 define <4 x float> @test_int_x86_vcvtuqq2ps256(<4 x i64> %a) nounwind {
2799 ; CHECK-LABEL: test_int_x86_vcvtuqq2ps256:
2800 ; CHECK:       # %bb.0:
2801 ; CHECK-NEXT:    vcvtuqq2ps {rn-sae}, %ymm0, %xmm0 # encoding: [0x62,0xf1,0xfb,0x18,0x7a,0xc0]
2802 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2803 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2804   %ret = call <4 x float> @llvm.x86.avx512.uitofp.round.v4f32.v4i64(<4 x i64> %a, i32 8)
2805   ret <4 x float> %ret
2808 define <4 x float> @test_int_x86_mask_vcvtuqq2ps256(<4 x float> %a, i4 %b, <4 x i64> %c) nounwind {
2809 ; X86-LABEL: test_int_x86_mask_vcvtuqq2ps256:
2810 ; X86:       # %bb.0:
2811 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2812 ; X86-NEXT:    vcvtuqq2ps {rn-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xfb,0x19,0x7a,0xc1]
2813 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2814 ; X86-NEXT:    retl # encoding: [0xc3]
2816 ; X64-LABEL: test_int_x86_mask_vcvtuqq2ps256:
2817 ; X64:       # %bb.0:
2818 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2819 ; X64-NEXT:    vcvtuqq2ps {rn-sae}, %ymm1, %xmm0 {%k1} # encoding: [0x62,0xf1,0xfb,0x19,0x7a,0xc1]
2820 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2821 ; X64-NEXT:    retq # encoding: [0xc3]
2822   %ret0 = call <4 x float> @llvm.x86.avx512.uitofp.round.v4f32.v4i64(<4 x i64> %c, i32 8)
2823   %msk = bitcast i4 %b to <4 x i1>
2824   %ret = select <4 x i1> %msk, <4 x float> %ret0, <4 x float> %a
2825   ret <4 x float> %ret
2828 define <4 x float> @test_int_x86_maskz_vcvtuqq2ps256(i4 %a, <4 x i64> %b) nounwind {
2829 ; X86-LABEL: test_int_x86_maskz_vcvtuqq2ps256:
2830 ; X86:       # %bb.0:
2831 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2832 ; X86-NEXT:    vcvtuqq2ps {rn-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xfb,0x99,0x7a,0xc0]
2833 ; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2834 ; X86-NEXT:    retl # encoding: [0xc3]
2836 ; X64-LABEL: test_int_x86_maskz_vcvtuqq2ps256:
2837 ; X64:       # %bb.0:
2838 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2839 ; X64-NEXT:    vcvtuqq2ps {rn-sae}, %ymm0, %xmm0 {%k1} {z} # encoding: [0x62,0xf1,0xfb,0x99,0x7a,0xc0]
2840 ; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
2841 ; X64-NEXT:    retq # encoding: [0xc3]
2842   %ret0 = call <4 x float> @llvm.x86.avx512.uitofp.round.v4f32.v4i64(<4 x i64> %b, i32 8)
2843   %msk = bitcast i4 %a to <4 x i1>
2844   %ret = select <4 x i1> %msk, <4 x float> %ret0, <4 x float> zeroinitializer
2845   ret <4 x float> %ret
2848 declare <16 x half> @llvm.x86.avx512.uitofp.round.v16f16.v16i16(<16 x i16>, i32)
2849 define <16 x half> @test_int_x86_vcvtuw2ph256(<16 x i16> %a) nounwind {
2850 ; CHECK-LABEL: test_int_x86_vcvtuw2ph256:
2851 ; CHECK:       # %bb.0:
2852 ; CHECK-NEXT:    vcvtuw2ph {rn-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x7b,0x18,0x7d,0xc0]
2853 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2854   %ret = call <16 x half> @llvm.x86.avx512.uitofp.round.v16f16.v16i16(<16 x i16> %a, i32 8)
2855   ret <16 x half> %ret
2858 define <16 x half> @test_int_x86_mask_vcvtuw2ph256(<16 x half> %a, i16 %b, <16 x i16> %c) nounwind {
2859 ; X86-LABEL: test_int_x86_mask_vcvtuw2ph256:
2860 ; X86:       # %bb.0:
2861 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
2862 ; X86-NEXT:    vcvtuw2ph {rn-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x7b,0x19,0x7d,0xc1]
2863 ; X86-NEXT:    retl # encoding: [0xc3]
2865 ; X64-LABEL: test_int_x86_mask_vcvtuw2ph256:
2866 ; X64:       # %bb.0:
2867 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2868 ; X64-NEXT:    vcvtuw2ph {rn-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x7b,0x19,0x7d,0xc1]
2869 ; X64-NEXT:    retq # encoding: [0xc3]
2870   %ret0 = call <16 x half> @llvm.x86.avx512.uitofp.round.v16f16.v16i16(<16 x i16> %c, i32 8)
2871   %msk = bitcast i16 %b to <16 x i1>
2872   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> %a
2873   ret <16 x half> %ret
2876 define <16 x half> @test_int_x86_maskz_vcvtuw2ph256(i16 %a, <16 x i16> %b) nounwind {
2877 ; X86-LABEL: test_int_x86_maskz_vcvtuw2ph256:
2878 ; X86:       # %bb.0:
2879 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
2880 ; X86-NEXT:    vcvtuw2ph {rn-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x7b,0x99,0x7d,0xc0]
2881 ; X86-NEXT:    retl # encoding: [0xc3]
2883 ; X64-LABEL: test_int_x86_maskz_vcvtuw2ph256:
2884 ; X64:       # %bb.0:
2885 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2886 ; X64-NEXT:    vcvtuw2ph {rn-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x7b,0x99,0x7d,0xc0]
2887 ; X64-NEXT:    retq # encoding: [0xc3]
2888   %ret0 = call <16 x half> @llvm.x86.avx512.uitofp.round.v16f16.v16i16(<16 x i16> %b, i32 8)
2889   %msk = bitcast i16 %a to <16 x i1>
2890   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> zeroinitializer
2891   ret <16 x half> %ret
2894 declare <16 x half> @llvm.x86.avx512.sitofp.round.v16f16.v16i16(<16 x i16>, i32)
2895 define <16 x half> @test_int_x86_vcvtw2ph256(<16 x i16> %a) nounwind {
2896 ; CHECK-LABEL: test_int_x86_vcvtw2ph256:
2897 ; CHECK:       # %bb.0:
2898 ; CHECK-NEXT:    vcvtw2ph {rn-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x7a,0x18,0x7d,0xc0]
2899 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2900   %ret = call <16 x half> @llvm.x86.avx512.sitofp.round.v16f16.v16i16(<16 x i16> %a, i32 8)
2901   ret <16 x half> %ret
2904 define <16 x half> @test_int_x86_mask_vcvtw2ph256(<16 x half> %a, i16 %b, <16 x i16> %c) nounwind {
2905 ; X86-LABEL: test_int_x86_mask_vcvtw2ph256:
2906 ; X86:       # %bb.0:
2907 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
2908 ; X86-NEXT:    vcvtw2ph {rn-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x7a,0x19,0x7d,0xc1]
2909 ; X86-NEXT:    retl # encoding: [0xc3]
2911 ; X64-LABEL: test_int_x86_mask_vcvtw2ph256:
2912 ; X64:       # %bb.0:
2913 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2914 ; X64-NEXT:    vcvtw2ph {rn-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x7a,0x19,0x7d,0xc1]
2915 ; X64-NEXT:    retq # encoding: [0xc3]
2916   %ret0 = call <16 x half> @llvm.x86.avx512.sitofp.round.v16f16.v16i16(<16 x i16> %c, i32 8)
2917   %msk = bitcast i16 %b to <16 x i1>
2918   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> %a
2919   ret <16 x half> %ret
2922 define <16 x half> @test_int_x86_maskz_vcvtw2ph256(i16 %a, <16 x i16> %b) nounwind {
2923 ; X86-LABEL: test_int_x86_maskz_vcvtw2ph256:
2924 ; X86:       # %bb.0:
2925 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
2926 ; X86-NEXT:    vcvtw2ph {rn-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x7a,0x99,0x7d,0xc0]
2927 ; X86-NEXT:    retl # encoding: [0xc3]
2929 ; X64-LABEL: test_int_x86_maskz_vcvtw2ph256:
2930 ; X64:       # %bb.0:
2931 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2932 ; X64-NEXT:    vcvtw2ph {rn-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x7a,0x99,0x7d,0xc0]
2933 ; X64-NEXT:    retq # encoding: [0xc3]
2934   %ret0 = call <16 x half> @llvm.x86.avx512.sitofp.round.v16f16.v16i16(<16 x i16> %b, i32 8)
2935   %msk = bitcast i16 %a to <16 x i1>
2936   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> zeroinitializer
2937   ret <16 x half> %ret
2940 declare <4 x double> @llvm.x86.avx10.vdivpd256(<4 x double>, <4 x double>, i32)
2941 define <4 x double> @test_int_x86_vdivpd256(<4 x double> %A, <4 x double> %B) nounwind {
2942 ; CHECK-LABEL: test_int_x86_vdivpd256:
2943 ; CHECK:       # %bb.0:
2944 ; CHECK-NEXT:    vdivpd {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xf9,0x78,0x5e,0xc1]
2945 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2946   %ret = call <4 x double> @llvm.x86.avx10.vdivpd256(<4 x double> %A, <4 x double> %B, i32 11)
2947   ret <4 x double> %ret
2950 define <4 x double> @test_int_x86_mask_vdivpd256(<4 x double> %A, i4 %B, <4 x double> %C, <4 x double> %D) nounwind {
2951 ; X86-LABEL: test_int_x86_mask_vdivpd256:
2952 ; X86:       # %bb.0:
2953 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2954 ; X86-NEXT:    vdivpd {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf1,0x59,0x5e,0xc2]
2955 ; X86-NEXT:    retl # encoding: [0xc3]
2957 ; X64-LABEL: test_int_x86_mask_vdivpd256:
2958 ; X64:       # %bb.0:
2959 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2960 ; X64-NEXT:    vdivpd {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf1,0x59,0x5e,0xc2]
2961 ; X64-NEXT:    retq # encoding: [0xc3]
2962   %ret0 = call <4 x double> @llvm.x86.avx10.vdivpd256(<4 x double> %C, <4 x double> %D, i32 10)
2963   %msk = bitcast i4 %B to <4 x i1>
2964   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> %A
2965   ret <4 x double> %ret
2968 define <4 x double> @test_int_x86_maskz_vdivpd256(i4 %A, <4 x double> %B, <4 x double> %C) nounwind {
2969 ; X86-LABEL: test_int_x86_maskz_vdivpd256:
2970 ; X86:       # %bb.0:
2971 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
2972 ; X86-NEXT:    vdivpd {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x5e,0xc1]
2973 ; X86-NEXT:    retl # encoding: [0xc3]
2975 ; X64-LABEL: test_int_x86_maskz_vdivpd256:
2976 ; X64:       # %bb.0:
2977 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
2978 ; X64-NEXT:    vdivpd {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x5e,0xc1]
2979 ; X64-NEXT:    retq # encoding: [0xc3]
2980   %ret0 = call <4 x double> @llvm.x86.avx10.vdivpd256(<4 x double> %B, <4 x double> %C, i32 9)
2981   %msk = bitcast i4 %A to <4 x i1>
2982   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> zeroinitializer
2983   ret <4 x double> %ret
2986 declare <16 x half> @llvm.x86.avx10.vdivph256(<16 x half>, <16 x half>, i32)
2987 define <16 x half> @test_int_x86_vdivph256(<16 x half> %A, <16 x half> %B) nounwind {
2988 ; CHECK-LABEL: test_int_x86_vdivph256:
2989 ; CHECK:       # %bb.0:
2990 ; CHECK-NEXT:    vdivph {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x78,0x78,0x5e,0xc1]
2991 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
2992   %ret = call <16 x half> @llvm.x86.avx10.vdivph256(<16 x half> %A, <16 x half> %B, i32 11)
2993   ret <16 x half> %ret
2996 define <16 x half> @test_int_x86_mask_vdivph256(<16 x half> %A, i16 %B, <16 x half> %C, <16 x half> %D) nounwind {
2997 ; X86-LABEL: test_int_x86_mask_vdivph256:
2998 ; X86:       # %bb.0:
2999 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
3000 ; X86-NEXT:    vdivph {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x70,0x59,0x5e,0xc2]
3001 ; X86-NEXT:    retl # encoding: [0xc3]
3003 ; X64-LABEL: test_int_x86_mask_vdivph256:
3004 ; X64:       # %bb.0:
3005 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3006 ; X64-NEXT:    vdivph {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x70,0x59,0x5e,0xc2]
3007 ; X64-NEXT:    retq # encoding: [0xc3]
3008   %ret0 = call <16 x half> @llvm.x86.avx10.vdivph256(<16 x half> %C, <16 x half> %D, i32 10)
3009   %msk = bitcast i16 %B to <16 x i1>
3010   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> %A
3011   ret <16 x half> %ret
3014 define <16 x half> @test_int_x86_maskz_vdivph256(i16 %A, <16 x half> %B, <16 x half> %C) nounwind {
3015 ; X86-LABEL: test_int_x86_maskz_vdivph256:
3016 ; X86:       # %bb.0:
3017 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
3018 ; X86-NEXT:    vdivph {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x5e,0xc1]
3019 ; X86-NEXT:    retl # encoding: [0xc3]
3021 ; X64-LABEL: test_int_x86_maskz_vdivph256:
3022 ; X64:       # %bb.0:
3023 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3024 ; X64-NEXT:    vdivph {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x5e,0xc1]
3025 ; X64-NEXT:    retq # encoding: [0xc3]
3026   %ret0 = call <16 x half> @llvm.x86.avx10.vdivph256(<16 x half> %B, <16 x half> %C, i32 9)
3027   %msk = bitcast i16 %A to <16 x i1>
3028   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> zeroinitializer
3029   ret <16 x half> %ret
3032 declare <8 x float> @llvm.x86.avx10.vdivps256(<8 x float>, <8 x float>, i32)
3033 define <8 x float> @test_int_x86_vdivps256(<8 x float> %A, <8 x float> %B) nounwind {
3034 ; CHECK-LABEL: test_int_x86_vdivps256:
3035 ; CHECK:       # %bb.0:
3036 ; CHECK-NEXT:    vdivps {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x78,0x78,0x5e,0xc1]
3037 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3038   %ret = call <8 x float> @llvm.x86.avx10.vdivps256(<8 x float> %A, <8 x float> %B, i32 11)
3039   ret <8 x float> %ret
3042 define <8 x float> @test_int_x86_mask_vdivps256(<8 x float> %A, i8 %B, <8 x float> %C, <8 x float> %D) nounwind {
3043 ; X86-LABEL: test_int_x86_mask_vdivps256:
3044 ; X86:       # %bb.0:
3045 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3046 ; X86-NEXT:    vdivps {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x70,0x59,0x5e,0xc2]
3047 ; X86-NEXT:    retl # encoding: [0xc3]
3049 ; X64-LABEL: test_int_x86_mask_vdivps256:
3050 ; X64:       # %bb.0:
3051 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3052 ; X64-NEXT:    vdivps {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x70,0x59,0x5e,0xc2]
3053 ; X64-NEXT:    retq # encoding: [0xc3]
3054   %ret0 = call <8 x float> @llvm.x86.avx10.vdivps256(<8 x float> %C, <8 x float> %D, i32 10)
3055   %msk = bitcast i8 %B to <8 x i1>
3056   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> %A
3057   ret <8 x float> %ret
3060 define <8 x float> @test_int_x86_maskz_vdivps256(i8 %A, <8 x float> %B, <8 x float> %C) nounwind {
3061 ; X86-LABEL: test_int_x86_maskz_vdivps256:
3062 ; X86:       # %bb.0:
3063 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3064 ; X86-NEXT:    vdivps {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x5e,0xc1]
3065 ; X86-NEXT:    retl # encoding: [0xc3]
3067 ; X64-LABEL: test_int_x86_maskz_vdivps256:
3068 ; X64:       # %bb.0:
3069 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3070 ; X64-NEXT:    vdivps {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x5e,0xc1]
3071 ; X64-NEXT:    retq # encoding: [0xc3]
3072   %ret0 = call <8 x float> @llvm.x86.avx10.vdivps256(<8 x float> %B, <8 x float> %C, i32 9)
3073   %msk = bitcast i8 %A to <8 x i1>
3074   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> zeroinitializer
3075   ret <8 x float> %ret
3078 declare <8 x float> @llvm.x86.avx10.mask.vfcmaddcph256(<8 x float>, <8 x float>, <8 x float>, i8, i32)
3079 define <8 x float> @test_int_x86_vfcmaddcph256(<8 x float> %a, <8 x float> %b, <8 x float> %c) nounwind {
3080 ; CHECK-LABEL: test_int_x86_vfcmaddcph256:
3081 ; CHECK:       # %bb.0:
3082 ; CHECK-NEXT:    vfcmaddcph {rz-sae}, %ymm1, %ymm0, %ymm2 # encoding: [0x62,0xf6,0x7b,0x78,0x56,0xd1]
3083 ; CHECK-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3084 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3085   %ret = call <8 x float> @llvm.x86.avx10.mask.vfcmaddcph256(<8 x float> %a, <8 x float> %b, <8 x float> %c, i8 -1, i32 11)
3086   ret <8 x float> %ret
3089 define <8 x float> @test_int_x86_mask_vfcmaddcph256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
3090 ; X86-LABEL: test_int_x86_mask_vfcmaddcph256:
3091 ; X86:       # %bb.0:
3092 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3093 ; X86-NEXT:    vfcmaddcph {ru-sae}, %ymm1, %ymm0, %ymm2 {%k1} # encoding: [0x62,0xf6,0x7b,0x59,0x56,0xd1]
3094 ; X86-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3095 ; X86-NEXT:    retl # encoding: [0xc3]
3097 ; X64-LABEL: test_int_x86_mask_vfcmaddcph256:
3098 ; X64:       # %bb.0:
3099 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3100 ; X64-NEXT:    vfcmaddcph {ru-sae}, %ymm1, %ymm0, %ymm2 {%k1} # encoding: [0x62,0xf6,0x7b,0x59,0x56,0xd1]
3101 ; X64-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3102 ; X64-NEXT:    retq # encoding: [0xc3]
3103   %ret = call <8 x float> @llvm.x86.avx10.mask.vfcmaddcph256(<8 x float> %a, <8 x float> %c, <8 x float> %d, i8 %b, i32 10)
3104   ret <8 x float> %ret
3107 declare <8 x float> @llvm.x86.avx10.maskz.vfcmaddcph256(<8 x float>, <8 x float>, <8 x float>, i8, i32)
3108 define <8 x float> @test_int_x86_maskz_vfcmaddcph256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
3109 ; X86-LABEL: test_int_x86_maskz_vfcmaddcph256:
3110 ; X86:       # %bb.0:
3111 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3112 ; X86-NEXT:    vfcmaddcph {rd-sae}, %ymm1, %ymm0, %ymm2 {%k1} {z} # encoding: [0x62,0xf6,0x7b,0xb9,0x56,0xd1]
3113 ; X86-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3114 ; X86-NEXT:    retl # encoding: [0xc3]
3116 ; X64-LABEL: test_int_x86_maskz_vfcmaddcph256:
3117 ; X64:       # %bb.0:
3118 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3119 ; X64-NEXT:    vfcmaddcph {rd-sae}, %ymm1, %ymm0, %ymm2 {%k1} {z} # encoding: [0x62,0xf6,0x7b,0xb9,0x56,0xd1]
3120 ; X64-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3121 ; X64-NEXT:    retq # encoding: [0xc3]
3122   %ret = call <8 x float> @llvm.x86.avx10.maskz.vfcmaddcph256(<8 x float> %a, <8 x float> %c, <8 x float> %d, i8 %b, i32 9)
3123   ret <8 x float> %ret
3126 declare <8 x float> @llvm.x86.avx10.mask.vfcmulcph256(<8 x float>, <8 x float>, <8 x float>, i8, i32)
3127 define <8 x float> @test_int_x86_vfcmulcph256(<8 x float> %a, <8 x float> %b, <8 x float> %c) nounwind {
3128 ; CHECK-LABEL: test_int_x86_vfcmulcph256:
3129 ; CHECK:       # %bb.0:
3130 ; CHECK-NEXT:    vfcmulcph {rz-sae}, %ymm1, %ymm0, %ymm2 # encoding: [0x62,0xf6,0x7b,0x78,0xd6,0xd1]
3131 ; CHECK-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3132 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3133   %ret = call <8 x float> @llvm.x86.avx10.mask.vfcmulcph256(<8 x float> %a, <8 x float> %b, <8 x float> %c, i8 -1, i32 11)
3134   ret <8 x float> %ret
3137 define <8 x float> @test_int_x86_mask_vfcmulcph256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
3138 ; X86-LABEL: test_int_x86_mask_vfcmulcph256:
3139 ; X86:       # %bb.0:
3140 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3141 ; X86-NEXT:    vfcmulcph {ru-sae}, %ymm1, %ymm0, %ymm2 {%k1} # encoding: [0x62,0xf6,0x7b,0x59,0xd6,0xd1]
3142 ; X86-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3143 ; X86-NEXT:    retl # encoding: [0xc3]
3145 ; X64-LABEL: test_int_x86_mask_vfcmulcph256:
3146 ; X64:       # %bb.0:
3147 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3148 ; X64-NEXT:    vfcmulcph {ru-sae}, %ymm1, %ymm0, %ymm2 {%k1} # encoding: [0x62,0xf6,0x7b,0x59,0xd6,0xd1]
3149 ; X64-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3150 ; X64-NEXT:    retq # encoding: [0xc3]
3151   %ret = call <8 x float> @llvm.x86.avx10.mask.vfcmulcph256(<8 x float> %a, <8 x float> %c, <8 x float> %d, i8 %b, i32 10)
3152   ret <8 x float> %ret
3155 define <8 x float> @test_int_x86_maskz_vfcmulcph256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
3156 ; X86-LABEL: test_int_x86_maskz_vfcmulcph256:
3157 ; X86:       # %bb.0:
3158 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3159 ; X86-NEXT:    vfcmulcph {rd-sae}, %ymm1, %ymm0, %ymm2 {%k1} {z} # encoding: [0x62,0xf6,0x7b,0xb9,0xd6,0xd1]
3160 ; X86-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3161 ; X86-NEXT:    retl # encoding: [0xc3]
3163 ; X64-LABEL: test_int_x86_maskz_vfcmulcph256:
3164 ; X64:       # %bb.0:
3165 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3166 ; X64-NEXT:    vfcmulcph {rd-sae}, %ymm1, %ymm0, %ymm2 {%k1} {z} # encoding: [0x62,0xf6,0x7b,0xb9,0xd6,0xd1]
3167 ; X64-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3168 ; X64-NEXT:    retq # encoding: [0xc3]
3169   %ret = call <8 x float> @llvm.x86.avx10.mask.vfcmulcph256(<8 x float> %a, <8 x float> %c, <8 x float> zeroinitializer, i8 %b, i32 9)
3170   ret <8 x float> %ret
3173 declare <4 x double> @llvm.x86.avx10.mask.vfixupimmpd256(<4 x double>, <4 x double>, <4 x i64>, i32, i8, i32)
3174 define <4 x double> @test_int_x86_vfixupimmpd256(<4 x double> %a, <4 x double> %b, <4 x i64> %c) nounwind {
3175 ; CHECK-LABEL: test_int_x86_vfixupimmpd256:
3176 ; CHECK:       # %bb.0:
3177 ; CHECK-NEXT:    vfixupimmpd $127, {sae}, %ymm2, %ymm1, %ymm0 # encoding: [0x62,0xf3,0xf1,0x18,0x54,0xc2,0x7f]
3178 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3179   %ret = call <4 x double> @llvm.x86.avx10.mask.vfixupimmpd256(<4 x double> %a, <4 x double> %b, <4 x i64> %c, i32 127, i8 -1, i32 8)
3180   ret <4 x double> %ret
3183 define <4 x double> @test_int_x86_mask_vfixupimmpd256(<4 x double> %a, i8 %b, <4 x double> %c, <4 x i64> %d) nounwind {
3184 ; X86-LABEL: test_int_x86_mask_vfixupimmpd256:
3185 ; X86:       # %bb.0:
3186 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3187 ; X86-NEXT:    vfixupimmpd $127, {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0xf1,0x19,0x54,0xc2,0x7f]
3188 ; X86-NEXT:    retl # encoding: [0xc3]
3190 ; X64-LABEL: test_int_x86_mask_vfixupimmpd256:
3191 ; X64:       # %bb.0:
3192 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3193 ; X64-NEXT:    vfixupimmpd $127, {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0xf1,0x19,0x54,0xc2,0x7f]
3194 ; X64-NEXT:    retq # encoding: [0xc3]
3195   %ret = call <4 x double> @llvm.x86.avx10.mask.vfixupimmpd256(<4 x double> %a, <4 x double> %c, <4 x i64> %d, i32 127, i8 %b, i32 8)
3196   ret <4 x double> %ret
3199 declare <4 x double> @llvm.x86.avx10.maskz.vfixupimmpd256(<4 x double>, <4 x double>, <4 x i64>, i32, i8, i32)
3200 define <4 x double> @test_int_x86_maskz_vfixupimmpd256(<4 x double> %a, i8 %b, <4 x double> %c, <4 x i64> %d) nounwind {
3201 ; X86-LABEL: test_int_x86_maskz_vfixupimmpd256:
3202 ; X86:       # %bb.0:
3203 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3204 ; X86-NEXT:    vfixupimmpd $127, {sae}, %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0xf1,0x99,0x54,0xc2,0x7f]
3205 ; X86-NEXT:    retl # encoding: [0xc3]
3207 ; X64-LABEL: test_int_x86_maskz_vfixupimmpd256:
3208 ; X64:       # %bb.0:
3209 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3210 ; X64-NEXT:    vfixupimmpd $127, {sae}, %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0xf1,0x99,0x54,0xc2,0x7f]
3211 ; X64-NEXT:    retq # encoding: [0xc3]
3212   %ret = call <4 x double> @llvm.x86.avx10.maskz.vfixupimmpd256(<4 x double> %a, <4 x double> %c, <4 x i64> %d, i32 127, i8 %b, i32 8)
3213   ret <4 x double> %ret
3216 declare <8 x float> @llvm.x86.avx10.mask.vfixupimmps256(<8 x float>, <8 x float>, <8 x i32>, i32, i8, i32)
3217 define <8 x float> @test_int_x86_vfixupimmps256(<8 x float> %a, <8 x float> %b, <8 x i32> %c) nounwind {
3218 ; CHECK-LABEL: test_int_x86_vfixupimmps256:
3219 ; CHECK:       # %bb.0:
3220 ; CHECK-NEXT:    vfixupimmps $127, {sae}, %ymm2, %ymm1, %ymm0 # encoding: [0x62,0xf3,0x71,0x18,0x54,0xc2,0x7f]
3221 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3222   %ret = call <8 x float> @llvm.x86.avx10.mask.vfixupimmps256(<8 x float> %a, <8 x float> %b, <8 x i32> %c, i32 127, i8 -1, i32 8)
3223   ret <8 x float> %ret
3226 define <8 x float> @test_int_x86_mask_vfixupimmps256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x i32> %d) nounwind {
3227 ; X86-LABEL: test_int_x86_mask_vfixupimmps256:
3228 ; X86:       # %bb.0:
3229 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3230 ; X86-NEXT:    vfixupimmps $127, {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x71,0x19,0x54,0xc2,0x7f]
3231 ; X86-NEXT:    retl # encoding: [0xc3]
3233 ; X64-LABEL: test_int_x86_mask_vfixupimmps256:
3234 ; X64:       # %bb.0:
3235 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3236 ; X64-NEXT:    vfixupimmps $127, {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x71,0x19,0x54,0xc2,0x7f]
3237 ; X64-NEXT:    retq # encoding: [0xc3]
3238   %ret = call <8 x float> @llvm.x86.avx10.mask.vfixupimmps256(<8 x float> %a, <8 x float> %c, <8 x i32> %d, i32 127, i8 %b, i32 8)
3239   ret <8 x float> %ret
3242 declare <8 x float> @llvm.x86.avx10.maskz.vfixupimmps256(<8 x float>, <8 x float>, <8 x i32>, i32, i8, i32)
3243 define <8 x float> @test_int_x86_maskz_vfixupimmps256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x i32> %d) nounwind {
3244 ; X86-LABEL: test_int_x86_maskz_vfixupimmps256:
3245 ; X86:       # %bb.0:
3246 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3247 ; X86-NEXT:    vfixupimmps $127, {sae}, %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x71,0x99,0x54,0xc2,0x7f]
3248 ; X86-NEXT:    retl # encoding: [0xc3]
3250 ; X64-LABEL: test_int_x86_maskz_vfixupimmps256:
3251 ; X64:       # %bb.0:
3252 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3253 ; X64-NEXT:    vfixupimmps $127, {sae}, %ymm2, %ymm1, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x71,0x99,0x54,0xc2,0x7f]
3254 ; X64-NEXT:    retq # encoding: [0xc3]
3255   %ret = call <8 x float> @llvm.x86.avx10.maskz.vfixupimmps256(<8 x float> %a, <8 x float> %c, <8 x i32> %d, i32 127, i8 %b, i32 8)
3256   ret <8 x float> %ret
3259 declare <4 x double> @llvm.x86.avx10.vfmaddpd256(<4 x double>, <4 x double>, <4 x double>, i32)
3260 define <4 x double> @test_int_x86_vfmaddpd256(<4 x double> %a, <4 x double> %b, <4 x double> %c) nounwind {
3261 ; CHECK-LABEL: test_int_x86_vfmaddpd256:
3262 ; CHECK:       # %bb.0:
3263 ; CHECK-NEXT:    vfmadd213pd {rz-sae}, %ymm2, %ymm1, %ymm0 # encoding: [0x62,0xf2,0xf1,0x78,0xa8,0xc2]
3264 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3265   %ret = call <4 x double> @llvm.x86.avx10.vfmaddpd256(<4 x double> %a, <4 x double> %b, <4 x double> %c, i32 11)
3266   ret <4 x double> %ret
3269 define <4 x double> @test_int_x86_mask_vfmaddpd256(<4 x double> %a, i4 %b, <4 x double> %c, <4 x double> %d) nounwind {
3270 ; X86-LABEL: test_int_x86_mask_vfmaddpd256:
3271 ; X86:       # %bb.0:
3272 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3273 ; X86-NEXT:    vfmadd132pd {ru-sae}, %ymm1, %ymm2, %ymm0 {%k1} # encoding: [0x62,0xf2,0xe9,0x59,0x98,0xc1]
3274 ; X86-NEXT:    retl # encoding: [0xc3]
3276 ; X64-LABEL: test_int_x86_mask_vfmaddpd256:
3277 ; X64:       # %bb.0:
3278 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3279 ; X64-NEXT:    vfmadd132pd {ru-sae}, %ymm1, %ymm2, %ymm0 {%k1} # encoding: [0x62,0xf2,0xe9,0x59,0x98,0xc1]
3280 ; X64-NEXT:    retq # encoding: [0xc3]
3281   %ret0 = call <4 x double> @llvm.x86.avx10.vfmaddpd256(<4 x double> %a, <4 x double> %c, <4 x double> %d, i32 10)
3282   %msk = bitcast i4 %b to <4 x i1>
3283   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> %a
3284   ret <4 x double> %ret
3287 define <4 x double> @test_int_x86_maskz_vfmaddpd256(<4 x double> %a, i4 %b, <4 x double> %c, <4 x double> %d) nounwind {
3288 ; X86-LABEL: test_int_x86_maskz_vfmaddpd256:
3289 ; X86:       # %bb.0:
3290 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3291 ; X86-NEXT:    vfmadd132pd {rd-sae}, %ymm1, %ymm2, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0xe9,0xb9,0x98,0xc1]
3292 ; X86-NEXT:    retl # encoding: [0xc3]
3294 ; X64-LABEL: test_int_x86_maskz_vfmaddpd256:
3295 ; X64:       # %bb.0:
3296 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3297 ; X64-NEXT:    vfmadd132pd {rd-sae}, %ymm1, %ymm2, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0xe9,0xb9,0x98,0xc1]
3298 ; X64-NEXT:    retq # encoding: [0xc3]
3299   %ret0 = call <4 x double> @llvm.x86.avx10.vfmaddpd256(<4 x double> %a, <4 x double> %c, <4 x double> %d, i32 9)
3300   %msk = bitcast i4 %b to <4 x i1>
3301   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> zeroinitializer
3302   ret <4 x double> %ret
3305 declare <16 x half> @llvm.x86.avx10.vfmaddph256(<16 x half>, <16 x half>, <16 x half>, i32)
3306 define <16 x half> @test_int_x86_vfmaddph256(<16 x half> %a, <16 x half> %b, <16 x half> %c) nounwind {
3307 ; CHECK-LABEL: test_int_x86_vfmaddph256:
3308 ; CHECK:       # %bb.0:
3309 ; CHECK-NEXT:    vfmadd213ph {rz-sae}, %ymm2, %ymm1, %ymm0 # encoding: [0x62,0xf6,0x71,0x78,0xa8,0xc2]
3310 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3311   %ret = call <16 x half> @llvm.x86.avx10.vfmaddph256(<16 x half> %a, <16 x half> %b, <16 x half> %c, i32 11)
3312   ret <16 x half> %ret
3315 define <16 x half> @test_int_x86_mask_vfmaddph256(<16 x half> %a, i16 %b, <16 x half> %c, <16 x half> %d) nounwind {
3316 ; X86-LABEL: test_int_x86_mask_vfmaddph256:
3317 ; X86:       # %bb.0:
3318 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
3319 ; X86-NEXT:    vfmadd132ph {ru-sae}, %ymm1, %ymm2, %ymm0 {%k1} # encoding: [0x62,0xf6,0x69,0x59,0x98,0xc1]
3320 ; X86-NEXT:    retl # encoding: [0xc3]
3322 ; X64-LABEL: test_int_x86_mask_vfmaddph256:
3323 ; X64:       # %bb.0:
3324 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3325 ; X64-NEXT:    vfmadd132ph {ru-sae}, %ymm1, %ymm2, %ymm0 {%k1} # encoding: [0x62,0xf6,0x69,0x59,0x98,0xc1]
3326 ; X64-NEXT:    retq # encoding: [0xc3]
3327   %ret0 = call <16 x half> @llvm.x86.avx10.vfmaddph256(<16 x half> %a, <16 x half> %c, <16 x half> %d, i32 10)
3328   %msk = bitcast i16 %b to <16 x i1>
3329   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> %a
3330   ret <16 x half> %ret
3333 define <16 x half> @test_int_x86_maskz_vfmaddph256(<16 x half> %a, i16 %b, <16 x half> %c, <16 x half> %d) nounwind {
3334 ; X86-LABEL: test_int_x86_maskz_vfmaddph256:
3335 ; X86:       # %bb.0:
3336 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
3337 ; X86-NEXT:    vfmadd132ph {rd-sae}, %ymm1, %ymm2, %ymm0 {%k1} {z} # encoding: [0x62,0xf6,0x69,0xb9,0x98,0xc1]
3338 ; X86-NEXT:    retl # encoding: [0xc3]
3340 ; X64-LABEL: test_int_x86_maskz_vfmaddph256:
3341 ; X64:       # %bb.0:
3342 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3343 ; X64-NEXT:    vfmadd132ph {rd-sae}, %ymm1, %ymm2, %ymm0 {%k1} {z} # encoding: [0x62,0xf6,0x69,0xb9,0x98,0xc1]
3344 ; X64-NEXT:    retq # encoding: [0xc3]
3345   %ret0 = call <16 x half> @llvm.x86.avx10.vfmaddph256(<16 x half> %a, <16 x half> %c, <16 x half> %d, i32 9)
3346   %msk = bitcast i16 %b to <16 x i1>
3347   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> zeroinitializer
3348   ret <16 x half> %ret
3351 declare <8 x float> @llvm.x86.avx10.vfmaddps256(<8 x float>, <8 x float>, <8 x float>, i32)
3352 define <8 x float> @test_int_x86_vfmaddps256(<8 x float> %a, <8 x float> %b, <8 x float> %c) nounwind {
3353 ; CHECK-LABEL: test_int_x86_vfmaddps256:
3354 ; CHECK:       # %bb.0:
3355 ; CHECK-NEXT:    vfmadd213ps {rz-sae}, %ymm2, %ymm1, %ymm0 # encoding: [0x62,0xf2,0x71,0x78,0xa8,0xc2]
3356 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3357   %ret = call <8 x float> @llvm.x86.avx10.vfmaddps256(<8 x float> %a, <8 x float> %b, <8 x float> %c, i32 11)
3358   ret <8 x float> %ret
3361 define <8 x float> @test_int_x86_mask_vfmaddps256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
3362 ; X86-LABEL: test_int_x86_mask_vfmaddps256:
3363 ; X86:       # %bb.0:
3364 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3365 ; X86-NEXT:    vfmadd132ps {ru-sae}, %ymm1, %ymm2, %ymm0 {%k1} # encoding: [0x62,0xf2,0x69,0x59,0x98,0xc1]
3366 ; X86-NEXT:    retl # encoding: [0xc3]
3368 ; X64-LABEL: test_int_x86_mask_vfmaddps256:
3369 ; X64:       # %bb.0:
3370 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3371 ; X64-NEXT:    vfmadd132ps {ru-sae}, %ymm1, %ymm2, %ymm0 {%k1} # encoding: [0x62,0xf2,0x69,0x59,0x98,0xc1]
3372 ; X64-NEXT:    retq # encoding: [0xc3]
3373   %ret0 = call <8 x float> @llvm.x86.avx10.vfmaddps256(<8 x float> %a, <8 x float> %c, <8 x float> %d, i32 10)
3374   %msk = bitcast i8 %b to <8 x i1>
3375   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> %a
3376   ret <8 x float> %ret
3379 define <8 x float> @test_int_x86_maskz_vfmaddps256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
3380 ; X86-LABEL: test_int_x86_maskz_vfmaddps256:
3381 ; X86:       # %bb.0:
3382 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3383 ; X86-NEXT:    vfmadd132ps {rd-sae}, %ymm1, %ymm2, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x69,0xb9,0x98,0xc1]
3384 ; X86-NEXT:    retl # encoding: [0xc3]
3386 ; X64-LABEL: test_int_x86_maskz_vfmaddps256:
3387 ; X64:       # %bb.0:
3388 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3389 ; X64-NEXT:    vfmadd132ps {rd-sae}, %ymm1, %ymm2, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x69,0xb9,0x98,0xc1]
3390 ; X64-NEXT:    retq # encoding: [0xc3]
3391   %ret0 = call <8 x float> @llvm.x86.avx10.vfmaddps256(<8 x float> %a, <8 x float> %c, <8 x float> %d, i32 9)
3392   %msk = bitcast i8 %b to <8 x i1>
3393   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> zeroinitializer
3394   ret <8 x float> %ret
3397 declare <8 x float> @llvm.x86.avx10.mask.vfmaddcph256(<8 x float>, <8 x float>, <8 x float>, i8, i32)
3398 define <8 x float> @test_int_x86_vfmaddcph256(<8 x float> %a, <8 x float> %b, <8 x float> %c) nounwind {
3399 ; CHECK-LABEL: test_int_x86_vfmaddcph256:
3400 ; CHECK:       # %bb.0:
3401 ; CHECK-NEXT:    vfmaddcph {rz-sae}, %ymm1, %ymm0, %ymm2 # encoding: [0x62,0xf6,0x7a,0x78,0x56,0xd1]
3402 ; CHECK-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3403 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3404   %ret = call <8 x float> @llvm.x86.avx10.mask.vfmaddcph256(<8 x float> %a, <8 x float> %b, <8 x float> %c, i8 -1, i32 11)
3405   ret <8 x float> %ret
3408 define <8 x float> @test_int_x86_mask_vfmaddcph256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
3409 ; X86-LABEL: test_int_x86_mask_vfmaddcph256:
3410 ; X86:       # %bb.0:
3411 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3412 ; X86-NEXT:    vfmaddcph {ru-sae}, %ymm1, %ymm0, %ymm2 {%k1} # encoding: [0x62,0xf6,0x7a,0x59,0x56,0xd1]
3413 ; X86-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3414 ; X86-NEXT:    retl # encoding: [0xc3]
3416 ; X64-LABEL: test_int_x86_mask_vfmaddcph256:
3417 ; X64:       # %bb.0:
3418 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3419 ; X64-NEXT:    vfmaddcph {ru-sae}, %ymm1, %ymm0, %ymm2 {%k1} # encoding: [0x62,0xf6,0x7a,0x59,0x56,0xd1]
3420 ; X64-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3421 ; X64-NEXT:    retq # encoding: [0xc3]
3422   %ret = call <8 x float> @llvm.x86.avx10.mask.vfmaddcph256(<8 x float> %a, <8 x float> %c, <8 x float> %d, i8 %b, i32 10)
3423   ret <8 x float> %ret
3426 declare <8 x float> @llvm.x86.avx10.maskz.vfmaddcph256(<8 x float>, <8 x float>, <8 x float>, i8, i32)
3427 define <8 x float> @test_int_x86_maskz_vfmaddcph256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
3428 ; X86-LABEL: test_int_x86_maskz_vfmaddcph256:
3429 ; X86:       # %bb.0:
3430 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3431 ; X86-NEXT:    vfmaddcph {rd-sae}, %ymm1, %ymm0, %ymm2 {%k1} {z} # encoding: [0x62,0xf6,0x7a,0xb9,0x56,0xd1]
3432 ; X86-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3433 ; X86-NEXT:    retl # encoding: [0xc3]
3435 ; X64-LABEL: test_int_x86_maskz_vfmaddcph256:
3436 ; X64:       # %bb.0:
3437 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3438 ; X64-NEXT:    vfmaddcph {rd-sae}, %ymm1, %ymm0, %ymm2 {%k1} {z} # encoding: [0x62,0xf6,0x7a,0xb9,0x56,0xd1]
3439 ; X64-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3440 ; X64-NEXT:    retq # encoding: [0xc3]
3441   %ret = call <8 x float> @llvm.x86.avx10.maskz.vfmaddcph256(<8 x float> %a, <8 x float> %c, <8 x float> %d, i8 %b, i32 9)
3442   ret <8 x float> %ret
3445 declare <4 x double> @llvm.x86.avx10.vfmaddsubpd256(<4 x double>, <4 x double>, <4 x double>, i32)
3446 define <4 x double> @test_int_x86_vfmaddsubpd256(<4 x double> %a, <4 x double> %b, <4 x double> %c) nounwind {
3447 ; CHECK-LABEL: test_int_x86_vfmaddsubpd256:
3448 ; CHECK:       # %bb.0:
3449 ; CHECK-NEXT:    vfmaddsub213pd {rz-sae}, %ymm2, %ymm1, %ymm0 # encoding: [0x62,0xf2,0xf1,0x78,0xa6,0xc2]
3450 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3451   %ret = call <4 x double> @llvm.x86.avx10.vfmaddsubpd256(<4 x double> %a, <4 x double> %b, <4 x double> %c, i32 11)
3452   ret <4 x double> %ret
3455 define <4 x double> @test_int_x86_mask_vfmaddsubpd256(<4 x double> %a, i4 %b, <4 x double> %c, <4 x double> %d) nounwind {
3456 ; X86-LABEL: test_int_x86_mask_vfmaddsubpd256:
3457 ; X86:       # %bb.0:
3458 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3459 ; X86-NEXT:    vfmaddsub132pd {ru-sae}, %ymm1, %ymm2, %ymm0 {%k1} # encoding: [0x62,0xf2,0xe9,0x59,0x96,0xc1]
3460 ; X86-NEXT:    retl # encoding: [0xc3]
3462 ; X64-LABEL: test_int_x86_mask_vfmaddsubpd256:
3463 ; X64:       # %bb.0:
3464 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3465 ; X64-NEXT:    vfmaddsub132pd {ru-sae}, %ymm1, %ymm2, %ymm0 {%k1} # encoding: [0x62,0xf2,0xe9,0x59,0x96,0xc1]
3466 ; X64-NEXT:    retq # encoding: [0xc3]
3467   %ret0 = call <4 x double> @llvm.x86.avx10.vfmaddsubpd256(<4 x double> %a, <4 x double> %c, <4 x double> %d, i32 10)
3468   %msk = bitcast i4 %b to <4 x i1>
3469   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> %a
3470   ret <4 x double> %ret
3473 define <4 x double> @test_int_x86_maskz_vfmaddsubpd256(<4 x double> %a, i4 %b, <4 x double> %c, <4 x double> %d) nounwind {
3474 ; X86-LABEL: test_int_x86_maskz_vfmaddsubpd256:
3475 ; X86:       # %bb.0:
3476 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3477 ; X86-NEXT:    vfmaddsub132pd {rd-sae}, %ymm1, %ymm2, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0xe9,0xb9,0x96,0xc1]
3478 ; X86-NEXT:    retl # encoding: [0xc3]
3480 ; X64-LABEL: test_int_x86_maskz_vfmaddsubpd256:
3481 ; X64:       # %bb.0:
3482 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3483 ; X64-NEXT:    vfmaddsub132pd {rd-sae}, %ymm1, %ymm2, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0xe9,0xb9,0x96,0xc1]
3484 ; X64-NEXT:    retq # encoding: [0xc3]
3485   %ret0 = call <4 x double> @llvm.x86.avx10.vfmaddsubpd256(<4 x double> %a, <4 x double> %c, <4 x double> %d, i32 9)
3486   %msk = bitcast i4 %b to <4 x i1>
3487   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> zeroinitializer
3488   ret <4 x double> %ret
3491 declare <16 x half> @llvm.x86.avx10.vfmaddsubph256(<16 x half>, <16 x half>, <16 x half>, i32)
3492 define <16 x half> @test_int_x86_vfmaddsubph256(<16 x half> %a, <16 x half> %b, <16 x half> %c) nounwind {
3493 ; CHECK-LABEL: test_int_x86_vfmaddsubph256:
3494 ; CHECK:       # %bb.0:
3495 ; CHECK-NEXT:    vfmaddsub213ph {rz-sae}, %ymm2, %ymm1, %ymm0 # encoding: [0x62,0xf6,0x71,0x78,0xa6,0xc2]
3496 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3497   %ret = call <16 x half> @llvm.x86.avx10.vfmaddsubph256(<16 x half> %a, <16 x half> %b, <16 x half> %c, i32 11)
3498   ret <16 x half> %ret
3501 define <16 x half> @test_int_x86_mask_vfmaddsubph256(<16 x half> %a, i16 %b, <16 x half> %c, <16 x half> %d) nounwind {
3502 ; X86-LABEL: test_int_x86_mask_vfmaddsubph256:
3503 ; X86:       # %bb.0:
3504 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
3505 ; X86-NEXT:    vfmaddsub132ph {ru-sae}, %ymm1, %ymm2, %ymm0 {%k1} # encoding: [0x62,0xf6,0x69,0x59,0x96,0xc1]
3506 ; X86-NEXT:    retl # encoding: [0xc3]
3508 ; X64-LABEL: test_int_x86_mask_vfmaddsubph256:
3509 ; X64:       # %bb.0:
3510 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3511 ; X64-NEXT:    vfmaddsub132ph {ru-sae}, %ymm1, %ymm2, %ymm0 {%k1} # encoding: [0x62,0xf6,0x69,0x59,0x96,0xc1]
3512 ; X64-NEXT:    retq # encoding: [0xc3]
3513   %ret0 = call <16 x half> @llvm.x86.avx10.vfmaddsubph256(<16 x half> %a, <16 x half> %c, <16 x half> %d, i32 10)
3514   %msk = bitcast i16 %b to <16 x i1>
3515   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> %a
3516   ret <16 x half> %ret
3519 define <16 x half> @test_int_x86_maskz_vfmaddsubph256(<16 x half> %a, i16 %b, <16 x half> %c, <16 x half> %d) nounwind {
3520 ; X86-LABEL: test_int_x86_maskz_vfmaddsubph256:
3521 ; X86:       # %bb.0:
3522 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
3523 ; X86-NEXT:    vfmaddsub132ph {rd-sae}, %ymm1, %ymm2, %ymm0 {%k1} {z} # encoding: [0x62,0xf6,0x69,0xb9,0x96,0xc1]
3524 ; X86-NEXT:    retl # encoding: [0xc3]
3526 ; X64-LABEL: test_int_x86_maskz_vfmaddsubph256:
3527 ; X64:       # %bb.0:
3528 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3529 ; X64-NEXT:    vfmaddsub132ph {rd-sae}, %ymm1, %ymm2, %ymm0 {%k1} {z} # encoding: [0x62,0xf6,0x69,0xb9,0x96,0xc1]
3530 ; X64-NEXT:    retq # encoding: [0xc3]
3531   %ret0 = call <16 x half> @llvm.x86.avx10.vfmaddsubph256(<16 x half> %a, <16 x half> %c, <16 x half> %d, i32 9)
3532   %msk = bitcast i16 %b to <16 x i1>
3533   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> zeroinitializer
3534   ret <16 x half> %ret
3537 declare <8 x float> @llvm.x86.avx10.vfmaddsubps256(<8 x float>, <8 x float>, <8 x float>, i32)
3538 define <8 x float> @test_int_x86_vfmaddsubps256(<8 x float> %a, <8 x float> %b, <8 x float> %c) nounwind {
3539 ; CHECK-LABEL: test_int_x86_vfmaddsubps256:
3540 ; CHECK:       # %bb.0:
3541 ; CHECK-NEXT:    vfmaddsub213ps {rz-sae}, %ymm2, %ymm1, %ymm0 # encoding: [0x62,0xf2,0x71,0x78,0xa6,0xc2]
3542 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3543   %ret = call <8 x float> @llvm.x86.avx10.vfmaddsubps256(<8 x float> %a, <8 x float> %b, <8 x float> %c, i32 11)
3544   ret <8 x float> %ret
3547 define <8 x float> @test_int_x86_mask_vfmaddsubps256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
3548 ; X86-LABEL: test_int_x86_mask_vfmaddsubps256:
3549 ; X86:       # %bb.0:
3550 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3551 ; X86-NEXT:    vfmaddsub132ps {ru-sae}, %ymm1, %ymm2, %ymm0 {%k1} # encoding: [0x62,0xf2,0x69,0x59,0x96,0xc1]
3552 ; X86-NEXT:    retl # encoding: [0xc3]
3554 ; X64-LABEL: test_int_x86_mask_vfmaddsubps256:
3555 ; X64:       # %bb.0:
3556 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3557 ; X64-NEXT:    vfmaddsub132ps {ru-sae}, %ymm1, %ymm2, %ymm0 {%k1} # encoding: [0x62,0xf2,0x69,0x59,0x96,0xc1]
3558 ; X64-NEXT:    retq # encoding: [0xc3]
3559   %ret0 = call <8 x float> @llvm.x86.avx10.vfmaddsubps256(<8 x float> %a, <8 x float> %c, <8 x float> %d, i32 10)
3560   %msk = bitcast i8 %b to <8 x i1>
3561   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> %a
3562   ret <8 x float> %ret
3565 define <8 x float> @test_int_x86_maskz_vfmaddsubps256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
3566 ; X86-LABEL: test_int_x86_maskz_vfmaddsubps256:
3567 ; X86:       # %bb.0:
3568 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3569 ; X86-NEXT:    vfmaddsub132ps {rd-sae}, %ymm1, %ymm2, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x69,0xb9,0x96,0xc1]
3570 ; X86-NEXT:    retl # encoding: [0xc3]
3572 ; X64-LABEL: test_int_x86_maskz_vfmaddsubps256:
3573 ; X64:       # %bb.0:
3574 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3575 ; X64-NEXT:    vfmaddsub132ps {rd-sae}, %ymm1, %ymm2, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x69,0xb9,0x96,0xc1]
3576 ; X64-NEXT:    retq # encoding: [0xc3]
3577   %ret0 = call <8 x float> @llvm.x86.avx10.vfmaddsubps256(<8 x float> %a, <8 x float> %c, <8 x float> %d, i32 9)
3578   %msk = bitcast i8 %b to <8 x i1>
3579   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> zeroinitializer
3580   ret <8 x float> %ret
3583 declare <8 x float> @llvm.x86.avx10.mask.vfmulcph256(<8 x float>, <8 x float>, <8 x float>, i8, i32)
3584 define <8 x float> @test_int_x86_vfmulcph256(<8 x float> %a, <8 x float> %b, <8 x float> %c) nounwind {
3585 ; CHECK-LABEL: test_int_x86_vfmulcph256:
3586 ; CHECK:       # %bb.0:
3587 ; CHECK-NEXT:    vfmulcph {rz-sae}, %ymm1, %ymm0, %ymm2 # encoding: [0x62,0xf6,0x7a,0x78,0xd6,0xd1]
3588 ; CHECK-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3589 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3590   %ret = call <8 x float> @llvm.x86.avx10.mask.vfmulcph256(<8 x float> %a, <8 x float> %b, <8 x float> %c, i8 -1, i32 11)
3591   ret <8 x float> %ret
3594 define <8 x float> @test_int_x86_mask_vfmulcph256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
3595 ; X86-LABEL: test_int_x86_mask_vfmulcph256:
3596 ; X86:       # %bb.0:
3597 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3598 ; X86-NEXT:    vfmulcph {ru-sae}, %ymm1, %ymm0, %ymm2 {%k1} # encoding: [0x62,0xf6,0x7a,0x59,0xd6,0xd1]
3599 ; X86-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3600 ; X86-NEXT:    retl # encoding: [0xc3]
3602 ; X64-LABEL: test_int_x86_mask_vfmulcph256:
3603 ; X64:       # %bb.0:
3604 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3605 ; X64-NEXT:    vfmulcph {ru-sae}, %ymm1, %ymm0, %ymm2 {%k1} # encoding: [0x62,0xf6,0x7a,0x59,0xd6,0xd1]
3606 ; X64-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3607 ; X64-NEXT:    retq # encoding: [0xc3]
3608   %ret = call <8 x float> @llvm.x86.avx10.mask.vfmulcph256(<8 x float> %a, <8 x float> %c, <8 x float> %d, i8 %b, i32 10)
3609   ret <8 x float> %ret
3612 define <8 x float> @test_int_x86_maskz_vfmulcph256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
3613 ; X86-LABEL: test_int_x86_maskz_vfmulcph256:
3614 ; X86:       # %bb.0:
3615 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3616 ; X86-NEXT:    vfmulcph {rd-sae}, %ymm1, %ymm0, %ymm2 {%k1} {z} # encoding: [0x62,0xf6,0x7a,0xb9,0xd6,0xd1]
3617 ; X86-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3618 ; X86-NEXT:    retl # encoding: [0xc3]
3620 ; X64-LABEL: test_int_x86_maskz_vfmulcph256:
3621 ; X64:       # %bb.0:
3622 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3623 ; X64-NEXT:    vfmulcph {rd-sae}, %ymm1, %ymm0, %ymm2 {%k1} {z} # encoding: [0x62,0xf6,0x7a,0xb9,0xd6,0xd1]
3624 ; X64-NEXT:    vmovaps %ymm2, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
3625 ; X64-NEXT:    retq # encoding: [0xc3]
3626   %ret = call <8 x float> @llvm.x86.avx10.mask.vfmulcph256(<8 x float> %a, <8 x float> %c, <8 x float> zeroinitializer, i8 %b, i32 9)
3627   ret <8 x float> %ret
3630 declare <4 x double> @llvm.x86.avx10.mask.vgetexppd256(<4 x double>, <4 x double>, i8, i32)
3631 define <4 x double> @test_int_x86_vgetexppd256(<4 x double> %a) nounwind {
3632 ; CHECK-LABEL: test_int_x86_vgetexppd256:
3633 ; CHECK:       # %bb.0:
3634 ; CHECK-NEXT:    vgetexppd {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf2,0xf9,0x18,0x42,0xc0]
3635 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3636   %ret = call <4 x double> @llvm.x86.avx10.mask.vgetexppd256(<4 x double> %a, <4 x double> undef, i8 -1, i32 8)
3637   ret <4 x double> %ret
3640 define <4 x double> @test_int_x86_mask_vgetexppd256(<4 x double> %a, i8 %b, <4 x double> %c) nounwind {
3641 ; X86-LABEL: test_int_x86_mask_vgetexppd256:
3642 ; X86:       # %bb.0:
3643 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3644 ; X86-NEXT:    vgetexppd {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0xf9,0x19,0x42,0xc1]
3645 ; X86-NEXT:    retl # encoding: [0xc3]
3647 ; X64-LABEL: test_int_x86_mask_vgetexppd256:
3648 ; X64:       # %bb.0:
3649 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3650 ; X64-NEXT:    vgetexppd {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0xf9,0x19,0x42,0xc1]
3651 ; X64-NEXT:    retq # encoding: [0xc3]
3652   %ret = call <4 x double> @llvm.x86.avx10.mask.vgetexppd256(<4 x double> %c, <4 x double> %a, i8 %b, i32 8)
3653   ret <4 x double> %ret
3656 define <4 x double> @test_int_x86_maskz_vgetexppd256(i8 %a, <4 x double> %b) nounwind {
3657 ; X86-LABEL: test_int_x86_maskz_vgetexppd256:
3658 ; X86:       # %bb.0:
3659 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3660 ; X86-NEXT:    vgetexppd {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0xf9,0x99,0x42,0xc0]
3661 ; X86-NEXT:    retl # encoding: [0xc3]
3663 ; X64-LABEL: test_int_x86_maskz_vgetexppd256:
3664 ; X64:       # %bb.0:
3665 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3666 ; X64-NEXT:    vgetexppd {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0xf9,0x99,0x42,0xc0]
3667 ; X64-NEXT:    retq # encoding: [0xc3]
3668   %ret = call <4 x double> @llvm.x86.avx10.mask.vgetexppd256(<4 x double> %b, <4 x double> zeroinitializer, i8 %a, i32 8)
3669   ret <4 x double> %ret
3672 declare <16 x half> @llvm.x86.avx10.mask.vgetexpph256(<16 x half>, <16 x half>, i16, i32)
3673 define <16 x half> @test_int_x86_vgetexpph256(<16 x half> %a) nounwind {
3674 ; CHECK-LABEL: test_int_x86_vgetexpph256:
3675 ; CHECK:       # %bb.0:
3676 ; CHECK-NEXT:    vgetexpph {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf6,0x79,0x18,0x42,0xc0]
3677 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3678   %ret = call <16 x half> @llvm.x86.avx10.mask.vgetexpph256(<16 x half> %a, <16 x half> undef, i16 -1, i32 8)
3679   ret <16 x half> %ret
3682 define <16 x half> @test_int_x86_mask_vgetexpph256(<16 x half> %a, i16 %b, <16 x half> %c) nounwind {
3683 ; X86-LABEL: test_int_x86_mask_vgetexpph256:
3684 ; X86:       # %bb.0:
3685 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
3686 ; X86-NEXT:    vgetexpph {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf6,0x79,0x19,0x42,0xc1]
3687 ; X86-NEXT:    retl # encoding: [0xc3]
3689 ; X64-LABEL: test_int_x86_mask_vgetexpph256:
3690 ; X64:       # %bb.0:
3691 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3692 ; X64-NEXT:    vgetexpph {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf6,0x79,0x19,0x42,0xc1]
3693 ; X64-NEXT:    retq # encoding: [0xc3]
3694   %ret = call <16 x half> @llvm.x86.avx10.mask.vgetexpph256(<16 x half> %c, <16 x half> %a, i16 %b, i32 8)
3695   ret <16 x half> %ret
3698 define <16 x half> @test_int_x86_maskz_vgetexpph256(i16 %a, <16 x half> %b) nounwind {
3699 ; X86-LABEL: test_int_x86_maskz_vgetexpph256:
3700 ; X86:       # %bb.0:
3701 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
3702 ; X86-NEXT:    vgetexpph {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf6,0x79,0x99,0x42,0xc0]
3703 ; X86-NEXT:    retl # encoding: [0xc3]
3705 ; X64-LABEL: test_int_x86_maskz_vgetexpph256:
3706 ; X64:       # %bb.0:
3707 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3708 ; X64-NEXT:    vgetexpph {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf6,0x79,0x99,0x42,0xc0]
3709 ; X64-NEXT:    retq # encoding: [0xc3]
3710   %ret = call <16 x half> @llvm.x86.avx10.mask.vgetexpph256(<16 x half> %b, <16 x half> zeroinitializer, i16 %a, i32 8)
3711   ret <16 x half> %ret
3714 declare <8 x float> @llvm.x86.avx10.mask.vgetexpps256(<8 x float>, <8 x float>, i8, i32)
3715 define <8 x float> @test_int_x86_vgetexpps256(<8 x float> %a) nounwind {
3716 ; CHECK-LABEL: test_int_x86_vgetexpps256:
3717 ; CHECK:       # %bb.0:
3718 ; CHECK-NEXT:    vgetexpps {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf2,0x79,0x18,0x42,0xc0]
3719 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3720   %ret = call <8 x float> @llvm.x86.avx10.mask.vgetexpps256(<8 x float> %a, <8 x float> undef, i8 -1, i32 8)
3721   ret <8 x float> %ret
3724 define <8 x float> @test_int_x86_mask_vgetexpps256(<8 x float> %a, i8 %b, <8 x float> %c) nounwind {
3725 ; X86-LABEL: test_int_x86_mask_vgetexpps256:
3726 ; X86:       # %bb.0:
3727 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3728 ; X86-NEXT:    vgetexpps {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x79,0x19,0x42,0xc1]
3729 ; X86-NEXT:    retl # encoding: [0xc3]
3731 ; X64-LABEL: test_int_x86_mask_vgetexpps256:
3732 ; X64:       # %bb.0:
3733 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3734 ; X64-NEXT:    vgetexpps {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x79,0x19,0x42,0xc1]
3735 ; X64-NEXT:    retq # encoding: [0xc3]
3736   %ret = call <8 x float> @llvm.x86.avx10.mask.vgetexpps256(<8 x float> %c, <8 x float> %a, i8 %b, i32 8)
3737   ret <8 x float> %ret
3740 define <8 x float> @test_int_x86_maskz_vgetexpps256(i8 %a, <8 x float> %b) nounwind {
3741 ; X86-LABEL: test_int_x86_maskz_vgetexpps256:
3742 ; X86:       # %bb.0:
3743 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3744 ; X86-NEXT:    vgetexpps {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x79,0x99,0x42,0xc0]
3745 ; X86-NEXT:    retl # encoding: [0xc3]
3747 ; X64-LABEL: test_int_x86_maskz_vgetexpps256:
3748 ; X64:       # %bb.0:
3749 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3750 ; X64-NEXT:    vgetexpps {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x79,0x99,0x42,0xc0]
3751 ; X64-NEXT:    retq # encoding: [0xc3]
3752   %ret = call <8 x float> @llvm.x86.avx10.mask.vgetexpps256(<8 x float> %b, <8 x float> zeroinitializer, i8 %a, i32 8)
3753   ret <8 x float> %ret
3756 declare <4 x double> @llvm.x86.avx10.mask.vgetmantpd256(<4 x double>, i32, <4 x double>, i8, i32)
3757 define <4 x double> @test_int_x86_vgetmantpd256(<4 x double> %a) nounwind {
3758 ; CHECK-LABEL: test_int_x86_vgetmantpd256:
3759 ; CHECK:       # %bb.0:
3760 ; CHECK-NEXT:    vgetmantpd $127, {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf3,0xf9,0x18,0x26,0xc0,0x7f]
3761 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3762   %ret = call <4 x double> @llvm.x86.avx10.mask.vgetmantpd256(<4 x double> %a, i32 127, <4 x double> undef, i8 -1, i32 8)
3763   ret <4 x double> %ret
3766 define <4 x double> @test_int_x86_mask_vgetmantpd256(<4 x double> %a, i8 %b, <4 x double> %c) nounwind {
3767 ; X86-LABEL: test_int_x86_mask_vgetmantpd256:
3768 ; X86:       # %bb.0:
3769 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3770 ; X86-NEXT:    vgetmantpd $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0xf9,0x19,0x26,0xc1,0x7f]
3771 ; X86-NEXT:    retl # encoding: [0xc3]
3773 ; X64-LABEL: test_int_x86_mask_vgetmantpd256:
3774 ; X64:       # %bb.0:
3775 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3776 ; X64-NEXT:    vgetmantpd $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0xf9,0x19,0x26,0xc1,0x7f]
3777 ; X64-NEXT:    retq # encoding: [0xc3]
3778   %ret = call <4 x double> @llvm.x86.avx10.mask.vgetmantpd256(<4 x double> %c, i32 127, <4 x double> %a, i8 %b, i32 8)
3779   ret <4 x double> %ret
3782 define <4 x double> @test_int_x86_maskz_vgetmantpd256(i8 %a, <4 x double> %b) nounwind {
3783 ; X86-LABEL: test_int_x86_maskz_vgetmantpd256:
3784 ; X86:       # %bb.0:
3785 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3786 ; X86-NEXT:    vgetmantpd $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0xf9,0x99,0x26,0xc0,0x7f]
3787 ; X86-NEXT:    retl # encoding: [0xc3]
3789 ; X64-LABEL: test_int_x86_maskz_vgetmantpd256:
3790 ; X64:       # %bb.0:
3791 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3792 ; X64-NEXT:    vgetmantpd $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0xf9,0x99,0x26,0xc0,0x7f]
3793 ; X64-NEXT:    retq # encoding: [0xc3]
3794   %ret = call <4 x double> @llvm.x86.avx10.mask.vgetmantpd256(<4 x double> %b, i32 127, <4 x double> zeroinitializer, i8 %a, i32 8)
3795   ret <4 x double> %ret
3798 declare <16 x half> @llvm.x86.avx10.mask.vgetmantph256(<16 x half>, i32, <16 x half>, i16, i32)
3799 define <16 x half> @test_int_x86_vgetmantph256(<16 x half> %a) nounwind {
3800 ; CHECK-LABEL: test_int_x86_vgetmantph256:
3801 ; CHECK:       # %bb.0:
3802 ; CHECK-NEXT:    vgetmantph $127, {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf3,0x78,0x18,0x26,0xc0,0x7f]
3803 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3804   %ret = call <16 x half> @llvm.x86.avx10.mask.vgetmantph256(<16 x half> %a, i32 127, <16 x half> undef, i16 -1, i32 8)
3805   ret <16 x half> %ret
3808 define <16 x half> @test_int_x86_mask_vgetmantph256(<16 x half> %a, i16 %b, <16 x half> %c) nounwind {
3809 ; X86-LABEL: test_int_x86_mask_vgetmantph256:
3810 ; X86:       # %bb.0:
3811 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
3812 ; X86-NEXT:    vgetmantph $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x78,0x19,0x26,0xc1,0x7f]
3813 ; X86-NEXT:    retl # encoding: [0xc3]
3815 ; X64-LABEL: test_int_x86_mask_vgetmantph256:
3816 ; X64:       # %bb.0:
3817 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3818 ; X64-NEXT:    vgetmantph $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x78,0x19,0x26,0xc1,0x7f]
3819 ; X64-NEXT:    retq # encoding: [0xc3]
3820   %ret = call <16 x half> @llvm.x86.avx10.mask.vgetmantph256(<16 x half> %c, i32 127, <16 x half> %a, i16 %b, i32 8)
3821   ret <16 x half> %ret
3824 define <16 x half> @test_int_x86_maskz_vgetmantph256(i16 %a, <16 x half> %b) nounwind {
3825 ; X86-LABEL: test_int_x86_maskz_vgetmantph256:
3826 ; X86:       # %bb.0:
3827 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
3828 ; X86-NEXT:    vgetmantph $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x78,0x99,0x26,0xc0,0x7f]
3829 ; X86-NEXT:    retl # encoding: [0xc3]
3831 ; X64-LABEL: test_int_x86_maskz_vgetmantph256:
3832 ; X64:       # %bb.0:
3833 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3834 ; X64-NEXT:    vgetmantph $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x78,0x99,0x26,0xc0,0x7f]
3835 ; X64-NEXT:    retq # encoding: [0xc3]
3836   %ret = call <16 x half> @llvm.x86.avx10.mask.vgetmantph256(<16 x half> %b, i32 127, <16 x half> zeroinitializer, i16 %a, i32 8)
3837   ret <16 x half> %ret
3840 declare <8 x float> @llvm.x86.avx10.mask.vgetmantps256(<8 x float>, i32, <8 x float>, i8, i32)
3841 define <8 x float> @test_int_x86_vgetmantps256(<8 x float> %a) nounwind {
3842 ; CHECK-LABEL: test_int_x86_vgetmantps256:
3843 ; CHECK:       # %bb.0:
3844 ; CHECK-NEXT:    vgetmantps $127, {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf3,0x79,0x18,0x26,0xc0,0x7f]
3845 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3846   %ret = call <8 x float> @llvm.x86.avx10.mask.vgetmantps256(<8 x float> %a, i32 127, <8 x float> undef, i8 -1, i32 8)
3847   ret <8 x float> %ret
3850 define <8 x float> @test_int_x86_mask_vgetmantps256(<8 x float> %a, i8 %b, <8 x float> %c) nounwind {
3851 ; X86-LABEL: test_int_x86_mask_vgetmantps256:
3852 ; X86:       # %bb.0:
3853 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3854 ; X86-NEXT:    vgetmantps $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x79,0x19,0x26,0xc1,0x7f]
3855 ; X86-NEXT:    retl # encoding: [0xc3]
3857 ; X64-LABEL: test_int_x86_mask_vgetmantps256:
3858 ; X64:       # %bb.0:
3859 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3860 ; X64-NEXT:    vgetmantps $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x79,0x19,0x26,0xc1,0x7f]
3861 ; X64-NEXT:    retq # encoding: [0xc3]
3862   %ret = call <8 x float> @llvm.x86.avx10.mask.vgetmantps256(<8 x float> %c, i32 127, <8 x float> %a, i8 %b, i32 8)
3863   ret <8 x float> %ret
3866 define <8 x float> @test_int_x86_maskz_vgetmantps256(i8 %a, <8 x float> %b) nounwind {
3867 ; X86-LABEL: test_int_x86_maskz_vgetmantps256:
3868 ; X86:       # %bb.0:
3869 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3870 ; X86-NEXT:    vgetmantps $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x79,0x99,0x26,0xc0,0x7f]
3871 ; X86-NEXT:    retl # encoding: [0xc3]
3873 ; X64-LABEL: test_int_x86_maskz_vgetmantps256:
3874 ; X64:       # %bb.0:
3875 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3876 ; X64-NEXT:    vgetmantps $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x79,0x99,0x26,0xc0,0x7f]
3877 ; X64-NEXT:    retq # encoding: [0xc3]
3878   %ret = call <8 x float> @llvm.x86.avx10.mask.vgetmantps256(<8 x float> %b, i32 127, <8 x float> zeroinitializer, i8 %a, i32 8)
3879   ret <8 x float> %ret
3882 declare <4 x double> @llvm.x86.avx10.vmaxpd256(<4 x double>, <4 x double>, i32)
3883 define <4 x double> @test_int_x86_vmaxpd256(<4 x double> %A, <4 x double> %B) nounwind {
3884 ; CHECK-LABEL: test_int_x86_vmaxpd256:
3885 ; CHECK:       # %bb.0:
3886 ; CHECK-NEXT:    vmaxpd {sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xf9,0x18,0x5f,0xc1]
3887 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3888   %ret = call <4 x double> @llvm.x86.avx10.vmaxpd256(<4 x double> %A, <4 x double> %B, i32 8)
3889   ret <4 x double> %ret
3892 define <4 x double> @test_int_x86_mask_vmaxpd256(<4 x double> %A, i4 %B, <4 x double> %C, <4 x double> %D) nounwind {
3893 ; X86-LABEL: test_int_x86_mask_vmaxpd256:
3894 ; X86:       # %bb.0:
3895 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3896 ; X86-NEXT:    vmaxpd {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf1,0x19,0x5f,0xc2]
3897 ; X86-NEXT:    retl # encoding: [0xc3]
3899 ; X64-LABEL: test_int_x86_mask_vmaxpd256:
3900 ; X64:       # %bb.0:
3901 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3902 ; X64-NEXT:    vmaxpd {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf1,0x19,0x5f,0xc2]
3903 ; X64-NEXT:    retq # encoding: [0xc3]
3904   %ret0 = call <4 x double> @llvm.x86.avx10.vmaxpd256(<4 x double> %C, <4 x double> %D, i32 8)
3905   %msk = bitcast i4 %B to <4 x i1>
3906   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> %A
3907   ret <4 x double> %ret
3910 define <4 x double> @test_int_x86_maskz_vmaxpd256(i4 %A, <4 x double> %B, <4 x double> %C) nounwind {
3911 ; X86-LABEL: test_int_x86_maskz_vmaxpd256:
3912 ; X86:       # %bb.0:
3913 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3914 ; X86-NEXT:    vmaxpd {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0x99,0x5f,0xc1]
3915 ; X86-NEXT:    retl # encoding: [0xc3]
3917 ; X64-LABEL: test_int_x86_maskz_vmaxpd256:
3918 ; X64:       # %bb.0:
3919 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3920 ; X64-NEXT:    vmaxpd {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0x99,0x5f,0xc1]
3921 ; X64-NEXT:    retq # encoding: [0xc3]
3922   %ret0 = call <4 x double> @llvm.x86.avx10.vmaxpd256(<4 x double> %B, <4 x double> %C, i32 8)
3923   %msk = bitcast i4 %A to <4 x i1>
3924   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> zeroinitializer
3925   ret <4 x double> %ret
3928 declare <16 x half> @llvm.x86.avx10.vmaxph256(<16 x half>, <16 x half>, i32)
3929 define <16 x half> @test_int_x86_vmaxph256(<16 x half> %A, <16 x half> %B) nounwind {
3930 ; CHECK-LABEL: test_int_x86_vmaxph256:
3931 ; CHECK:       # %bb.0:
3932 ; CHECK-NEXT:    vmaxph {sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x78,0x18,0x5f,0xc1]
3933 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3934   %ret = call <16 x half> @llvm.x86.avx10.vmaxph256(<16 x half> %A, <16 x half> %B, i32 8)
3935   ret <16 x half> %ret
3938 define <16 x half> @test_int_x86_mask_vmaxph256(<16 x half> %A, i16 %B, <16 x half> %C, <16 x half> %D) nounwind {
3939 ; X86-LABEL: test_int_x86_mask_vmaxph256:
3940 ; X86:       # %bb.0:
3941 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
3942 ; X86-NEXT:    vmaxph {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x70,0x19,0x5f,0xc2]
3943 ; X86-NEXT:    retl # encoding: [0xc3]
3945 ; X64-LABEL: test_int_x86_mask_vmaxph256:
3946 ; X64:       # %bb.0:
3947 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3948 ; X64-NEXT:    vmaxph {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x70,0x19,0x5f,0xc2]
3949 ; X64-NEXT:    retq # encoding: [0xc3]
3950   %ret0 = call <16 x half> @llvm.x86.avx10.vmaxph256(<16 x half> %C, <16 x half> %D, i32 8)
3951   %msk = bitcast i16 %B to <16 x i1>
3952   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> %A
3953   ret <16 x half> %ret
3956 define <16 x half> @test_int_x86_maskz_vmaxph256(i16 %A, <16 x half> %B, <16 x half> %C) nounwind {
3957 ; X86-LABEL: test_int_x86_maskz_vmaxph256:
3958 ; X86:       # %bb.0:
3959 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
3960 ; X86-NEXT:    vmaxph {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0x99,0x5f,0xc1]
3961 ; X86-NEXT:    retl # encoding: [0xc3]
3963 ; X64-LABEL: test_int_x86_maskz_vmaxph256:
3964 ; X64:       # %bb.0:
3965 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3966 ; X64-NEXT:    vmaxph {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0x99,0x5f,0xc1]
3967 ; X64-NEXT:    retq # encoding: [0xc3]
3968   %ret0 = call <16 x half> @llvm.x86.avx10.vmaxph256(<16 x half> %B, <16 x half> %C, i32 8)
3969   %msk = bitcast i16 %A to <16 x i1>
3970   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> zeroinitializer
3971   ret <16 x half> %ret
3974 declare <8 x float> @llvm.x86.avx10.vmaxps256(<8 x float>, <8 x float>, i32)
3975 define <8 x float> @test_int_x86_vmaxps256(<8 x float> %A, <8 x float> %B) nounwind {
3976 ; CHECK-LABEL: test_int_x86_vmaxps256:
3977 ; CHECK:       # %bb.0:
3978 ; CHECK-NEXT:    vmaxps {sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x78,0x18,0x5f,0xc1]
3979 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
3980   %ret = call <8 x float> @llvm.x86.avx10.vmaxps256(<8 x float> %A, <8 x float> %B, i32 8)
3981   ret <8 x float> %ret
3984 define <8 x float> @test_int_x86_mask_vmaxps256(<8 x float> %A, i8 %B, <8 x float> %C, <8 x float> %D) nounwind {
3985 ; X86-LABEL: test_int_x86_mask_vmaxps256:
3986 ; X86:       # %bb.0:
3987 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
3988 ; X86-NEXT:    vmaxps {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x70,0x19,0x5f,0xc2]
3989 ; X86-NEXT:    retl # encoding: [0xc3]
3991 ; X64-LABEL: test_int_x86_mask_vmaxps256:
3992 ; X64:       # %bb.0:
3993 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
3994 ; X64-NEXT:    vmaxps {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x70,0x19,0x5f,0xc2]
3995 ; X64-NEXT:    retq # encoding: [0xc3]
3996   %ret0 = call <8 x float> @llvm.x86.avx10.vmaxps256(<8 x float> %C, <8 x float> %D, i32 8)
3997   %msk = bitcast i8 %B to <8 x i1>
3998   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> %A
3999   ret <8 x float> %ret
4002 define <8 x float> @test_int_x86_maskz_vmaxps256(i8 %A, <8 x float> %B, <8 x float> %C) nounwind {
4003 ; X86-LABEL: test_int_x86_maskz_vmaxps256:
4004 ; X86:       # %bb.0:
4005 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4006 ; X86-NEXT:    vmaxps {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0x99,0x5f,0xc1]
4007 ; X86-NEXT:    retl # encoding: [0xc3]
4009 ; X64-LABEL: test_int_x86_maskz_vmaxps256:
4010 ; X64:       # %bb.0:
4011 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4012 ; X64-NEXT:    vmaxps {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0x99,0x5f,0xc1]
4013 ; X64-NEXT:    retq # encoding: [0xc3]
4014   %ret0 = call <8 x float> @llvm.x86.avx10.vmaxps256(<8 x float> %B, <8 x float> %C, i32 8)
4015   %msk = bitcast i8 %A to <8 x i1>
4016   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> zeroinitializer
4017   ret <8 x float> %ret
4020 declare <4 x double> @llvm.x86.avx10.vminpd256(<4 x double>, <4 x double>, i32)
4021 define <4 x double> @test_int_x86_vminpd256(<4 x double> %A, <4 x double> %B) nounwind {
4022 ; CHECK-LABEL: test_int_x86_vminpd256:
4023 ; CHECK:       # %bb.0:
4024 ; CHECK-NEXT:    vminpd {sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xf9,0x18,0x5d,0xc1]
4025 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4026   %ret = call <4 x double> @llvm.x86.avx10.vminpd256(<4 x double> %A, <4 x double> %B, i32 8)
4027   ret <4 x double> %ret
4030 define <4 x double> @test_int_x86_mask_vminpd256(<4 x double> %A, i4 %B, <4 x double> %C, <4 x double> %D) nounwind {
4031 ; X86-LABEL: test_int_x86_mask_vminpd256:
4032 ; X86:       # %bb.0:
4033 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4034 ; X86-NEXT:    vminpd {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf1,0x19,0x5d,0xc2]
4035 ; X86-NEXT:    retl # encoding: [0xc3]
4037 ; X64-LABEL: test_int_x86_mask_vminpd256:
4038 ; X64:       # %bb.0:
4039 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4040 ; X64-NEXT:    vminpd {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf1,0x19,0x5d,0xc2]
4041 ; X64-NEXT:    retq # encoding: [0xc3]
4042   %ret0 = call <4 x double> @llvm.x86.avx10.vminpd256(<4 x double> %C, <4 x double> %D, i32 8)
4043   %msk = bitcast i4 %B to <4 x i1>
4044   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> %A
4045   ret <4 x double> %ret
4048 define <4 x double> @test_int_x86_maskz_vminpd256(i4 %A, <4 x double> %B, <4 x double> %C) nounwind {
4049 ; X86-LABEL: test_int_x86_maskz_vminpd256:
4050 ; X86:       # %bb.0:
4051 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4052 ; X86-NEXT:    vminpd {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0x99,0x5d,0xc1]
4053 ; X86-NEXT:    retl # encoding: [0xc3]
4055 ; X64-LABEL: test_int_x86_maskz_vminpd256:
4056 ; X64:       # %bb.0:
4057 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4058 ; X64-NEXT:    vminpd {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0x99,0x5d,0xc1]
4059 ; X64-NEXT:    retq # encoding: [0xc3]
4060   %ret0 = call <4 x double> @llvm.x86.avx10.vminpd256(<4 x double> %B, <4 x double> %C, i32 8)
4061   %msk = bitcast i4 %A to <4 x i1>
4062   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> zeroinitializer
4063   ret <4 x double> %ret
4066 declare <16 x half> @llvm.x86.avx10.vminph256(<16 x half>, <16 x half>, i32)
4067 define <16 x half> @test_int_x86_vminph256(<16 x half> %A, <16 x half> %B) nounwind {
4068 ; CHECK-LABEL: test_int_x86_vminph256:
4069 ; CHECK:       # %bb.0:
4070 ; CHECK-NEXT:    vminph {sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x78,0x18,0x5d,0xc1]
4071 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4072   %ret = call <16 x half> @llvm.x86.avx10.vminph256(<16 x half> %A, <16 x half> %B, i32 8)
4073   ret <16 x half> %ret
4076 define <16 x half> @test_int_x86_mask_vminph256(<16 x half> %A, i16 %B, <16 x half> %C, <16 x half> %D) nounwind {
4077 ; X86-LABEL: test_int_x86_mask_vminph256:
4078 ; X86:       # %bb.0:
4079 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4080 ; X86-NEXT:    vminph {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x70,0x19,0x5d,0xc2]
4081 ; X86-NEXT:    retl # encoding: [0xc3]
4083 ; X64-LABEL: test_int_x86_mask_vminph256:
4084 ; X64:       # %bb.0:
4085 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4086 ; X64-NEXT:    vminph {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x70,0x19,0x5d,0xc2]
4087 ; X64-NEXT:    retq # encoding: [0xc3]
4088   %ret0 = call <16 x half> @llvm.x86.avx10.vminph256(<16 x half> %C, <16 x half> %D, i32 8)
4089   %msk = bitcast i16 %B to <16 x i1>
4090   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> %A
4091   ret <16 x half> %ret
4094 define <16 x half> @test_int_x86_maskz_vminph256(i16 %A, <16 x half> %B, <16 x half> %C) nounwind {
4095 ; X86-LABEL: test_int_x86_maskz_vminph256:
4096 ; X86:       # %bb.0:
4097 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4098 ; X86-NEXT:    vminph {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0x99,0x5d,0xc1]
4099 ; X86-NEXT:    retl # encoding: [0xc3]
4101 ; X64-LABEL: test_int_x86_maskz_vminph256:
4102 ; X64:       # %bb.0:
4103 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4104 ; X64-NEXT:    vminph {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0x99,0x5d,0xc1]
4105 ; X64-NEXT:    retq # encoding: [0xc3]
4106   %ret0 = call <16 x half> @llvm.x86.avx10.vminph256(<16 x half> %B, <16 x half> %C, i32 8)
4107   %msk = bitcast i16 %A to <16 x i1>
4108   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> zeroinitializer
4109   ret <16 x half> %ret
4112 declare <8 x float> @llvm.x86.avx10.vminps256(<8 x float>, <8 x float>, i32)
4113 define <8 x float> @test_int_x86_vminps256(<8 x float> %A, <8 x float> %B) nounwind {
4114 ; CHECK-LABEL: test_int_x86_vminps256:
4115 ; CHECK:       # %bb.0:
4116 ; CHECK-NEXT:    vminps {sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x78,0x18,0x5d,0xc1]
4117 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4118   %ret = call <8 x float> @llvm.x86.avx10.vminps256(<8 x float> %A, <8 x float> %B, i32 8)
4119   ret <8 x float> %ret
4122 define <8 x float> @test_int_x86_mask_vminps256(<8 x float> %A, i8 %B, <8 x float> %C, <8 x float> %D) nounwind {
4123 ; X86-LABEL: test_int_x86_mask_vminps256:
4124 ; X86:       # %bb.0:
4125 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4126 ; X86-NEXT:    vminps {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x70,0x19,0x5d,0xc2]
4127 ; X86-NEXT:    retl # encoding: [0xc3]
4129 ; X64-LABEL: test_int_x86_mask_vminps256:
4130 ; X64:       # %bb.0:
4131 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4132 ; X64-NEXT:    vminps {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x70,0x19,0x5d,0xc2]
4133 ; X64-NEXT:    retq # encoding: [0xc3]
4134   %ret0 = call <8 x float> @llvm.x86.avx10.vminps256(<8 x float> %C, <8 x float> %D, i32 8)
4135   %msk = bitcast i8 %B to <8 x i1>
4136   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> %A
4137   ret <8 x float> %ret
4140 define <8 x float> @test_int_x86_maskz_vminps256(i8 %A, <8 x float> %B, <8 x float> %C) nounwind {
4141 ; X86-LABEL: test_int_x86_maskz_vminps256:
4142 ; X86:       # %bb.0:
4143 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4144 ; X86-NEXT:    vminps {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0x99,0x5d,0xc1]
4145 ; X86-NEXT:    retl # encoding: [0xc3]
4147 ; X64-LABEL: test_int_x86_maskz_vminps256:
4148 ; X64:       # %bb.0:
4149 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4150 ; X64-NEXT:    vminps {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0x99,0x5d,0xc1]
4151 ; X64-NEXT:    retq # encoding: [0xc3]
4152   %ret0 = call <8 x float> @llvm.x86.avx10.vminps256(<8 x float> %B, <8 x float> %C, i32 8)
4153   %msk = bitcast i8 %A to <8 x i1>
4154   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> zeroinitializer
4155   ret <8 x float> %ret
4158 declare <4 x double> @llvm.x86.avx10.vmulpd256(<4 x double>, <4 x double>, i32)
4159 define <4 x double> @test_int_x86_vmulpd256(<4 x double> %A, <4 x double> %B) nounwind {
4160 ; CHECK-LABEL: test_int_x86_vmulpd256:
4161 ; CHECK:       # %bb.0:
4162 ; CHECK-NEXT:    vmulpd {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xf9,0x78,0x59,0xc1]
4163 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4164   %ret = call <4 x double> @llvm.x86.avx10.vmulpd256(<4 x double> %A, <4 x double> %B, i32 11)
4165   ret <4 x double> %ret
4168 define <4 x double> @test_int_x86_mask_vmulpd256(<4 x double> %A, i4 %B, <4 x double> %C, <4 x double> %D) nounwind {
4169 ; X86-LABEL: test_int_x86_mask_vmulpd256:
4170 ; X86:       # %bb.0:
4171 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4172 ; X86-NEXT:    vmulpd {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf1,0x59,0x59,0xc2]
4173 ; X86-NEXT:    retl # encoding: [0xc3]
4175 ; X64-LABEL: test_int_x86_mask_vmulpd256:
4176 ; X64:       # %bb.0:
4177 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4178 ; X64-NEXT:    vmulpd {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf1,0x59,0x59,0xc2]
4179 ; X64-NEXT:    retq # encoding: [0xc3]
4180   %ret0 = call <4 x double> @llvm.x86.avx10.vmulpd256(<4 x double> %C, <4 x double> %D, i32 10)
4181   %msk = bitcast i4 %B to <4 x i1>
4182   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> %A
4183   ret <4 x double> %ret
4186 define <4 x double> @test_int_x86_maskz_vmulpd256(i4 %A, <4 x double> %B, <4 x double> %C) nounwind {
4187 ; X86-LABEL: test_int_x86_maskz_vmulpd256:
4188 ; X86:       # %bb.0:
4189 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4190 ; X86-NEXT:    vmulpd {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x59,0xc1]
4191 ; X86-NEXT:    retl # encoding: [0xc3]
4193 ; X64-LABEL: test_int_x86_maskz_vmulpd256:
4194 ; X64:       # %bb.0:
4195 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4196 ; X64-NEXT:    vmulpd {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x59,0xc1]
4197 ; X64-NEXT:    retq # encoding: [0xc3]
4198   %ret0 = call <4 x double> @llvm.x86.avx10.vmulpd256(<4 x double> %B, <4 x double> %C, i32 9)
4199   %msk = bitcast i4 %A to <4 x i1>
4200   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> zeroinitializer
4201   ret <4 x double> %ret
4204 declare <16 x half> @llvm.x86.avx10.vmulph256(<16 x half>, <16 x half>, i32)
4205 define <16 x half> @test_int_x86_vmulph256(<16 x half> %A, <16 x half> %B) nounwind {
4206 ; CHECK-LABEL: test_int_x86_vmulph256:
4207 ; CHECK:       # %bb.0:
4208 ; CHECK-NEXT:    vmulph {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x78,0x78,0x59,0xc1]
4209 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4210   %ret = call <16 x half> @llvm.x86.avx10.vmulph256(<16 x half> %A, <16 x half> %B, i32 11)
4211   ret <16 x half> %ret
4214 define <16 x half> @test_int_x86_mask_vmulph256(<16 x half> %A, i16 %B, <16 x half> %C, <16 x half> %D) nounwind {
4215 ; X86-LABEL: test_int_x86_mask_vmulph256:
4216 ; X86:       # %bb.0:
4217 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4218 ; X86-NEXT:    vmulph {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x70,0x59,0x59,0xc2]
4219 ; X86-NEXT:    retl # encoding: [0xc3]
4221 ; X64-LABEL: test_int_x86_mask_vmulph256:
4222 ; X64:       # %bb.0:
4223 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4224 ; X64-NEXT:    vmulph {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x70,0x59,0x59,0xc2]
4225 ; X64-NEXT:    retq # encoding: [0xc3]
4226   %ret0 = call <16 x half> @llvm.x86.avx10.vmulph256(<16 x half> %C, <16 x half> %D, i32 10)
4227   %msk = bitcast i16 %B to <16 x i1>
4228   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> %A
4229   ret <16 x half> %ret
4232 define <16 x half> @test_int_x86_maskz_vmulph256(i16 %A, <16 x half> %B, <16 x half> %C) nounwind {
4233 ; X86-LABEL: test_int_x86_maskz_vmulph256:
4234 ; X86:       # %bb.0:
4235 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4236 ; X86-NEXT:    vmulph {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x59,0xc1]
4237 ; X86-NEXT:    retl # encoding: [0xc3]
4239 ; X64-LABEL: test_int_x86_maskz_vmulph256:
4240 ; X64:       # %bb.0:
4241 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4242 ; X64-NEXT:    vmulph {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x59,0xc1]
4243 ; X64-NEXT:    retq # encoding: [0xc3]
4244   %ret0 = call <16 x half> @llvm.x86.avx10.vmulph256(<16 x half> %B, <16 x half> %C, i32 9)
4245   %msk = bitcast i16 %A to <16 x i1>
4246   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> zeroinitializer
4247   ret <16 x half> %ret
4250 declare <8 x float> @llvm.x86.avx10.vmulps256(<8 x float>, <8 x float>, i32)
4251 define <8 x float> @test_int_x86_vmulps256(<8 x float> %A, <8 x float> %B) nounwind {
4252 ; CHECK-LABEL: test_int_x86_vmulps256:
4253 ; CHECK:       # %bb.0:
4254 ; CHECK-NEXT:    vmulps {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x78,0x78,0x59,0xc1]
4255 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4256   %ret = call <8 x float> @llvm.x86.avx10.vmulps256(<8 x float> %A, <8 x float> %B, i32 11)
4257   ret <8 x float> %ret
4260 define <8 x float> @test_int_x86_mask_vmulps256(<8 x float> %A, i8 %B, <8 x float> %C, <8 x float> %D) nounwind {
4261 ; X86-LABEL: test_int_x86_mask_vmulps256:
4262 ; X86:       # %bb.0:
4263 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4264 ; X86-NEXT:    vmulps {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x70,0x59,0x59,0xc2]
4265 ; X86-NEXT:    retl # encoding: [0xc3]
4267 ; X64-LABEL: test_int_x86_mask_vmulps256:
4268 ; X64:       # %bb.0:
4269 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4270 ; X64-NEXT:    vmulps {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x70,0x59,0x59,0xc2]
4271 ; X64-NEXT:    retq # encoding: [0xc3]
4272   %ret0 = call <8 x float> @llvm.x86.avx10.vmulps256(<8 x float> %C, <8 x float> %D, i32 10)
4273   %msk = bitcast i8 %B to <8 x i1>
4274   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> %A
4275   ret <8 x float> %ret
4278 define <8 x float> @test_int_x86_maskz_vmulps256(i8 %A, <8 x float> %B, <8 x float> %C) nounwind {
4279 ; X86-LABEL: test_int_x86_maskz_vmulps256:
4280 ; X86:       # %bb.0:
4281 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4282 ; X86-NEXT:    vmulps {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x59,0xc1]
4283 ; X86-NEXT:    retl # encoding: [0xc3]
4285 ; X64-LABEL: test_int_x86_maskz_vmulps256:
4286 ; X64:       # %bb.0:
4287 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4288 ; X64-NEXT:    vmulps {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x59,0xc1]
4289 ; X64-NEXT:    retq # encoding: [0xc3]
4290   %ret0 = call <8 x float> @llvm.x86.avx10.vmulps256(<8 x float> %B, <8 x float> %C, i32 9)
4291   %msk = bitcast i8 %A to <8 x i1>
4292   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> zeroinitializer
4293   ret <8 x float> %ret
4296 declare <4 x double> @llvm.x86.avx10.mask.vrangepd256(<4 x double>, <4 x double>, i32, <4 x double>, i8, i32)
4297 define <4 x double> @test_int_x86_vrangepd256(<4 x double> %a, <4 x double> %b) nounwind {
4298 ; CHECK-LABEL: test_int_x86_vrangepd256:
4299 ; CHECK:       # %bb.0:
4300 ; CHECK-NEXT:    vrangepd $127, {sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf3,0xf9,0x18,0x50,0xc1,0x7f]
4301 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4302   %ret = call <4 x double> @llvm.x86.avx10.mask.vrangepd256(<4 x double> %a, <4 x double> %b, i32 127, <4 x double> undef, i8 -1, i32 8)
4303   ret <4 x double> %ret
4306 define <4 x double> @test_int_x86_mask_vrangepd256(<4 x double> %a, i8 %b, <4 x double> %c, <4 x double> %d) nounwind {
4307 ; X86-LABEL: test_int_x86_mask_vrangepd256:
4308 ; X86:       # %bb.0:
4309 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4310 ; X86-NEXT:    vrangepd $127, {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0xf1,0x19,0x50,0xc2,0x7f]
4311 ; X86-NEXT:    retl # encoding: [0xc3]
4313 ; X64-LABEL: test_int_x86_mask_vrangepd256:
4314 ; X64:       # %bb.0:
4315 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4316 ; X64-NEXT:    vrangepd $127, {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0xf1,0x19,0x50,0xc2,0x7f]
4317 ; X64-NEXT:    retq # encoding: [0xc3]
4318   %ret = call <4 x double> @llvm.x86.avx10.mask.vrangepd256(<4 x double> %c, <4 x double> %d, i32 127, <4 x double> %a, i8 %b, i32 8)
4319   ret <4 x double> %ret
4322 define <4 x double> @test_int_x86_maskz_vrangepd256(i8 %a, <4 x double> %b, <4 x double> %c) nounwind {
4323 ; X86-LABEL: test_int_x86_maskz_vrangepd256:
4324 ; X86:       # %bb.0:
4325 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4326 ; X86-NEXT:    vrangepd $127, {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0xf9,0x99,0x50,0xc1,0x7f]
4327 ; X86-NEXT:    retl # encoding: [0xc3]
4329 ; X64-LABEL: test_int_x86_maskz_vrangepd256:
4330 ; X64:       # %bb.0:
4331 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4332 ; X64-NEXT:    vrangepd $127, {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0xf9,0x99,0x50,0xc1,0x7f]
4333 ; X64-NEXT:    retq # encoding: [0xc3]
4334   %ret = call <4 x double> @llvm.x86.avx10.mask.vrangepd256(<4 x double> %b, <4 x double> %c, i32 127, <4 x double> zeroinitializer, i8 %a, i32 8)
4335   ret <4 x double> %ret
4338 declare <8 x float> @llvm.x86.avx10.mask.vrangeps256(<8 x float>, <8 x float>, i32, <8 x float>, i8, i32)
4339 define <8 x float> @test_int_x86_vrangeps256(<8 x float> %a, <8 x float> %b) nounwind {
4340 ; CHECK-LABEL: test_int_x86_vrangeps256:
4341 ; CHECK:       # %bb.0:
4342 ; CHECK-NEXT:    vrangeps $127, {sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf3,0x79,0x18,0x50,0xc1,0x7f]
4343 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4344   %ret = call <8 x float> @llvm.x86.avx10.mask.vrangeps256(<8 x float> %a, <8 x float> %b, i32 127, <8 x float> undef, i8 -1, i32 8)
4345   ret <8 x float> %ret
4348 define <8 x float> @test_int_x86_mask_vrangeps256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
4349 ; X86-LABEL: test_int_x86_mask_vrangeps256:
4350 ; X86:       # %bb.0:
4351 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4352 ; X86-NEXT:    vrangeps $127, {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x71,0x19,0x50,0xc2,0x7f]
4353 ; X86-NEXT:    retl # encoding: [0xc3]
4355 ; X64-LABEL: test_int_x86_mask_vrangeps256:
4356 ; X64:       # %bb.0:
4357 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4358 ; X64-NEXT:    vrangeps $127, {sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x71,0x19,0x50,0xc2,0x7f]
4359 ; X64-NEXT:    retq # encoding: [0xc3]
4360   %ret = call <8 x float> @llvm.x86.avx10.mask.vrangeps256(<8 x float> %c, <8 x float> %d, i32 127, <8 x float> %a, i8 %b, i32 8)
4361   ret <8 x float> %ret
4364 define <8 x float> @test_int_x86_maskz_vrangeps256(i8 %a, <8 x float> %b, <8 x float> %c) nounwind {
4365 ; X86-LABEL: test_int_x86_maskz_vrangeps256:
4366 ; X86:       # %bb.0:
4367 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4368 ; X86-NEXT:    vrangeps $127, {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x79,0x99,0x50,0xc1,0x7f]
4369 ; X86-NEXT:    retl # encoding: [0xc3]
4371 ; X64-LABEL: test_int_x86_maskz_vrangeps256:
4372 ; X64:       # %bb.0:
4373 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4374 ; X64-NEXT:    vrangeps $127, {sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x79,0x99,0x50,0xc1,0x7f]
4375 ; X64-NEXT:    retq # encoding: [0xc3]
4376   %ret = call <8 x float> @llvm.x86.avx10.mask.vrangeps256(<8 x float> %b, <8 x float> %c, i32 127, <8 x float> zeroinitializer, i8 %a, i32 8)
4377   ret <8 x float> %ret
4380 declare <4 x double> @llvm.x86.avx10.mask.vreducepd256(<4 x double>, i32, <4 x double>, i8, i32)
4381 define <4 x double> @test_int_x86_vreducepd256(<4 x double> %a) nounwind {
4382 ; CHECK-LABEL: test_int_x86_vreducepd256:
4383 ; CHECK:       # %bb.0:
4384 ; CHECK-NEXT:    vreducepd $127, {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf3,0xf9,0x18,0x56,0xc0,0x7f]
4385 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4386   %ret = call <4 x double> @llvm.x86.avx10.mask.vreducepd256(<4 x double> %a, i32 127, <4 x double> undef, i8 -1, i32 8)
4387   ret <4 x double> %ret
4390 define <4 x double> @test_int_x86_mask_vreducepd256(<4 x double> %a, i8 %b, <4 x double> %c) nounwind {
4391 ; X86-LABEL: test_int_x86_mask_vreducepd256:
4392 ; X86:       # %bb.0:
4393 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4394 ; X86-NEXT:    vreducepd $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0xf9,0x19,0x56,0xc1,0x7f]
4395 ; X86-NEXT:    retl # encoding: [0xc3]
4397 ; X64-LABEL: test_int_x86_mask_vreducepd256:
4398 ; X64:       # %bb.0:
4399 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4400 ; X64-NEXT:    vreducepd $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0xf9,0x19,0x56,0xc1,0x7f]
4401 ; X64-NEXT:    retq # encoding: [0xc3]
4402   %ret = call <4 x double> @llvm.x86.avx10.mask.vreducepd256(<4 x double> %c, i32 127, <4 x double> %a, i8 %b, i32 8)
4403   ret <4 x double> %ret
4406 define <4 x double> @test_int_x86_maskz_vreducepd256(i8 %a, <4 x double> %b) nounwind {
4407 ; X86-LABEL: test_int_x86_maskz_vreducepd256:
4408 ; X86:       # %bb.0:
4409 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4410 ; X86-NEXT:    vreducepd $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0xf9,0x99,0x56,0xc0,0x7f]
4411 ; X86-NEXT:    retl # encoding: [0xc3]
4413 ; X64-LABEL: test_int_x86_maskz_vreducepd256:
4414 ; X64:       # %bb.0:
4415 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4416 ; X64-NEXT:    vreducepd $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0xf9,0x99,0x56,0xc0,0x7f]
4417 ; X64-NEXT:    retq # encoding: [0xc3]
4418   %ret = call <4 x double> @llvm.x86.avx10.mask.vreducepd256(<4 x double> %b, i32 127, <4 x double> zeroinitializer, i8 %a, i32 8)
4419   ret <4 x double> %ret
4422 declare <16 x half> @llvm.x86.avx10.mask.vreduceph256(<16 x half>, i32, <16 x half>, i16, i32)
4423 define <16 x half> @test_int_x86_vreduceph256(<16 x half> %a) nounwind {
4424 ; CHECK-LABEL: test_int_x86_vreduceph256:
4425 ; CHECK:       # %bb.0:
4426 ; CHECK-NEXT:    vreduceph $127, {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf3,0x78,0x18,0x56,0xc0,0x7f]
4427 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4428   %ret = call <16 x half> @llvm.x86.avx10.mask.vreduceph256(<16 x half> %a, i32 127, <16 x half> undef, i16 -1, i32 8)
4429   ret <16 x half> %ret
4432 define <16 x half> @test_int_x86_mask_vreduceph256(<16 x half> %a, i16 %b, <16 x half> %c) nounwind {
4433 ; X86-LABEL: test_int_x86_mask_vreduceph256:
4434 ; X86:       # %bb.0:
4435 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4436 ; X86-NEXT:    vreduceph $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x78,0x19,0x56,0xc1,0x7f]
4437 ; X86-NEXT:    retl # encoding: [0xc3]
4439 ; X64-LABEL: test_int_x86_mask_vreduceph256:
4440 ; X64:       # %bb.0:
4441 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4442 ; X64-NEXT:    vreduceph $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x78,0x19,0x56,0xc1,0x7f]
4443 ; X64-NEXT:    retq # encoding: [0xc3]
4444   %ret = call <16 x half> @llvm.x86.avx10.mask.vreduceph256(<16 x half> %c, i32 127, <16 x half> %a, i16 %b, i32 8)
4445   ret <16 x half> %ret
4448 define <16 x half> @test_int_x86_maskz_vreduceph256(i16 %a, <16 x half> %b) nounwind {
4449 ; X86-LABEL: test_int_x86_maskz_vreduceph256:
4450 ; X86:       # %bb.0:
4451 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4452 ; X86-NEXT:    vreduceph $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x78,0x99,0x56,0xc0,0x7f]
4453 ; X86-NEXT:    retl # encoding: [0xc3]
4455 ; X64-LABEL: test_int_x86_maskz_vreduceph256:
4456 ; X64:       # %bb.0:
4457 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4458 ; X64-NEXT:    vreduceph $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x78,0x99,0x56,0xc0,0x7f]
4459 ; X64-NEXT:    retq # encoding: [0xc3]
4460   %ret = call <16 x half> @llvm.x86.avx10.mask.vreduceph256(<16 x half> %b, i32 127, <16 x half> zeroinitializer, i16 %a, i32 8)
4461   ret <16 x half> %ret
4464 declare <8 x float> @llvm.x86.avx10.mask.vreduceps256(<8 x float>, i32, <8 x float>, i8, i32)
4465 define <8 x float> @test_int_x86_vreduceps256(<8 x float> %a) nounwind {
4466 ; CHECK-LABEL: test_int_x86_vreduceps256:
4467 ; CHECK:       # %bb.0:
4468 ; CHECK-NEXT:    vreduceps $127, {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf3,0x79,0x18,0x56,0xc0,0x7f]
4469 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4470   %ret = call <8 x float> @llvm.x86.avx10.mask.vreduceps256(<8 x float> %a, i32 127, <8 x float> undef, i8 -1, i32 8)
4471   ret <8 x float> %ret
4474 define <8 x float> @test_int_x86_mask_vreduceps256(<8 x float> %a, i8 %b, <8 x float> %c) nounwind {
4475 ; X86-LABEL: test_int_x86_mask_vreduceps256:
4476 ; X86:       # %bb.0:
4477 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4478 ; X86-NEXT:    vreduceps $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x79,0x19,0x56,0xc1,0x7f]
4479 ; X86-NEXT:    retl # encoding: [0xc3]
4481 ; X64-LABEL: test_int_x86_mask_vreduceps256:
4482 ; X64:       # %bb.0:
4483 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4484 ; X64-NEXT:    vreduceps $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x79,0x19,0x56,0xc1,0x7f]
4485 ; X64-NEXT:    retq # encoding: [0xc3]
4486   %ret = call <8 x float> @llvm.x86.avx10.mask.vreduceps256(<8 x float> %c, i32 127, <8 x float> %a, i8 %b, i32 8)
4487   ret <8 x float> %ret
4490 define <8 x float> @test_int_x86_maskz_vreduceps256(i8 %a, <8 x float> %b) nounwind {
4491 ; X86-LABEL: test_int_x86_maskz_vreduceps256:
4492 ; X86:       # %bb.0:
4493 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4494 ; X86-NEXT:    vreduceps $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x79,0x99,0x56,0xc0,0x7f]
4495 ; X86-NEXT:    retl # encoding: [0xc3]
4497 ; X64-LABEL: test_int_x86_maskz_vreduceps256:
4498 ; X64:       # %bb.0:
4499 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4500 ; X64-NEXT:    vreduceps $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x79,0x99,0x56,0xc0,0x7f]
4501 ; X64-NEXT:    retq # encoding: [0xc3]
4502   %ret = call <8 x float> @llvm.x86.avx10.mask.vreduceps256(<8 x float> %b, i32 127, <8 x float> zeroinitializer, i8 %a, i32 8)
4503   ret <8 x float> %ret
4506 declare <4 x double> @llvm.x86.avx10.mask.vrndscalepd256(<4 x double>, i32, <4 x double>, i8, i32)
4507 define <4 x double> @test_int_x86_vrndscalepd256(<4 x double> %a) nounwind {
4508 ; CHECK-LABEL: test_int_x86_vrndscalepd256:
4509 ; CHECK:       # %bb.0:
4510 ; CHECK-NEXT:    vrndscalepd $127, {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf3,0xf9,0x18,0x09,0xc0,0x7f]
4511 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4512   %ret = call <4 x double> @llvm.x86.avx10.mask.vrndscalepd256(<4 x double> %a, i32 127, <4 x double> undef, i8 -1, i32 8)
4513   ret <4 x double> %ret
4516 define <4 x double> @test_int_x86_mask_vrndscalepd256(<4 x double> %a, i8 %b, <4 x double> %c) nounwind {
4517 ; X86-LABEL: test_int_x86_mask_vrndscalepd256:
4518 ; X86:       # %bb.0:
4519 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4520 ; X86-NEXT:    vrndscalepd $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0xf9,0x19,0x09,0xc1,0x7f]
4521 ; X86-NEXT:    retl # encoding: [0xc3]
4523 ; X64-LABEL: test_int_x86_mask_vrndscalepd256:
4524 ; X64:       # %bb.0:
4525 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4526 ; X64-NEXT:    vrndscalepd $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0xf9,0x19,0x09,0xc1,0x7f]
4527 ; X64-NEXT:    retq # encoding: [0xc3]
4528   %ret = call <4 x double> @llvm.x86.avx10.mask.vrndscalepd256(<4 x double> %c, i32 127, <4 x double> %a, i8 %b, i32 8)
4529   ret <4 x double> %ret
4532 define <4 x double> @test_int_x86_maskz_vrndscalepd256(i8 %a, <4 x double> %b) nounwind {
4533 ; X86-LABEL: test_int_x86_maskz_vrndscalepd256:
4534 ; X86:       # %bb.0:
4535 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4536 ; X86-NEXT:    vrndscalepd $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0xf9,0x99,0x09,0xc0,0x7f]
4537 ; X86-NEXT:    retl # encoding: [0xc3]
4539 ; X64-LABEL: test_int_x86_maskz_vrndscalepd256:
4540 ; X64:       # %bb.0:
4541 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4542 ; X64-NEXT:    vrndscalepd $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0xf9,0x99,0x09,0xc0,0x7f]
4543 ; X64-NEXT:    retq # encoding: [0xc3]
4544   %ret = call <4 x double> @llvm.x86.avx10.mask.vrndscalepd256(<4 x double> %b, i32 127, <4 x double> zeroinitializer, i8 %a, i32 8)
4545   ret <4 x double> %ret
4548 declare <16 x half> @llvm.x86.avx10.mask.vrndscaleph256(<16 x half>, i32, <16 x half>, i16, i32)
4549 define <16 x half> @test_int_x86_vrndscaleph256(<16 x half> %a) nounwind {
4550 ; CHECK-LABEL: test_int_x86_vrndscaleph256:
4551 ; CHECK:       # %bb.0:
4552 ; CHECK-NEXT:    vrndscaleph $127, {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf3,0x78,0x18,0x08,0xc0,0x7f]
4553 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4554   %ret = call <16 x half> @llvm.x86.avx10.mask.vrndscaleph256(<16 x half> %a, i32 127, <16 x half> undef, i16 -1, i32 8)
4555   ret <16 x half> %ret
4558 define <16 x half> @test_int_x86_mask_vrndscaleph256(<16 x half> %a, i16 %b, <16 x half> %c) nounwind {
4559 ; X86-LABEL: test_int_x86_mask_vrndscaleph256:
4560 ; X86:       # %bb.0:
4561 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4562 ; X86-NEXT:    vrndscaleph $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x78,0x19,0x08,0xc1,0x7f]
4563 ; X86-NEXT:    retl # encoding: [0xc3]
4565 ; X64-LABEL: test_int_x86_mask_vrndscaleph256:
4566 ; X64:       # %bb.0:
4567 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4568 ; X64-NEXT:    vrndscaleph $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x78,0x19,0x08,0xc1,0x7f]
4569 ; X64-NEXT:    retq # encoding: [0xc3]
4570   %ret = call <16 x half> @llvm.x86.avx10.mask.vrndscaleph256(<16 x half> %c, i32 127, <16 x half> %a, i16 %b, i32 8)
4571   ret <16 x half> %ret
4574 define <16 x half> @test_int_x86_maskz_vrndscaleph256(i16 %a, <16 x half> %b) nounwind {
4575 ; X86-LABEL: test_int_x86_maskz_vrndscaleph256:
4576 ; X86:       # %bb.0:
4577 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4578 ; X86-NEXT:    vrndscaleph $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x78,0x99,0x08,0xc0,0x7f]
4579 ; X86-NEXT:    retl # encoding: [0xc3]
4581 ; X64-LABEL: test_int_x86_maskz_vrndscaleph256:
4582 ; X64:       # %bb.0:
4583 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4584 ; X64-NEXT:    vrndscaleph $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x78,0x99,0x08,0xc0,0x7f]
4585 ; X64-NEXT:    retq # encoding: [0xc3]
4586   %ret = call <16 x half> @llvm.x86.avx10.mask.vrndscaleph256(<16 x half> %b, i32 127, <16 x half> zeroinitializer, i16 %a, i32 8)
4587   ret <16 x half> %ret
4590 declare <8 x float> @llvm.x86.avx10.mask.vrndscaleps256(<8 x float>, i32, <8 x float>, i8, i32)
4591 define <8 x float> @test_int_x86_vrndscaleps256(<8 x float> %a) nounwind {
4592 ; CHECK-LABEL: test_int_x86_vrndscaleps256:
4593 ; CHECK:       # %bb.0:
4594 ; CHECK-NEXT:    vrndscaleps $127, {sae}, %ymm0, %ymm0 # encoding: [0x62,0xf3,0x79,0x18,0x08,0xc0,0x7f]
4595 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4596   %ret = call <8 x float> @llvm.x86.avx10.mask.vrndscaleps256(<8 x float> %a, i32 127, <8 x float> undef, i8 -1, i32 8)
4597   ret <8 x float> %ret
4600 define <8 x float> @test_int_x86_mask_vrndscaleps256(<8 x float> %a, i8 %b, <8 x float> %c) nounwind {
4601 ; X86-LABEL: test_int_x86_mask_vrndscaleps256:
4602 ; X86:       # %bb.0:
4603 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4604 ; X86-NEXT:    vrndscaleps $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x79,0x19,0x08,0xc1,0x7f]
4605 ; X86-NEXT:    retl # encoding: [0xc3]
4607 ; X64-LABEL: test_int_x86_mask_vrndscaleps256:
4608 ; X64:       # %bb.0:
4609 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4610 ; X64-NEXT:    vrndscaleps $127, {sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf3,0x79,0x19,0x08,0xc1,0x7f]
4611 ; X64-NEXT:    retq # encoding: [0xc3]
4612   %ret = call <8 x float> @llvm.x86.avx10.mask.vrndscaleps256(<8 x float> %c, i32 127, <8 x float> %a, i8 %b, i32 8)
4613   ret <8 x float> %ret
4616 define <8 x float> @test_int_x86_maskz_vrndscaleps256(i8 %a, <8 x float> %b) nounwind {
4617 ; X86-LABEL: test_int_x86_maskz_vrndscaleps256:
4618 ; X86:       # %bb.0:
4619 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4620 ; X86-NEXT:    vrndscaleps $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x79,0x99,0x08,0xc0,0x7f]
4621 ; X86-NEXT:    retl # encoding: [0xc3]
4623 ; X64-LABEL: test_int_x86_maskz_vrndscaleps256:
4624 ; X64:       # %bb.0:
4625 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4626 ; X64-NEXT:    vrndscaleps $127, {sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf3,0x79,0x99,0x08,0xc0,0x7f]
4627 ; X64-NEXT:    retq # encoding: [0xc3]
4628   %ret = call <8 x float> @llvm.x86.avx10.mask.vrndscaleps256(<8 x float> %b, i32 127, <8 x float> zeroinitializer, i8 %a, i32 8)
4629   ret <8 x float> %ret
4632 declare <4 x double> @llvm.x86.avx10.mask.vscalefpd256(<4 x double>, <4 x double>, <4 x double>, i8, i32)
4633 define <4 x double> @test_int_x86_vscalefpd256(<4 x double> %a, <4 x double> %b) nounwind {
4634 ; CHECK-LABEL: test_int_x86_vscalefpd256:
4635 ; CHECK:       # %bb.0:
4636 ; CHECK-NEXT:    vscalefpd {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf2,0xf9,0x78,0x2c,0xc1]
4637 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4638   %ret = call <4 x double> @llvm.x86.avx10.mask.vscalefpd256(<4 x double> %a, <4 x double> %b, <4 x double> undef, i8 -1, i32 11)
4639   ret <4 x double> %ret
4642 define <4 x double> @test_int_x86_mask_vscalefpd256(<4 x double> %a, i8 %b, <4 x double> %c, <4 x double> %d) nounwind {
4643 ; X86-LABEL: test_int_x86_mask_vscalefpd256:
4644 ; X86:       # %bb.0:
4645 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4646 ; X86-NEXT:    vscalefpd {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0xf1,0x59,0x2c,0xc2]
4647 ; X86-NEXT:    retl # encoding: [0xc3]
4649 ; X64-LABEL: test_int_x86_mask_vscalefpd256:
4650 ; X64:       # %bb.0:
4651 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4652 ; X64-NEXT:    vscalefpd {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0xf1,0x59,0x2c,0xc2]
4653 ; X64-NEXT:    retq # encoding: [0xc3]
4654   %ret = call <4 x double> @llvm.x86.avx10.mask.vscalefpd256(<4 x double> %c, <4 x double> %d, <4 x double> %a, i8 %b, i32 10)
4655   ret <4 x double> %ret
4658 define <4 x double> @test_int_x86_maskz_vscalefpd256(i8 %a, <4 x double> %b, <4 x double> %c) nounwind {
4659 ; X86-LABEL: test_int_x86_maskz_vscalefpd256:
4660 ; X86:       # %bb.0:
4661 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4662 ; X86-NEXT:    vscalefpd {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0xf9,0xb9,0x2c,0xc1]
4663 ; X86-NEXT:    retl # encoding: [0xc3]
4665 ; X64-LABEL: test_int_x86_maskz_vscalefpd256:
4666 ; X64:       # %bb.0:
4667 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4668 ; X64-NEXT:    vscalefpd {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0xf9,0xb9,0x2c,0xc1]
4669 ; X64-NEXT:    retq # encoding: [0xc3]
4670   %ret = call <4 x double> @llvm.x86.avx10.mask.vscalefpd256(<4 x double> %b, <4 x double> %c, <4 x double> zeroinitializer, i8 %a, i32 9)
4671   ret <4 x double> %ret
4674 declare <16 x half> @llvm.x86.avx10.mask.vscalefph256(<16 x half>, <16 x half>, <16 x half>, i16, i32)
4675 define <16 x half> @test_int_x86_vscalefph256(<16 x half> %a, <16 x half> %b) nounwind {
4676 ; CHECK-LABEL: test_int_x86_vscalefph256:
4677 ; CHECK:       # %bb.0:
4678 ; CHECK-NEXT:    vscalefph {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf6,0x79,0x78,0x2c,0xc1]
4679 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4680   %ret = call <16 x half> @llvm.x86.avx10.mask.vscalefph256(<16 x half> %a, <16 x half> %b, <16 x half> undef, i16 -1, i32 11)
4681   ret <16 x half> %ret
4684 define <16 x half> @test_int_x86_mask_vscalefph256(<16 x half> %a, i16 %b, <16 x half> %c, <16 x half> %d) nounwind {
4685 ; X86-LABEL: test_int_x86_mask_vscalefph256:
4686 ; X86:       # %bb.0:
4687 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4688 ; X86-NEXT:    vscalefph {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf6,0x71,0x59,0x2c,0xc2]
4689 ; X86-NEXT:    retl # encoding: [0xc3]
4691 ; X64-LABEL: test_int_x86_mask_vscalefph256:
4692 ; X64:       # %bb.0:
4693 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4694 ; X64-NEXT:    vscalefph {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf6,0x71,0x59,0x2c,0xc2]
4695 ; X64-NEXT:    retq # encoding: [0xc3]
4696   %ret = call <16 x half> @llvm.x86.avx10.mask.vscalefph256(<16 x half> %c, <16 x half> %d, <16 x half> %a, i16 %b, i32 10)
4697   ret <16 x half> %ret
4700 define <16 x half> @test_int_x86_maskz_vscalefph256(i16 %a, <16 x half> %b, <16 x half> %c) nounwind {
4701 ; X86-LABEL: test_int_x86_maskz_vscalefph256:
4702 ; X86:       # %bb.0:
4703 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4704 ; X86-NEXT:    vscalefph {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf6,0x79,0xb9,0x2c,0xc1]
4705 ; X86-NEXT:    retl # encoding: [0xc3]
4707 ; X64-LABEL: test_int_x86_maskz_vscalefph256:
4708 ; X64:       # %bb.0:
4709 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4710 ; X64-NEXT:    vscalefph {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf6,0x79,0xb9,0x2c,0xc1]
4711 ; X64-NEXT:    retq # encoding: [0xc3]
4712   %ret = call <16 x half> @llvm.x86.avx10.mask.vscalefph256(<16 x half> %b, <16 x half> %c, <16 x half> zeroinitializer, i16 %a, i32 9)
4713   ret <16 x half> %ret
4716 declare <8 x float> @llvm.x86.avx10.mask.vscalefps256(<8 x float>, <8 x float>, <8 x float>, i8, i32)
4717 define <8 x float> @test_int_x86_vscalefps256(<8 x float> %a, <8 x float> %b) nounwind {
4718 ; CHECK-LABEL: test_int_x86_vscalefps256:
4719 ; CHECK:       # %bb.0:
4720 ; CHECK-NEXT:    vscalefps {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf2,0x79,0x78,0x2c,0xc1]
4721 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4722   %ret = call <8 x float> @llvm.x86.avx10.mask.vscalefps256(<8 x float> %a, <8 x float> %b, <8 x float> undef, i8 -1, i32 11)
4723   ret <8 x float> %ret
4726 define <8 x float> @test_int_x86_mask_vscalefps256(<8 x float> %a, i8 %b, <8 x float> %c, <8 x float> %d) nounwind {
4727 ; X86-LABEL: test_int_x86_mask_vscalefps256:
4728 ; X86:       # %bb.0:
4729 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4730 ; X86-NEXT:    vscalefps {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x71,0x59,0x2c,0xc2]
4731 ; X86-NEXT:    retl # encoding: [0xc3]
4733 ; X64-LABEL: test_int_x86_mask_vscalefps256:
4734 ; X64:       # %bb.0:
4735 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4736 ; X64-NEXT:    vscalefps {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf2,0x71,0x59,0x2c,0xc2]
4737 ; X64-NEXT:    retq # encoding: [0xc3]
4738   %ret = call <8 x float> @llvm.x86.avx10.mask.vscalefps256(<8 x float> %c, <8 x float> %d, <8 x float> %a, i8 %b, i32 10)
4739   ret <8 x float> %ret
4742 define <8 x float> @test_int_x86_maskz_vscalefps256(i8 %a, <8 x float> %b, <8 x float> %c) nounwind {
4743 ; X86-LABEL: test_int_x86_maskz_vscalefps256:
4744 ; X86:       # %bb.0:
4745 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4746 ; X86-NEXT:    vscalefps {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x79,0xb9,0x2c,0xc1]
4747 ; X86-NEXT:    retl # encoding: [0xc3]
4749 ; X64-LABEL: test_int_x86_maskz_vscalefps256:
4750 ; X64:       # %bb.0:
4751 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4752 ; X64-NEXT:    vscalefps {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf2,0x79,0xb9,0x2c,0xc1]
4753 ; X64-NEXT:    retq # encoding: [0xc3]
4754   %ret = call <8 x float> @llvm.x86.avx10.mask.vscalefps256(<8 x float> %b, <8 x float> %c, <8 x float> zeroinitializer, i8 %a, i32 9)
4755   ret <8 x float> %ret
4758 declare <4 x double> @llvm.x86.avx10.vsqrtpd256(<4 x double>, i32)
4759 define <4 x double> @test_int_x86_vsqrtpd256(<4 x double> %A) nounwind {
4760 ; CHECK-LABEL: test_int_x86_vsqrtpd256:
4761 ; CHECK:       # %bb.0:
4762 ; CHECK-NEXT:    vsqrtpd {rz-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xf9,0x78,0x51,0xc0]
4763 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4764   %ret = call <4 x double> @llvm.x86.avx10.vsqrtpd256(<4 x double> %A, i32 11)
4765   ret <4 x double> %ret
4768 define <4 x double> @test_int_x86_mask_vsqrtpd256(<4 x double> %A, i4 %B, <4 x double> %C) nounwind {
4769 ; X86-LABEL: test_int_x86_mask_vsqrtpd256:
4770 ; X86:       # %bb.0:
4771 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4772 ; X86-NEXT:    vsqrtpd {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x59,0x51,0xc1]
4773 ; X86-NEXT:    retl # encoding: [0xc3]
4775 ; X64-LABEL: test_int_x86_mask_vsqrtpd256:
4776 ; X64:       # %bb.0:
4777 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4778 ; X64-NEXT:    vsqrtpd {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf9,0x59,0x51,0xc1]
4779 ; X64-NEXT:    retq # encoding: [0xc3]
4780   %ret0 = call <4 x double> @llvm.x86.avx10.vsqrtpd256(<4 x double> %C, i32 10)
4781   %msk = bitcast i4 %B to <4 x i1>
4782   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> %A
4783   ret <4 x double> %ret
4786 define <4 x double> @test_int_x86_maskz_vsqrtpd256(i4 %A, <4 x double> %B) nounwind {
4787 ; X86-LABEL: test_int_x86_maskz_vsqrtpd256:
4788 ; X86:       # %bb.0:
4789 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4790 ; X86-NEXT:    vsqrtpd {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x51,0xc0]
4791 ; X86-NEXT:    retl # encoding: [0xc3]
4793 ; X64-LABEL: test_int_x86_maskz_vsqrtpd256:
4794 ; X64:       # %bb.0:
4795 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4796 ; X64-NEXT:    vsqrtpd {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x51,0xc0]
4797 ; X64-NEXT:    retq # encoding: [0xc3]
4798   %ret0 = call <4 x double> @llvm.x86.avx10.vsqrtpd256(<4 x double> %B, i32 9)
4799   %msk = bitcast i4 %A to <4 x i1>
4800   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> zeroinitializer
4801   ret <4 x double> %ret
4804 declare <16 x half> @llvm.x86.avx10.vsqrtph256(<16 x half>, i32)
4805 define <16 x half> @test_int_x86_vsqrtph256(<16 x half> %A) nounwind {
4806 ; CHECK-LABEL: test_int_x86_vsqrtph256:
4807 ; CHECK:       # %bb.0:
4808 ; CHECK-NEXT:    vsqrtph {rz-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x78,0x78,0x51,0xc0]
4809 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4810   %ret = call <16 x half> @llvm.x86.avx10.vsqrtph256(<16 x half> %A, i32 11)
4811   ret <16 x half> %ret
4814 define <16 x half> @test_int_x86_mask_vsqrtph256(<16 x half> %A, i16 %B, <16 x half> %C) nounwind {
4815 ; X86-LABEL: test_int_x86_mask_vsqrtph256:
4816 ; X86:       # %bb.0:
4817 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4818 ; X86-NEXT:    vsqrtph {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x78,0x59,0x51,0xc1]
4819 ; X86-NEXT:    retl # encoding: [0xc3]
4821 ; X64-LABEL: test_int_x86_mask_vsqrtph256:
4822 ; X64:       # %bb.0:
4823 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4824 ; X64-NEXT:    vsqrtph {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x78,0x59,0x51,0xc1]
4825 ; X64-NEXT:    retq # encoding: [0xc3]
4826   %ret0 = call <16 x half> @llvm.x86.avx10.vsqrtph256(<16 x half> %C, i32 10)
4827   %msk = bitcast i16 %B to <16 x i1>
4828   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> %A
4829   ret <16 x half> %ret
4832 define <16 x half> @test_int_x86_maskz_vsqrtph256(i16 %A, <16 x half> %B) nounwind {
4833 ; X86-LABEL: test_int_x86_maskz_vsqrtph256:
4834 ; X86:       # %bb.0:
4835 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4836 ; X86-NEXT:    vsqrtph {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x51,0xc0]
4837 ; X86-NEXT:    retl # encoding: [0xc3]
4839 ; X64-LABEL: test_int_x86_maskz_vsqrtph256:
4840 ; X64:       # %bb.0:
4841 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4842 ; X64-NEXT:    vsqrtph {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x51,0xc0]
4843 ; X64-NEXT:    retq # encoding: [0xc3]
4844   %ret0 = call <16 x half> @llvm.x86.avx10.vsqrtph256(<16 x half> %B, i32 9)
4845   %msk = bitcast i16 %A to <16 x i1>
4846   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> zeroinitializer
4847   ret <16 x half> %ret
4850 declare <8 x float> @llvm.x86.avx10.vsqrtps256(<8 x float>, i32)
4851 define <8 x float> @test_int_x86_vsqrtps256(<8 x float> %A) nounwind {
4852 ; CHECK-LABEL: test_int_x86_vsqrtps256:
4853 ; CHECK:       # %bb.0:
4854 ; CHECK-NEXT:    vsqrtps {rz-sae}, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x78,0x78,0x51,0xc0]
4855 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4856   %ret = call <8 x float> @llvm.x86.avx10.vsqrtps256(<8 x float> %A, i32 11)
4857   ret <8 x float> %ret
4860 define <8 x float> @test_int_x86_mask_vsqrtps256(<8 x float> %A, i8 %B, <8 x float> %C) nounwind {
4861 ; X86-LABEL: test_int_x86_mask_vsqrtps256:
4862 ; X86:       # %bb.0:
4863 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4864 ; X86-NEXT:    vsqrtps {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x78,0x59,0x51,0xc1]
4865 ; X86-NEXT:    retl # encoding: [0xc3]
4867 ; X64-LABEL: test_int_x86_mask_vsqrtps256:
4868 ; X64:       # %bb.0:
4869 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4870 ; X64-NEXT:    vsqrtps {ru-sae}, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x78,0x59,0x51,0xc1]
4871 ; X64-NEXT:    retq # encoding: [0xc3]
4872   %ret0 = call <8 x float> @llvm.x86.avx10.vsqrtps256(<8 x float> %C, i32 10)
4873   %msk = bitcast i8 %B to <8 x i1>
4874   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> %A
4875   ret <8 x float> %ret
4878 define <8 x float> @test_int_x86_maskz_vsqrtps256(i8 %A, <8 x float> %B) nounwind {
4879 ; X86-LABEL: test_int_x86_maskz_vsqrtps256:
4880 ; X86:       # %bb.0:
4881 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4882 ; X86-NEXT:    vsqrtps {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x51,0xc0]
4883 ; X86-NEXT:    retl # encoding: [0xc3]
4885 ; X64-LABEL: test_int_x86_maskz_vsqrtps256:
4886 ; X64:       # %bb.0:
4887 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4888 ; X64-NEXT:    vsqrtps {rd-sae}, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x51,0xc0]
4889 ; X64-NEXT:    retq # encoding: [0xc3]
4890   %ret0 = call <8 x float> @llvm.x86.avx10.vsqrtps256(<8 x float> %B, i32 9)
4891   %msk = bitcast i8 %A to <8 x i1>
4892   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> zeroinitializer
4893   ret <8 x float> %ret
4896 declare <4 x double> @llvm.x86.avx10.vsubpd256(<4 x double>, <4 x double>, i32)
4897 define <4 x double> @test_int_x86_vsubpd256(<4 x double> %A, <4 x double> %B) nounwind {
4898 ; CHECK-LABEL: test_int_x86_vsubpd256:
4899 ; CHECK:       # %bb.0:
4900 ; CHECK-NEXT:    vsubpd {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf1,0xf9,0x78,0x5c,0xc1]
4901 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4902   %ret = call <4 x double> @llvm.x86.avx10.vsubpd256(<4 x double> %A, <4 x double> %B, i32 11)
4903   ret <4 x double> %ret
4906 define <4 x double> @test_int_x86_mask_vsubpd256(<4 x double> %A, i4 %B, <4 x double> %C, <4 x double> %D) nounwind {
4907 ; X86-LABEL: test_int_x86_mask_vsubpd256:
4908 ; X86:       # %bb.0:
4909 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4910 ; X86-NEXT:    vsubpd {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf1,0x59,0x5c,0xc2]
4911 ; X86-NEXT:    retl # encoding: [0xc3]
4913 ; X64-LABEL: test_int_x86_mask_vsubpd256:
4914 ; X64:       # %bb.0:
4915 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4916 ; X64-NEXT:    vsubpd {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0xf1,0x59,0x5c,0xc2]
4917 ; X64-NEXT:    retq # encoding: [0xc3]
4918   %ret0 = call <4 x double> @llvm.x86.avx10.vsubpd256(<4 x double> %C, <4 x double> %D, i32 10)
4919   %msk = bitcast i4 %B to <4 x i1>
4920   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> %A
4921   ret <4 x double> %ret
4924 define <4 x double> @test_int_x86_maskz_vsubpd256(i4 %A, <4 x double> %B, <4 x double> %C) nounwind {
4925 ; X86-LABEL: test_int_x86_maskz_vsubpd256:
4926 ; X86:       # %bb.0:
4927 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
4928 ; X86-NEXT:    vsubpd {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x5c,0xc1]
4929 ; X86-NEXT:    retl # encoding: [0xc3]
4931 ; X64-LABEL: test_int_x86_maskz_vsubpd256:
4932 ; X64:       # %bb.0:
4933 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4934 ; X64-NEXT:    vsubpd {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0xf9,0xb9,0x5c,0xc1]
4935 ; X64-NEXT:    retq # encoding: [0xc3]
4936   %ret0 = call <4 x double> @llvm.x86.avx10.vsubpd256(<4 x double> %B, <4 x double> %C, i32 9)
4937   %msk = bitcast i4 %A to <4 x i1>
4938   %ret = select <4 x i1> %msk, <4 x double> %ret0, <4 x double> zeroinitializer
4939   ret <4 x double> %ret
4942 declare <16 x half> @llvm.x86.avx10.vsubph256(<16 x half>, <16 x half>, i32)
4943 define <16 x half> @test_int_x86_vsubph256(<16 x half> %A, <16 x half> %B) nounwind {
4944 ; CHECK-LABEL: test_int_x86_vsubph256:
4945 ; CHECK:       # %bb.0:
4946 ; CHECK-NEXT:    vsubph {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x78,0x78,0x5c,0xc1]
4947 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4948   %ret = call <16 x half> @llvm.x86.avx10.vsubph256(<16 x half> %A, <16 x half> %B, i32 11)
4949   ret <16 x half> %ret
4952 define <16 x half> @test_int_x86_mask_vsubph256(<16 x half> %A, i16 %B, <16 x half> %C, <16 x half> %D) nounwind {
4953 ; X86-LABEL: test_int_x86_mask_vsubph256:
4954 ; X86:       # %bb.0:
4955 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4956 ; X86-NEXT:    vsubph {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x70,0x59,0x5c,0xc2]
4957 ; X86-NEXT:    retl # encoding: [0xc3]
4959 ; X64-LABEL: test_int_x86_mask_vsubph256:
4960 ; X64:       # %bb.0:
4961 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4962 ; X64-NEXT:    vsubph {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf5,0x70,0x59,0x5c,0xc2]
4963 ; X64-NEXT:    retq # encoding: [0xc3]
4964   %ret0 = call <16 x half> @llvm.x86.avx10.vsubph256(<16 x half> %C, <16 x half> %D, i32 10)
4965   %msk = bitcast i16 %B to <16 x i1>
4966   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> %A
4967   ret <16 x half> %ret
4970 define <16 x half> @test_int_x86_maskz_vsubph256(i16 %A, <16 x half> %B, <16 x half> %C) nounwind {
4971 ; X86-LABEL: test_int_x86_maskz_vsubph256:
4972 ; X86:       # %bb.0:
4973 ; X86-NEXT:    kmovw {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf8,0x90,0x4c,0x24,0x04]
4974 ; X86-NEXT:    vsubph {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x5c,0xc1]
4975 ; X86-NEXT:    retl # encoding: [0xc3]
4977 ; X64-LABEL: test_int_x86_maskz_vsubph256:
4978 ; X64:       # %bb.0:
4979 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
4980 ; X64-NEXT:    vsubph {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf5,0x78,0xb9,0x5c,0xc1]
4981 ; X64-NEXT:    retq # encoding: [0xc3]
4982   %ret0 = call <16 x half> @llvm.x86.avx10.vsubph256(<16 x half> %B, <16 x half> %C, i32 9)
4983   %msk = bitcast i16 %A to <16 x i1>
4984   %ret = select <16 x i1> %msk, <16 x half> %ret0, <16 x half> zeroinitializer
4985   ret <16 x half> %ret
4988 declare <8 x float> @llvm.x86.avx10.vsubps256(<8 x float>, <8 x float>, i32)
4989 define <8 x float> @test_int_x86_vsubps256(<8 x float> %A, <8 x float> %B) nounwind {
4990 ; CHECK-LABEL: test_int_x86_vsubps256:
4991 ; CHECK:       # %bb.0:
4992 ; CHECK-NEXT:    vsubps {rz-sae}, %ymm1, %ymm0, %ymm0 # encoding: [0x62,0xf1,0x78,0x78,0x5c,0xc1]
4993 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
4994   %ret = call <8 x float> @llvm.x86.avx10.vsubps256(<8 x float> %A, <8 x float> %B, i32 11)
4995   ret <8 x float> %ret
4998 define <8 x float> @test_int_x86_mask_vsubps256(<8 x float> %A, i8 %B, <8 x float> %C, <8 x float> %D) nounwind {
4999 ; X86-LABEL: test_int_x86_mask_vsubps256:
5000 ; X86:       # %bb.0:
5001 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
5002 ; X86-NEXT:    vsubps {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x70,0x59,0x5c,0xc2]
5003 ; X86-NEXT:    retl # encoding: [0xc3]
5005 ; X64-LABEL: test_int_x86_mask_vsubps256:
5006 ; X64:       # %bb.0:
5007 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
5008 ; X64-NEXT:    vsubps {ru-sae}, %ymm2, %ymm1, %ymm0 {%k1} # encoding: [0x62,0xf1,0x70,0x59,0x5c,0xc2]
5009 ; X64-NEXT:    retq # encoding: [0xc3]
5010   %ret0 = call <8 x float> @llvm.x86.avx10.vsubps256(<8 x float> %C, <8 x float> %D, i32 10)
5011   %msk = bitcast i8 %B to <8 x i1>
5012   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> %A
5013   ret <8 x float> %ret
5016 define <8 x float> @test_int_x86_maskz_vsubps256(i8 %A, <8 x float> %B, <8 x float> %C) nounwind {
5017 ; X86-LABEL: test_int_x86_maskz_vsubps256:
5018 ; X86:       # %bb.0:
5019 ; X86-NEXT:    kmovb {{[0-9]+}}(%esp), %k1 # encoding: [0xc5,0xf9,0x90,0x4c,0x24,0x04]
5020 ; X86-NEXT:    vsubps {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x5c,0xc1]
5021 ; X86-NEXT:    retl # encoding: [0xc3]
5023 ; X64-LABEL: test_int_x86_maskz_vsubps256:
5024 ; X64:       # %bb.0:
5025 ; X64-NEXT:    kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
5026 ; X64-NEXT:    vsubps {rd-sae}, %ymm1, %ymm0, %ymm0 {%k1} {z} # encoding: [0x62,0xf1,0x78,0xb9,0x5c,0xc1]
5027 ; X64-NEXT:    retq # encoding: [0xc3]
5028   %ret0 = call <8 x float> @llvm.x86.avx10.vsubps256(<8 x float> %B, <8 x float> %C, i32 9)
5029   %msk = bitcast i8 %A to <8 x i1>
5030   %ret = select <8 x i1> %msk, <8 x float> %ret0, <8 x float> zeroinitializer
5031   ret <8 x float> %ret