1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -disable-peephole -mtriple=i386-apple-darwin -mattr=+sse4.2 -show-mc-encoding | FileCheck %s --check-prefixes=CHECK,X86,SSE,X86-SSE
3 ; RUN: llc < %s -disable-peephole -mtriple=i386-apple-darwin -mattr=+avx -show-mc-encoding | FileCheck %s --check-prefixes=CHECK,X86,AVX,X86-AVX,AVX1,X86-AVX1
4 ; RUN: llc < %s -disable-peephole -mtriple=i386-apple-darwin -mattr=+avx512f,+avx512bw,+avx512dq,+avx512vl -show-mc-encoding | FileCheck %s --check-prefixes=CHECK,X86,AVX,X86-AVX,AVX512,X86-AVX512
5 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-apple-darwin -mattr=+sse4.2 -show-mc-encoding | FileCheck %s --check-prefixes=CHECK,X64,SSE,X64-SSE
6 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-apple-darwin -mattr=+avx -show-mc-encoding | FileCheck %s --check-prefixes=CHECK,X64,AVX,X64-AVX,AVX1,X64-AVX1
7 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-apple-darwin -mattr=+avx512f,+avx512bw,+avx512dq,+avx512vl -show-mc-encoding | FileCheck %s --check-prefixes=CHECK,X64,AVX,X64-AVX,AVX512,X64-AVX512
9 define i32 @test_x86_sse42_pcmpestri128(<16 x i8> %a0, <16 x i8> %a2) {
10 ; SSE-LABEL: test_x86_sse42_pcmpestri128:
12 ; SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
13 ; SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
14 ; SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
15 ; SSE-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
16 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
18 ; AVX-LABEL: test_x86_sse42_pcmpestri128:
20 ; AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
21 ; AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
22 ; AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
23 ; AVX-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
24 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
25 %res = call i32 @llvm.x86.sse42.pcmpestri128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
28 declare i32 @llvm.x86.sse42.pcmpestri128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
31 define i32 @test_x86_sse42_pcmpestri128_load(<16 x i8>* %a0, <16 x i8>* %a2) {
32 ; X86-SSE-LABEL: test_x86_sse42_pcmpestri128_load:
34 ; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x08]
35 ; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
36 ; X86-SSE-NEXT: movdqa (%eax), %xmm0 ## encoding: [0x66,0x0f,0x6f,0x00]
37 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
38 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
39 ; X86-SSE-NEXT: pcmpestri $7, (%ecx), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0x01,0x07]
40 ; X86-SSE-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
41 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
43 ; X86-AVX1-LABEL: test_x86_sse42_pcmpestri128_load:
45 ; X86-AVX1-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x08]
46 ; X86-AVX1-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
47 ; X86-AVX1-NEXT: vmovdqa (%eax), %xmm0 ## encoding: [0xc5,0xf9,0x6f,0x00]
48 ; X86-AVX1-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
49 ; X86-AVX1-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
50 ; X86-AVX1-NEXT: vpcmpestri $7, (%ecx), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0x01,0x07]
51 ; X86-AVX1-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
52 ; X86-AVX1-NEXT: retl ## encoding: [0xc3]
54 ; X86-AVX512-LABEL: test_x86_sse42_pcmpestri128_load:
55 ; X86-AVX512: ## %bb.0:
56 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x08]
57 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
58 ; X86-AVX512-NEXT: vmovdqa (%eax), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x00]
59 ; X86-AVX512-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
60 ; X86-AVX512-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
61 ; X86-AVX512-NEXT: vpcmpestri $7, (%ecx), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0x01,0x07]
62 ; X86-AVX512-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
63 ; X86-AVX512-NEXT: retl ## encoding: [0xc3]
65 ; X64-SSE-LABEL: test_x86_sse42_pcmpestri128_load:
67 ; X64-SSE-NEXT: movdqa (%rdi), %xmm0 ## encoding: [0x66,0x0f,0x6f,0x07]
68 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
69 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
70 ; X64-SSE-NEXT: pcmpestri $7, (%rsi), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0x06,0x07]
71 ; X64-SSE-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
72 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
74 ; X64-AVX1-LABEL: test_x86_sse42_pcmpestri128_load:
76 ; X64-AVX1-NEXT: vmovdqa (%rdi), %xmm0 ## encoding: [0xc5,0xf9,0x6f,0x07]
77 ; X64-AVX1-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
78 ; X64-AVX1-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
79 ; X64-AVX1-NEXT: vpcmpestri $7, (%rsi), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0x06,0x07]
80 ; X64-AVX1-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
81 ; X64-AVX1-NEXT: retq ## encoding: [0xc3]
83 ; X64-AVX512-LABEL: test_x86_sse42_pcmpestri128_load:
84 ; X64-AVX512: ## %bb.0:
85 ; X64-AVX512-NEXT: vmovdqa (%rdi), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x07]
86 ; X64-AVX512-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
87 ; X64-AVX512-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
88 ; X64-AVX512-NEXT: vpcmpestri $7, (%rsi), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0x06,0x07]
89 ; X64-AVX512-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
90 ; X64-AVX512-NEXT: retq ## encoding: [0xc3]
91 %1 = load <16 x i8>, <16 x i8>* %a0
92 %2 = load <16 x i8>, <16 x i8>* %a2
93 %res = call i32 @llvm.x86.sse42.pcmpestri128(<16 x i8> %1, i32 7, <16 x i8> %2, i32 7, i8 7) ; <i32> [#uses=1]
98 define i32 @test_x86_sse42_pcmpestria128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
99 ; X86-SSE-LABEL: test_x86_sse42_pcmpestria128:
101 ; X86-SSE-NEXT: pushl %ebx ## encoding: [0x53]
102 ; X86-SSE-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
103 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
104 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
105 ; X86-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
106 ; X86-SSE-NEXT: seta %bl ## encoding: [0x0f,0x97,0xc3]
107 ; X86-SSE-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
108 ; X86-SSE-NEXT: popl %ebx ## encoding: [0x5b]
109 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
111 ; X86-AVX-LABEL: test_x86_sse42_pcmpestria128:
113 ; X86-AVX-NEXT: pushl %ebx ## encoding: [0x53]
114 ; X86-AVX-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
115 ; X86-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
116 ; X86-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
117 ; X86-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
118 ; X86-AVX-NEXT: seta %bl ## encoding: [0x0f,0x97,0xc3]
119 ; X86-AVX-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
120 ; X86-AVX-NEXT: popl %ebx ## encoding: [0x5b]
121 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
123 ; X64-SSE-LABEL: test_x86_sse42_pcmpestria128:
125 ; X64-SSE-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
126 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
127 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
128 ; X64-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
129 ; X64-SSE-NEXT: seta %sil ## encoding: [0x40,0x0f,0x97,0xc6]
130 ; X64-SSE-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
131 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
133 ; X64-AVX-LABEL: test_x86_sse42_pcmpestria128:
135 ; X64-AVX-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
136 ; X64-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
137 ; X64-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
138 ; X64-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
139 ; X64-AVX-NEXT: seta %sil ## encoding: [0x40,0x0f,0x97,0xc6]
140 ; X64-AVX-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
141 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
142 %res = call i32 @llvm.x86.sse42.pcmpestria128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
145 declare i32 @llvm.x86.sse42.pcmpestria128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
148 define i32 @test_x86_sse42_pcmpestric128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
149 ; X86-SSE-LABEL: test_x86_sse42_pcmpestric128:
151 ; X86-SSE-NEXT: pushl %ebx ## encoding: [0x53]
152 ; X86-SSE-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
153 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
154 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
155 ; X86-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
156 ; X86-SSE-NEXT: setb %bl ## encoding: [0x0f,0x92,0xc3]
157 ; X86-SSE-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
158 ; X86-SSE-NEXT: popl %ebx ## encoding: [0x5b]
159 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
161 ; X86-AVX-LABEL: test_x86_sse42_pcmpestric128:
163 ; X86-AVX-NEXT: pushl %ebx ## encoding: [0x53]
164 ; X86-AVX-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
165 ; X86-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
166 ; X86-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
167 ; X86-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
168 ; X86-AVX-NEXT: setb %bl ## encoding: [0x0f,0x92,0xc3]
169 ; X86-AVX-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
170 ; X86-AVX-NEXT: popl %ebx ## encoding: [0x5b]
171 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
173 ; X64-SSE-LABEL: test_x86_sse42_pcmpestric128:
175 ; X64-SSE-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
176 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
177 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
178 ; X64-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
179 ; X64-SSE-NEXT: setb %sil ## encoding: [0x40,0x0f,0x92,0xc6]
180 ; X64-SSE-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
181 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
183 ; X64-AVX-LABEL: test_x86_sse42_pcmpestric128:
185 ; X64-AVX-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
186 ; X64-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
187 ; X64-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
188 ; X64-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
189 ; X64-AVX-NEXT: setb %sil ## encoding: [0x40,0x0f,0x92,0xc6]
190 ; X64-AVX-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
191 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
192 %res = call i32 @llvm.x86.sse42.pcmpestric128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
195 declare i32 @llvm.x86.sse42.pcmpestric128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
198 define i32 @test_x86_sse42_pcmpestrio128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
199 ; X86-SSE-LABEL: test_x86_sse42_pcmpestrio128:
201 ; X86-SSE-NEXT: pushl %ebx ## encoding: [0x53]
202 ; X86-SSE-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
203 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
204 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
205 ; X86-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
206 ; X86-SSE-NEXT: seto %bl ## encoding: [0x0f,0x90,0xc3]
207 ; X86-SSE-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
208 ; X86-SSE-NEXT: popl %ebx ## encoding: [0x5b]
209 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
211 ; X86-AVX-LABEL: test_x86_sse42_pcmpestrio128:
213 ; X86-AVX-NEXT: pushl %ebx ## encoding: [0x53]
214 ; X86-AVX-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
215 ; X86-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
216 ; X86-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
217 ; X86-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
218 ; X86-AVX-NEXT: seto %bl ## encoding: [0x0f,0x90,0xc3]
219 ; X86-AVX-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
220 ; X86-AVX-NEXT: popl %ebx ## encoding: [0x5b]
221 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
223 ; X64-SSE-LABEL: test_x86_sse42_pcmpestrio128:
225 ; X64-SSE-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
226 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
227 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
228 ; X64-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
229 ; X64-SSE-NEXT: seto %sil ## encoding: [0x40,0x0f,0x90,0xc6]
230 ; X64-SSE-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
231 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
233 ; X64-AVX-LABEL: test_x86_sse42_pcmpestrio128:
235 ; X64-AVX-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
236 ; X64-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
237 ; X64-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
238 ; X64-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
239 ; X64-AVX-NEXT: seto %sil ## encoding: [0x40,0x0f,0x90,0xc6]
240 ; X64-AVX-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
241 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
242 %res = call i32 @llvm.x86.sse42.pcmpestrio128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
245 declare i32 @llvm.x86.sse42.pcmpestrio128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
248 define i32 @test_x86_sse42_pcmpestris128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
249 ; X86-SSE-LABEL: test_x86_sse42_pcmpestris128:
251 ; X86-SSE-NEXT: pushl %ebx ## encoding: [0x53]
252 ; X86-SSE-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
253 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
254 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
255 ; X86-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
256 ; X86-SSE-NEXT: sets %bl ## encoding: [0x0f,0x98,0xc3]
257 ; X86-SSE-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
258 ; X86-SSE-NEXT: popl %ebx ## encoding: [0x5b]
259 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
261 ; X86-AVX-LABEL: test_x86_sse42_pcmpestris128:
263 ; X86-AVX-NEXT: pushl %ebx ## encoding: [0x53]
264 ; X86-AVX-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
265 ; X86-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
266 ; X86-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
267 ; X86-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
268 ; X86-AVX-NEXT: sets %bl ## encoding: [0x0f,0x98,0xc3]
269 ; X86-AVX-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
270 ; X86-AVX-NEXT: popl %ebx ## encoding: [0x5b]
271 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
273 ; X64-SSE-LABEL: test_x86_sse42_pcmpestris128:
275 ; X64-SSE-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
276 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
277 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
278 ; X64-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
279 ; X64-SSE-NEXT: sets %sil ## encoding: [0x40,0x0f,0x98,0xc6]
280 ; X64-SSE-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
281 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
283 ; X64-AVX-LABEL: test_x86_sse42_pcmpestris128:
285 ; X64-AVX-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
286 ; X64-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
287 ; X64-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
288 ; X64-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
289 ; X64-AVX-NEXT: sets %sil ## encoding: [0x40,0x0f,0x98,0xc6]
290 ; X64-AVX-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
291 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
292 %res = call i32 @llvm.x86.sse42.pcmpestris128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
295 declare i32 @llvm.x86.sse42.pcmpestris128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
298 define i32 @test_x86_sse42_pcmpestriz128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
299 ; X86-SSE-LABEL: test_x86_sse42_pcmpestriz128:
301 ; X86-SSE-NEXT: pushl %ebx ## encoding: [0x53]
302 ; X86-SSE-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
303 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
304 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
305 ; X86-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
306 ; X86-SSE-NEXT: sete %bl ## encoding: [0x0f,0x94,0xc3]
307 ; X86-SSE-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
308 ; X86-SSE-NEXT: popl %ebx ## encoding: [0x5b]
309 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
311 ; X86-AVX-LABEL: test_x86_sse42_pcmpestriz128:
313 ; X86-AVX-NEXT: pushl %ebx ## encoding: [0x53]
314 ; X86-AVX-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
315 ; X86-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
316 ; X86-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
317 ; X86-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
318 ; X86-AVX-NEXT: sete %bl ## encoding: [0x0f,0x94,0xc3]
319 ; X86-AVX-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
320 ; X86-AVX-NEXT: popl %ebx ## encoding: [0x5b]
321 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
323 ; X64-SSE-LABEL: test_x86_sse42_pcmpestriz128:
325 ; X64-SSE-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
326 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
327 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
328 ; X64-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
329 ; X64-SSE-NEXT: sete %sil ## encoding: [0x40,0x0f,0x94,0xc6]
330 ; X64-SSE-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
331 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
333 ; X64-AVX-LABEL: test_x86_sse42_pcmpestriz128:
335 ; X64-AVX-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
336 ; X64-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
337 ; X64-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
338 ; X64-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
339 ; X64-AVX-NEXT: sete %sil ## encoding: [0x40,0x0f,0x94,0xc6]
340 ; X64-AVX-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
341 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
342 %res = call i32 @llvm.x86.sse42.pcmpestriz128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
345 declare i32 @llvm.x86.sse42.pcmpestriz128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
348 define <16 x i8> @test_x86_sse42_pcmpestrm128(<16 x i8> %a0, <16 x i8> %a2) {
349 ; SSE-LABEL: test_x86_sse42_pcmpestrm128:
351 ; SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
352 ; SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
353 ; SSE-NEXT: pcmpestrm $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x60,0xc1,0x07]
354 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
356 ; AVX-LABEL: test_x86_sse42_pcmpestrm128:
358 ; AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
359 ; AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
360 ; AVX-NEXT: vpcmpestrm $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x60,0xc1,0x07]
361 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
362 %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]
365 declare <16 x i8> @llvm.x86.sse42.pcmpestrm128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
368 define <16 x i8> @test_x86_sse42_pcmpestrm128_load(<16 x i8> %a0, <16 x i8>* %a2) {
369 ; X86-SSE-LABEL: test_x86_sse42_pcmpestrm128_load:
371 ; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
372 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
373 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
374 ; X86-SSE-NEXT: pcmpestrm $7, (%ecx), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x60,0x01,0x07]
375 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
377 ; X86-AVX-LABEL: test_x86_sse42_pcmpestrm128_load:
379 ; X86-AVX-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
380 ; X86-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
381 ; X86-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
382 ; X86-AVX-NEXT: vpcmpestrm $7, (%ecx), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x60,0x01,0x07]
383 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
385 ; X64-SSE-LABEL: test_x86_sse42_pcmpestrm128_load:
387 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
388 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
389 ; X64-SSE-NEXT: pcmpestrm $7, (%rdi), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x60,0x07,0x07]
390 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
392 ; X64-AVX-LABEL: test_x86_sse42_pcmpestrm128_load:
394 ; X64-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
395 ; X64-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
396 ; X64-AVX-NEXT: vpcmpestrm $7, (%rdi), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x60,0x07,0x07]
397 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
398 %1 = load <16 x i8>, <16 x i8>* %a2
399 %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]
404 define i32 @test_x86_sse42_pcmpistri128(<16 x i8> %a0, <16 x i8> %a1) {
405 ; SSE-LABEL: test_x86_sse42_pcmpistri128:
407 ; SSE-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
408 ; SSE-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
409 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
411 ; AVX-LABEL: test_x86_sse42_pcmpistri128:
413 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
414 ; AVX-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
415 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
416 %res = call i32 @llvm.x86.sse42.pcmpistri128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
419 declare i32 @llvm.x86.sse42.pcmpistri128(<16 x i8>, <16 x i8>, i8) nounwind readnone
422 define i32 @test_x86_sse42_pcmpistri128_load(<16 x i8>* %a0, <16 x i8>* %a1) {
423 ; X86-SSE-LABEL: test_x86_sse42_pcmpistri128_load:
425 ; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
426 ; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
427 ; X86-SSE-NEXT: movdqa (%ecx), %xmm0 ## encoding: [0x66,0x0f,0x6f,0x01]
428 ; X86-SSE-NEXT: pcmpistri $7, (%eax), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0x00,0x07]
429 ; X86-SSE-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
430 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
432 ; X86-AVX1-LABEL: test_x86_sse42_pcmpistri128_load:
433 ; X86-AVX1: ## %bb.0:
434 ; X86-AVX1-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
435 ; X86-AVX1-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
436 ; X86-AVX1-NEXT: vmovdqa (%ecx), %xmm0 ## encoding: [0xc5,0xf9,0x6f,0x01]
437 ; X86-AVX1-NEXT: vpcmpistri $7, (%eax), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0x00,0x07]
438 ; X86-AVX1-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
439 ; X86-AVX1-NEXT: retl ## encoding: [0xc3]
441 ; X86-AVX512-LABEL: test_x86_sse42_pcmpistri128_load:
442 ; X86-AVX512: ## %bb.0:
443 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
444 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
445 ; X86-AVX512-NEXT: vmovdqa (%ecx), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x01]
446 ; X86-AVX512-NEXT: vpcmpistri $7, (%eax), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0x00,0x07]
447 ; X86-AVX512-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
448 ; X86-AVX512-NEXT: retl ## encoding: [0xc3]
450 ; X64-SSE-LABEL: test_x86_sse42_pcmpistri128_load:
452 ; X64-SSE-NEXT: movdqa (%rdi), %xmm0 ## encoding: [0x66,0x0f,0x6f,0x07]
453 ; X64-SSE-NEXT: pcmpistri $7, (%rsi), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0x06,0x07]
454 ; X64-SSE-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
455 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
457 ; X64-AVX1-LABEL: test_x86_sse42_pcmpistri128_load:
458 ; X64-AVX1: ## %bb.0:
459 ; X64-AVX1-NEXT: vmovdqa (%rdi), %xmm0 ## encoding: [0xc5,0xf9,0x6f,0x07]
460 ; X64-AVX1-NEXT: vpcmpistri $7, (%rsi), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0x06,0x07]
461 ; X64-AVX1-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
462 ; X64-AVX1-NEXT: retq ## encoding: [0xc3]
464 ; X64-AVX512-LABEL: test_x86_sse42_pcmpistri128_load:
465 ; X64-AVX512: ## %bb.0:
466 ; X64-AVX512-NEXT: vmovdqa (%rdi), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x07]
467 ; X64-AVX512-NEXT: vpcmpistri $7, (%rsi), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0x06,0x07]
468 ; X64-AVX512-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
469 ; X64-AVX512-NEXT: retq ## encoding: [0xc3]
470 %1 = load <16 x i8>, <16 x i8>* %a0
471 %2 = load <16 x i8>, <16 x i8>* %a1
472 %res = call i32 @llvm.x86.sse42.pcmpistri128(<16 x i8> %1, <16 x i8> %2, i8 7) ; <i32> [#uses=1]
477 define i32 @test_x86_sse42_pcmpistria128(<16 x i8> %a0, <16 x i8> %a1) {
478 ; SSE-LABEL: test_x86_sse42_pcmpistria128:
480 ; SSE-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
481 ; SSE-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
482 ; SSE-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
483 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
485 ; AVX-LABEL: test_x86_sse42_pcmpistria128:
487 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
488 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
489 ; AVX-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
490 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
491 %res = call i32 @llvm.x86.sse42.pcmpistria128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
494 declare i32 @llvm.x86.sse42.pcmpistria128(<16 x i8>, <16 x i8>, i8) nounwind readnone
497 define i32 @test_x86_sse42_pcmpistric128(<16 x i8> %a0, <16 x i8> %a1) {
498 ; SSE-LABEL: test_x86_sse42_pcmpistric128:
500 ; SSE-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
501 ; SSE-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
502 ; SSE-NEXT: setb %al ## encoding: [0x0f,0x92,0xc0]
503 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
505 ; AVX-LABEL: test_x86_sse42_pcmpistric128:
507 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
508 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
509 ; AVX-NEXT: setb %al ## encoding: [0x0f,0x92,0xc0]
510 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
511 %res = call i32 @llvm.x86.sse42.pcmpistric128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
514 declare i32 @llvm.x86.sse42.pcmpistric128(<16 x i8>, <16 x i8>, i8) nounwind readnone
517 define i32 @test_x86_sse42_pcmpistrio128(<16 x i8> %a0, <16 x i8> %a1) {
518 ; SSE-LABEL: test_x86_sse42_pcmpistrio128:
520 ; SSE-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
521 ; SSE-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
522 ; SSE-NEXT: seto %al ## encoding: [0x0f,0x90,0xc0]
523 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
525 ; AVX-LABEL: test_x86_sse42_pcmpistrio128:
527 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
528 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
529 ; AVX-NEXT: seto %al ## encoding: [0x0f,0x90,0xc0]
530 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
531 %res = call i32 @llvm.x86.sse42.pcmpistrio128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
534 declare i32 @llvm.x86.sse42.pcmpistrio128(<16 x i8>, <16 x i8>, i8) nounwind readnone
537 define i32 @test_x86_sse42_pcmpistris128(<16 x i8> %a0, <16 x i8> %a1) {
538 ; SSE-LABEL: test_x86_sse42_pcmpistris128:
540 ; SSE-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
541 ; SSE-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
542 ; SSE-NEXT: sets %al ## encoding: [0x0f,0x98,0xc0]
543 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
545 ; AVX-LABEL: test_x86_sse42_pcmpistris128:
547 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
548 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
549 ; AVX-NEXT: sets %al ## encoding: [0x0f,0x98,0xc0]
550 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
551 %res = call i32 @llvm.x86.sse42.pcmpistris128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
554 declare i32 @llvm.x86.sse42.pcmpistris128(<16 x i8>, <16 x i8>, i8) nounwind readnone
557 define i32 @test_x86_sse42_pcmpistriz128(<16 x i8> %a0, <16 x i8> %a1) {
558 ; SSE-LABEL: test_x86_sse42_pcmpistriz128:
560 ; SSE-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
561 ; SSE-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
562 ; SSE-NEXT: sete %al ## encoding: [0x0f,0x94,0xc0]
563 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
565 ; AVX-LABEL: test_x86_sse42_pcmpistriz128:
567 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
568 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
569 ; AVX-NEXT: sete %al ## encoding: [0x0f,0x94,0xc0]
570 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
571 %res = call i32 @llvm.x86.sse42.pcmpistriz128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
574 declare i32 @llvm.x86.sse42.pcmpistriz128(<16 x i8>, <16 x i8>, i8) nounwind readnone
577 define <16 x i8> @test_x86_sse42_pcmpistrm128(<16 x i8> %a0, <16 x i8> %a1) {
578 ; SSE-LABEL: test_x86_sse42_pcmpistrm128:
580 ; SSE-NEXT: pcmpistrm $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x62,0xc1,0x07]
581 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
583 ; AVX-LABEL: test_x86_sse42_pcmpistrm128:
585 ; AVX-NEXT: vpcmpistrm $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x62,0xc1,0x07]
586 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
587 %res = call <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <<16 x i8>> [#uses=1]
590 declare <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8>, <16 x i8>, i8) nounwind readnone
593 define <16 x i8> @test_x86_sse42_pcmpistrm128_load(<16 x i8> %a0, <16 x i8>* %a1) {
594 ; X86-SSE-LABEL: test_x86_sse42_pcmpistrm128_load:
596 ; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
597 ; X86-SSE-NEXT: pcmpistrm $7, (%eax), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x62,0x00,0x07]
598 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
600 ; X86-AVX-LABEL: test_x86_sse42_pcmpistrm128_load:
602 ; X86-AVX-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
603 ; X86-AVX-NEXT: vpcmpistrm $7, (%eax), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x62,0x00,0x07]
604 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
606 ; X64-SSE-LABEL: test_x86_sse42_pcmpistrm128_load:
608 ; X64-SSE-NEXT: pcmpistrm $7, (%rdi), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x62,0x07,0x07]
609 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
611 ; X64-AVX-LABEL: test_x86_sse42_pcmpistrm128_load:
613 ; X64-AVX-NEXT: vpcmpistrm $7, (%rdi), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x62,0x07,0x07]
614 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
615 %1 = load <16 x i8>, <16 x i8>* %a1, align 1
616 %res = call <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8> %a0, <16 x i8> %1, i8 7) ; <<16 x i8>> [#uses=1]
620 define i32 @crc32_32_8(i32 %a, i8 %b) nounwind {
621 ; X86-LABEL: crc32_32_8:
623 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
624 ; X86-NEXT: crc32b {{[0-9]+}}(%esp), %eax ## encoding: [0xf2,0x0f,0x38,0xf0,0x44,0x24,0x08]
625 ; X86-NEXT: retl ## encoding: [0xc3]
627 ; X64-LABEL: crc32_32_8:
629 ; X64-NEXT: movl %edi, %eax ## encoding: [0x89,0xf8]
630 ; X64-NEXT: crc32b %sil, %eax ## encoding: [0xf2,0x40,0x0f,0x38,0xf0,0xc6]
631 ; X64-NEXT: retq ## encoding: [0xc3]
632 %tmp = call i32 @llvm.x86.sse42.crc32.32.8(i32 %a, i8 %b)
635 declare i32 @llvm.x86.sse42.crc32.32.8(i32, i8) nounwind
637 define i32 @crc32_32_16(i32 %a, i16 %b) nounwind {
638 ; X86-LABEL: crc32_32_16:
640 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
641 ; X86-NEXT: crc32w {{[0-9]+}}(%esp), %eax ## encoding: [0x66,0xf2,0x0f,0x38,0xf1,0x44,0x24,0x08]
642 ; X86-NEXT: retl ## encoding: [0xc3]
644 ; X64-LABEL: crc32_32_16:
646 ; X64-NEXT: movl %edi, %eax ## encoding: [0x89,0xf8]
647 ; X64-NEXT: crc32w %si, %eax ## encoding: [0x66,0xf2,0x0f,0x38,0xf1,0xc6]
648 ; X64-NEXT: retq ## encoding: [0xc3]
649 %tmp = call i32 @llvm.x86.sse42.crc32.32.16(i32 %a, i16 %b)
652 declare i32 @llvm.x86.sse42.crc32.32.16(i32, i16) nounwind
654 define i32 @crc32_32_32(i32 %a, i32 %b) nounwind {
655 ; X86-LABEL: crc32_32_32:
657 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
658 ; X86-NEXT: crc32l {{[0-9]+}}(%esp), %eax ## encoding: [0xf2,0x0f,0x38,0xf1,0x44,0x24,0x08]
659 ; X86-NEXT: retl ## encoding: [0xc3]
661 ; X64-LABEL: crc32_32_32:
663 ; X64-NEXT: movl %edi, %eax ## encoding: [0x89,0xf8]
664 ; X64-NEXT: crc32l %esi, %eax ## encoding: [0xf2,0x0f,0x38,0xf1,0xc6]
665 ; X64-NEXT: retq ## encoding: [0xc3]
666 %tmp = call i32 @llvm.x86.sse42.crc32.32.32(i32 %a, i32 %b)
669 declare i32 @llvm.x86.sse42.crc32.32.32(i32, i32) nounwind