1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=-avx,+sse4.2 -show-mc-encoding | FileCheck %s --check-prefix=CHECK --check-prefix=SSE42
3 ; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+avx2 -show-mc-encoding | FileCheck %s --check-prefix=CHECK --check-prefix=VCHECK --check-prefix=AVX2
4 ; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+avx512f,+avx512bw,+avx512vl,+avx512dq -show-mc-encoding | FileCheck %s --check-prefix=CHECK --check-prefix=VCHECK --check-prefix=SKX
6 define i32 @test_x86_sse42_pcmpestri128(<16 x i8> %a0, <16 x i8> %a2) {
7 ; SSE42-LABEL: test_x86_sse42_pcmpestri128:
9 ; SSE42-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
10 ; SSE42-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
11 ; SSE42-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
12 ; SSE42-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
13 ; SSE42-NEXT: retl ## encoding: [0xc3]
15 ; VCHECK-LABEL: test_x86_sse42_pcmpestri128:
17 ; VCHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
18 ; VCHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
19 ; VCHECK-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
20 ; VCHECK-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
21 ; VCHECK-NEXT: retl ## encoding: [0xc3]
22 %res = call i32 @llvm.x86.sse42.pcmpestri128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
25 declare i32 @llvm.x86.sse42.pcmpestri128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
28 define i32 @test_x86_sse42_pcmpestri128_load(<16 x i8>* %a0, <16 x i8>* %a2) {
29 ; SSE42-LABEL: test_x86_sse42_pcmpestri128_load:
31 ; SSE42-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x08]
32 ; SSE42-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
33 ; SSE42-NEXT: movdqa (%eax), %xmm0 ## encoding: [0x66,0x0f,0x6f,0x00]
34 ; SSE42-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
35 ; SSE42-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
36 ; SSE42-NEXT: pcmpestri $7, (%ecx), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0x01,0x07]
37 ; SSE42-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
38 ; SSE42-NEXT: retl ## encoding: [0xc3]
40 ; AVX2-LABEL: test_x86_sse42_pcmpestri128_load:
42 ; AVX2-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x08]
43 ; AVX2-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
44 ; AVX2-NEXT: vmovdqa (%eax), %xmm0 ## encoding: [0xc5,0xf9,0x6f,0x00]
45 ; AVX2-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
46 ; AVX2-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
47 ; AVX2-NEXT: vpcmpestri $7, (%ecx), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0x01,0x07]
48 ; AVX2-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
49 ; AVX2-NEXT: retl ## encoding: [0xc3]
51 ; SKX-LABEL: test_x86_sse42_pcmpestri128_load:
53 ; SKX-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x08]
54 ; SKX-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
55 ; SKX-NEXT: vmovdqa (%eax), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x00]
56 ; SKX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
57 ; SKX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
58 ; SKX-NEXT: vpcmpestri $7, (%ecx), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0x01,0x07]
59 ; SKX-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
60 ; SKX-NEXT: retl ## encoding: [0xc3]
61 %1 = load <16 x i8>, <16 x i8>* %a0
62 %2 = load <16 x i8>, <16 x i8>* %a2
63 %res = call i32 @llvm.x86.sse42.pcmpestri128(<16 x i8> %1, i32 7, <16 x i8> %2, i32 7, i8 7) ; <i32> [#uses=1]
68 define i32 @test_x86_sse42_pcmpestria128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
69 ; SSE42-LABEL: test_x86_sse42_pcmpestria128:
71 ; SSE42-NEXT: pushl %ebx ## encoding: [0x53]
72 ; SSE42-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
73 ; SSE42-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
74 ; SSE42-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
75 ; SSE42-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
76 ; SSE42-NEXT: seta %bl ## encoding: [0x0f,0x97,0xc3]
77 ; SSE42-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
78 ; SSE42-NEXT: popl %ebx ## encoding: [0x5b]
79 ; SSE42-NEXT: retl ## encoding: [0xc3]
81 ; VCHECK-LABEL: test_x86_sse42_pcmpestria128:
83 ; VCHECK-NEXT: pushl %ebx ## encoding: [0x53]
84 ; VCHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
85 ; VCHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
86 ; VCHECK-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
87 ; VCHECK-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
88 ; VCHECK-NEXT: seta %bl ## encoding: [0x0f,0x97,0xc3]
89 ; VCHECK-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
90 ; VCHECK-NEXT: popl %ebx ## encoding: [0x5b]
91 ; VCHECK-NEXT: retl ## encoding: [0xc3]
92 %res = call i32 @llvm.x86.sse42.pcmpestria128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
95 declare i32 @llvm.x86.sse42.pcmpestria128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
98 define i32 @test_x86_sse42_pcmpestric128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
99 ; SSE42-LABEL: test_x86_sse42_pcmpestric128:
101 ; SSE42-NEXT: pushl %ebx ## encoding: [0x53]
102 ; SSE42-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
103 ; SSE42-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
104 ; SSE42-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
105 ; SSE42-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
106 ; SSE42-NEXT: setb %bl ## encoding: [0x0f,0x92,0xc3]
107 ; SSE42-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
108 ; SSE42-NEXT: popl %ebx ## encoding: [0x5b]
109 ; SSE42-NEXT: retl ## encoding: [0xc3]
111 ; VCHECK-LABEL: test_x86_sse42_pcmpestric128:
113 ; VCHECK-NEXT: pushl %ebx ## encoding: [0x53]
114 ; VCHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
115 ; VCHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
116 ; VCHECK-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
117 ; VCHECK-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
118 ; VCHECK-NEXT: setb %bl ## encoding: [0x0f,0x92,0xc3]
119 ; VCHECK-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
120 ; VCHECK-NEXT: popl %ebx ## encoding: [0x5b]
121 ; VCHECK-NEXT: retl ## encoding: [0xc3]
122 %res = call i32 @llvm.x86.sse42.pcmpestric128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
125 declare i32 @llvm.x86.sse42.pcmpestric128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
128 define i32 @test_x86_sse42_pcmpestrio128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
129 ; SSE42-LABEL: test_x86_sse42_pcmpestrio128:
131 ; SSE42-NEXT: pushl %ebx ## encoding: [0x53]
132 ; SSE42-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
133 ; SSE42-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
134 ; SSE42-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
135 ; SSE42-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
136 ; SSE42-NEXT: seto %bl ## encoding: [0x0f,0x90,0xc3]
137 ; SSE42-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
138 ; SSE42-NEXT: popl %ebx ## encoding: [0x5b]
139 ; SSE42-NEXT: retl ## encoding: [0xc3]
141 ; VCHECK-LABEL: test_x86_sse42_pcmpestrio128:
143 ; VCHECK-NEXT: pushl %ebx ## encoding: [0x53]
144 ; VCHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
145 ; VCHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
146 ; VCHECK-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
147 ; VCHECK-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
148 ; VCHECK-NEXT: seto %bl ## encoding: [0x0f,0x90,0xc3]
149 ; VCHECK-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
150 ; VCHECK-NEXT: popl %ebx ## encoding: [0x5b]
151 ; VCHECK-NEXT: retl ## encoding: [0xc3]
152 %res = call i32 @llvm.x86.sse42.pcmpestrio128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
155 declare i32 @llvm.x86.sse42.pcmpestrio128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
158 define i32 @test_x86_sse42_pcmpestris128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
159 ; SSE42-LABEL: test_x86_sse42_pcmpestris128:
161 ; SSE42-NEXT: pushl %ebx ## encoding: [0x53]
162 ; SSE42-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
163 ; SSE42-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
164 ; SSE42-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
165 ; SSE42-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
166 ; SSE42-NEXT: sets %bl ## encoding: [0x0f,0x98,0xc3]
167 ; SSE42-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
168 ; SSE42-NEXT: popl %ebx ## encoding: [0x5b]
169 ; SSE42-NEXT: retl ## encoding: [0xc3]
171 ; VCHECK-LABEL: test_x86_sse42_pcmpestris128:
173 ; VCHECK-NEXT: pushl %ebx ## encoding: [0x53]
174 ; VCHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
175 ; VCHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
176 ; VCHECK-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
177 ; VCHECK-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
178 ; VCHECK-NEXT: sets %bl ## encoding: [0x0f,0x98,0xc3]
179 ; VCHECK-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
180 ; VCHECK-NEXT: popl %ebx ## encoding: [0x5b]
181 ; VCHECK-NEXT: retl ## encoding: [0xc3]
182 %res = call i32 @llvm.x86.sse42.pcmpestris128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
185 declare i32 @llvm.x86.sse42.pcmpestris128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
188 define i32 @test_x86_sse42_pcmpestriz128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
189 ; SSE42-LABEL: test_x86_sse42_pcmpestriz128:
191 ; SSE42-NEXT: pushl %ebx ## encoding: [0x53]
192 ; SSE42-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
193 ; SSE42-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
194 ; SSE42-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
195 ; SSE42-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
196 ; SSE42-NEXT: sete %bl ## encoding: [0x0f,0x94,0xc3]
197 ; SSE42-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
198 ; SSE42-NEXT: popl %ebx ## encoding: [0x5b]
199 ; SSE42-NEXT: retl ## encoding: [0xc3]
201 ; VCHECK-LABEL: test_x86_sse42_pcmpestriz128:
203 ; VCHECK-NEXT: pushl %ebx ## encoding: [0x53]
204 ; VCHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
205 ; VCHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
206 ; VCHECK-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
207 ; VCHECK-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
208 ; VCHECK-NEXT: sete %bl ## encoding: [0x0f,0x94,0xc3]
209 ; VCHECK-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
210 ; VCHECK-NEXT: popl %ebx ## encoding: [0x5b]
211 ; VCHECK-NEXT: retl ## encoding: [0xc3]
212 %res = call i32 @llvm.x86.sse42.pcmpestriz128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
215 declare i32 @llvm.x86.sse42.pcmpestriz128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
218 define <16 x i8> @test_x86_sse42_pcmpestrm128(<16 x i8> %a0, <16 x i8> %a2) {
219 ; SSE42-LABEL: test_x86_sse42_pcmpestrm128:
221 ; SSE42-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
222 ; SSE42-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
223 ; SSE42-NEXT: pcmpestrm $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x60,0xc1,0x07]
224 ; SSE42-NEXT: retl ## encoding: [0xc3]
226 ; VCHECK-LABEL: test_x86_sse42_pcmpestrm128:
228 ; VCHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
229 ; VCHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
230 ; VCHECK-NEXT: vpcmpestrm $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x60,0xc1,0x07]
231 ; VCHECK-NEXT: retl ## encoding: [0xc3]
232 %res = call <16 x i8> @llvm.x86.sse42.pcmpestrm128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <<16 x i8>> [#uses=1]
235 declare <16 x i8> @llvm.x86.sse42.pcmpestrm128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
238 define <16 x i8> @test_x86_sse42_pcmpestrm128_load(<16 x i8> %a0, <16 x i8>* %a2) {
239 ; SSE42-LABEL: test_x86_sse42_pcmpestrm128_load:
241 ; SSE42-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
242 ; SSE42-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
243 ; SSE42-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
244 ; SSE42-NEXT: pcmpestrm $7, (%ecx), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x60,0x01,0x07]
245 ; SSE42-NEXT: retl ## encoding: [0xc3]
247 ; VCHECK-LABEL: test_x86_sse42_pcmpestrm128_load:
249 ; VCHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
250 ; VCHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
251 ; VCHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
252 ; VCHECK-NEXT: vpcmpestrm $7, (%ecx), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x60,0x01,0x07]
253 ; VCHECK-NEXT: retl ## encoding: [0xc3]
254 %1 = load <16 x i8>, <16 x i8>* %a2
255 %res = call <16 x i8> @llvm.x86.sse42.pcmpestrm128(<16 x i8> %a0, i32 7, <16 x i8> %1, i32 7, i8 7) ; <<16 x i8>> [#uses=1]
260 define i32 @test_x86_sse42_pcmpistri128(<16 x i8> %a0, <16 x i8> %a1) {
261 ; SSE42-LABEL: test_x86_sse42_pcmpistri128:
263 ; SSE42-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
264 ; SSE42-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
265 ; SSE42-NEXT: retl ## encoding: [0xc3]
267 ; VCHECK-LABEL: test_x86_sse42_pcmpistri128:
269 ; VCHECK-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
270 ; VCHECK-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
271 ; VCHECK-NEXT: retl ## encoding: [0xc3]
272 %res = call i32 @llvm.x86.sse42.pcmpistri128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
275 declare i32 @llvm.x86.sse42.pcmpistri128(<16 x i8>, <16 x i8>, i8) nounwind readnone
278 define i32 @test_x86_sse42_pcmpistri128_load(<16 x i8>* %a0, <16 x i8>* %a1) {
279 ; SSE42-LABEL: test_x86_sse42_pcmpistri128_load:
281 ; SSE42-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
282 ; SSE42-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
283 ; SSE42-NEXT: movdqa (%ecx), %xmm0 ## encoding: [0x66,0x0f,0x6f,0x01]
284 ; SSE42-NEXT: pcmpistri $7, (%eax), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0x00,0x07]
285 ; SSE42-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
286 ; SSE42-NEXT: retl ## encoding: [0xc3]
288 ; AVX2-LABEL: test_x86_sse42_pcmpistri128_load:
290 ; AVX2-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
291 ; AVX2-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
292 ; AVX2-NEXT: vmovdqa (%ecx), %xmm0 ## encoding: [0xc5,0xf9,0x6f,0x01]
293 ; AVX2-NEXT: vpcmpistri $7, (%eax), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0x00,0x07]
294 ; AVX2-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
295 ; AVX2-NEXT: retl ## encoding: [0xc3]
297 ; SKX-LABEL: test_x86_sse42_pcmpistri128_load:
299 ; SKX-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
300 ; SKX-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
301 ; SKX-NEXT: vmovdqa (%ecx), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x01]
302 ; SKX-NEXT: vpcmpistri $7, (%eax), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0x00,0x07]
303 ; SKX-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
304 ; SKX-NEXT: retl ## encoding: [0xc3]
305 %1 = load <16 x i8>, <16 x i8>* %a0
306 %2 = load <16 x i8>, <16 x i8>* %a1
307 %res = call i32 @llvm.x86.sse42.pcmpistri128(<16 x i8> %1, <16 x i8> %2, i8 7) ; <i32> [#uses=1]
312 define i32 @test_x86_sse42_pcmpistria128(<16 x i8> %a0, <16 x i8> %a1) {
313 ; SSE42-LABEL: test_x86_sse42_pcmpistria128:
315 ; SSE42-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
316 ; SSE42-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
317 ; SSE42-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
318 ; SSE42-NEXT: retl ## encoding: [0xc3]
320 ; VCHECK-LABEL: test_x86_sse42_pcmpistria128:
322 ; VCHECK-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
323 ; VCHECK-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
324 ; VCHECK-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
325 ; VCHECK-NEXT: retl ## encoding: [0xc3]
326 %res = call i32 @llvm.x86.sse42.pcmpistria128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
329 declare i32 @llvm.x86.sse42.pcmpistria128(<16 x i8>, <16 x i8>, i8) nounwind readnone
332 define i32 @test_x86_sse42_pcmpistric128(<16 x i8> %a0, <16 x i8> %a1) {
333 ; SSE42-LABEL: test_x86_sse42_pcmpistric128:
335 ; SSE42-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
336 ; SSE42-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
337 ; SSE42-NEXT: setb %al ## encoding: [0x0f,0x92,0xc0]
338 ; SSE42-NEXT: retl ## encoding: [0xc3]
340 ; VCHECK-LABEL: test_x86_sse42_pcmpistric128:
342 ; VCHECK-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
343 ; VCHECK-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
344 ; VCHECK-NEXT: setb %al ## encoding: [0x0f,0x92,0xc0]
345 ; VCHECK-NEXT: retl ## encoding: [0xc3]
346 %res = call i32 @llvm.x86.sse42.pcmpistric128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
349 declare i32 @llvm.x86.sse42.pcmpistric128(<16 x i8>, <16 x i8>, i8) nounwind readnone
352 define i32 @test_x86_sse42_pcmpistrio128(<16 x i8> %a0, <16 x i8> %a1) {
353 ; SSE42-LABEL: test_x86_sse42_pcmpistrio128:
355 ; SSE42-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
356 ; SSE42-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
357 ; SSE42-NEXT: seto %al ## encoding: [0x0f,0x90,0xc0]
358 ; SSE42-NEXT: retl ## encoding: [0xc3]
360 ; VCHECK-LABEL: test_x86_sse42_pcmpistrio128:
362 ; VCHECK-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
363 ; VCHECK-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
364 ; VCHECK-NEXT: seto %al ## encoding: [0x0f,0x90,0xc0]
365 ; VCHECK-NEXT: retl ## encoding: [0xc3]
366 %res = call i32 @llvm.x86.sse42.pcmpistrio128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
369 declare i32 @llvm.x86.sse42.pcmpistrio128(<16 x i8>, <16 x i8>, i8) nounwind readnone
372 define i32 @test_x86_sse42_pcmpistris128(<16 x i8> %a0, <16 x i8> %a1) {
373 ; SSE42-LABEL: test_x86_sse42_pcmpistris128:
375 ; SSE42-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
376 ; SSE42-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
377 ; SSE42-NEXT: sets %al ## encoding: [0x0f,0x98,0xc0]
378 ; SSE42-NEXT: retl ## encoding: [0xc3]
380 ; VCHECK-LABEL: test_x86_sse42_pcmpistris128:
382 ; VCHECK-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
383 ; VCHECK-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
384 ; VCHECK-NEXT: sets %al ## encoding: [0x0f,0x98,0xc0]
385 ; VCHECK-NEXT: retl ## encoding: [0xc3]
386 %res = call i32 @llvm.x86.sse42.pcmpistris128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
389 declare i32 @llvm.x86.sse42.pcmpistris128(<16 x i8>, <16 x i8>, i8) nounwind readnone
392 define i32 @test_x86_sse42_pcmpistriz128(<16 x i8> %a0, <16 x i8> %a1) {
393 ; SSE42-LABEL: test_x86_sse42_pcmpistriz128:
395 ; SSE42-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
396 ; SSE42-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
397 ; SSE42-NEXT: sete %al ## encoding: [0x0f,0x94,0xc0]
398 ; SSE42-NEXT: retl ## encoding: [0xc3]
400 ; VCHECK-LABEL: test_x86_sse42_pcmpistriz128:
402 ; VCHECK-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
403 ; VCHECK-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
404 ; VCHECK-NEXT: sete %al ## encoding: [0x0f,0x94,0xc0]
405 ; VCHECK-NEXT: retl ## encoding: [0xc3]
406 %res = call i32 @llvm.x86.sse42.pcmpistriz128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
409 declare i32 @llvm.x86.sse42.pcmpistriz128(<16 x i8>, <16 x i8>, i8) nounwind readnone
412 define <16 x i8> @test_x86_sse42_pcmpistrm128(<16 x i8> %a0, <16 x i8> %a1) {
413 ; SSE42-LABEL: test_x86_sse42_pcmpistrm128:
415 ; SSE42-NEXT: pcmpistrm $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x62,0xc1,0x07]
416 ; SSE42-NEXT: retl ## encoding: [0xc3]
418 ; VCHECK-LABEL: test_x86_sse42_pcmpistrm128:
420 ; VCHECK-NEXT: vpcmpistrm $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x62,0xc1,0x07]
421 ; VCHECK-NEXT: retl ## encoding: [0xc3]
422 %res = call <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <<16 x i8>> [#uses=1]
425 declare <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8>, <16 x i8>, i8) nounwind readnone
428 define <16 x i8> @test_x86_sse42_pcmpistrm128_load(<16 x i8> %a0, <16 x i8>* %a1) {
429 ; SSE42-LABEL: test_x86_sse42_pcmpistrm128_load:
431 ; SSE42-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
432 ; SSE42-NEXT: pcmpistrm $7, (%eax), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x62,0x00,0x07]
433 ; SSE42-NEXT: retl ## encoding: [0xc3]
435 ; VCHECK-LABEL: test_x86_sse42_pcmpistrm128_load:
437 ; VCHECK-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
438 ; VCHECK-NEXT: vpcmpistrm $7, (%eax), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x62,0x00,0x07]
439 ; VCHECK-NEXT: retl ## encoding: [0xc3]
440 %1 = load <16 x i8>, <16 x i8>* %a1
441 %res = call <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8> %a0, <16 x i8> %1, i8 7) ; <<16 x i8>> [#uses=1]
445 define i32 @crc32_32_8(i32 %a, i8 %b) nounwind {
446 ; CHECK-LABEL: crc32_32_8:
448 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
449 ; CHECK-NEXT: crc32b {{[0-9]+}}(%esp), %eax ## encoding: [0xf2,0x0f,0x38,0xf0,0x44,0x24,0x08]
450 ; CHECK-NEXT: retl ## encoding: [0xc3]
451 %tmp = call i32 @llvm.x86.sse42.crc32.32.8(i32 %a, i8 %b)
454 declare i32 @llvm.x86.sse42.crc32.32.8(i32, i8) nounwind
456 define i32 @crc32_32_16(i32 %a, i16 %b) nounwind {
457 ; CHECK-LABEL: crc32_32_16:
459 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
460 ; CHECK-NEXT: crc32w {{[0-9]+}}(%esp), %eax ## encoding: [0x66,0xf2,0x0f,0x38,0xf1,0x44,0x24,0x08]
461 ; CHECK-NEXT: retl ## encoding: [0xc3]
462 %tmp = call i32 @llvm.x86.sse42.crc32.32.16(i32 %a, i16 %b)
465 declare i32 @llvm.x86.sse42.crc32.32.16(i32, i16) nounwind
467 define i32 @crc32_32_32(i32 %a, i32 %b) nounwind {
468 ; CHECK-LABEL: crc32_32_32:
470 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
471 ; CHECK-NEXT: crc32l {{[0-9]+}}(%esp), %eax ## encoding: [0xf2,0x0f,0x38,0xf1,0x44,0x24,0x08]
472 ; CHECK-NEXT: retl ## encoding: [0xc3]
473 %tmp = call i32 @llvm.x86.sse42.crc32.32.32(i32 %a, i32 %b)
476 declare i32 @llvm.x86.sse42.crc32.32.32(i32, i32) nounwind