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=SSE,X86-SSE
3 ; RUN: llc < %s -disable-peephole -mtriple=i386-apple-darwin -mattr=+sse4.2,-crc32 -show-mc-encoding | FileCheck %s --check-prefixes=SSE,X86-SSE
4 ; RUN: llc < %s -disable-peephole -mtriple=i386-apple-darwin -mattr=+avx -show-mc-encoding | FileCheck %s --check-prefixes=AVX,X86-AVX,X86-AVX1
5 ; RUN: llc < %s -disable-peephole -mtriple=i386-apple-darwin -mattr=+avx512f,+avx512bw,+avx512dq,+avx512vl -show-mc-encoding | FileCheck %s --check-prefixes=AVX,X86-AVX,X86-AVX512
6 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-apple-darwin -mattr=+sse4.2 -show-mc-encoding | FileCheck %s --check-prefixes=SSE,X64-SSE
7 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-apple-darwin -mattr=+sse4.2,-crc32 -show-mc-encoding | FileCheck %s --check-prefixes=SSE,X64-SSE
8 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-apple-darwin -mattr=+avx -show-mc-encoding | FileCheck %s --check-prefixes=AVX,X64-AVX,X64-AVX1
9 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-apple-darwin -mattr=+avx512f,+avx512bw,+avx512dq,+avx512vl -show-mc-encoding | FileCheck %s --check-prefixes=AVX,X64-AVX,X64-AVX512
11 define i32 @test_x86_sse42_pcmpestri128(<16 x i8> %a0, <16 x i8> %a2) {
12 ; SSE-LABEL: test_x86_sse42_pcmpestri128:
14 ; SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
15 ; SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
16 ; SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
17 ; SSE-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
18 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
20 ; AVX-LABEL: test_x86_sse42_pcmpestri128:
22 ; AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
23 ; AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
24 ; AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
25 ; AVX-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
26 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
27 %res = call i32 @llvm.x86.sse42.pcmpestri128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
30 declare i32 @llvm.x86.sse42.pcmpestri128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
33 define i32 @test_x86_sse42_pcmpestri128_load(ptr %a0, ptr %a2) {
34 ; X86-SSE-LABEL: test_x86_sse42_pcmpestri128_load:
36 ; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x08]
37 ; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
38 ; X86-SSE-NEXT: movdqa (%eax), %xmm0 ## encoding: [0x66,0x0f,0x6f,0x00]
39 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
40 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
41 ; X86-SSE-NEXT: pcmpestri $7, (%ecx), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0x01,0x07]
42 ; X86-SSE-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
43 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
45 ; X86-AVX1-LABEL: test_x86_sse42_pcmpestri128_load:
47 ; X86-AVX1-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x08]
48 ; X86-AVX1-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
49 ; X86-AVX1-NEXT: vmovdqa (%eax), %xmm0 ## encoding: [0xc5,0xf9,0x6f,0x00]
50 ; X86-AVX1-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
51 ; X86-AVX1-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
52 ; X86-AVX1-NEXT: vpcmpestri $7, (%ecx), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0x01,0x07]
53 ; X86-AVX1-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
54 ; X86-AVX1-NEXT: retl ## encoding: [0xc3]
56 ; X86-AVX512-LABEL: test_x86_sse42_pcmpestri128_load:
57 ; X86-AVX512: ## %bb.0:
58 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x08]
59 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
60 ; X86-AVX512-NEXT: vmovdqa (%eax), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x00]
61 ; X86-AVX512-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
62 ; X86-AVX512-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
63 ; X86-AVX512-NEXT: vpcmpestri $7, (%ecx), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0x01,0x07]
64 ; X86-AVX512-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
65 ; X86-AVX512-NEXT: retl ## encoding: [0xc3]
67 ; X64-SSE-LABEL: test_x86_sse42_pcmpestri128_load:
69 ; X64-SSE-NEXT: movdqa (%rdi), %xmm0 ## encoding: [0x66,0x0f,0x6f,0x07]
70 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
71 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
72 ; X64-SSE-NEXT: pcmpestri $7, (%rsi), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0x06,0x07]
73 ; X64-SSE-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
74 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
76 ; X64-AVX1-LABEL: test_x86_sse42_pcmpestri128_load:
78 ; X64-AVX1-NEXT: vmovdqa (%rdi), %xmm0 ## encoding: [0xc5,0xf9,0x6f,0x07]
79 ; X64-AVX1-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
80 ; X64-AVX1-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
81 ; X64-AVX1-NEXT: vpcmpestri $7, (%rsi), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0x06,0x07]
82 ; X64-AVX1-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
83 ; X64-AVX1-NEXT: retq ## encoding: [0xc3]
85 ; X64-AVX512-LABEL: test_x86_sse42_pcmpestri128_load:
86 ; X64-AVX512: ## %bb.0:
87 ; X64-AVX512-NEXT: vmovdqa (%rdi), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x07]
88 ; X64-AVX512-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
89 ; X64-AVX512-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
90 ; X64-AVX512-NEXT: vpcmpestri $7, (%rsi), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0x06,0x07]
91 ; X64-AVX512-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
92 ; X64-AVX512-NEXT: retq ## encoding: [0xc3]
93 %1 = load <16 x i8>, ptr %a0
94 %2 = load <16 x i8>, ptr %a2
95 %res = call i32 @llvm.x86.sse42.pcmpestri128(<16 x i8> %1, i32 7, <16 x i8> %2, i32 7, i8 7) ; <i32> [#uses=1]
100 define i32 @test_x86_sse42_pcmpestria128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
101 ; X86-SSE-LABEL: test_x86_sse42_pcmpestria128:
103 ; X86-SSE-NEXT: pushl %ebx ## encoding: [0x53]
104 ; X86-SSE-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
105 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
106 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
107 ; X86-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
108 ; X86-SSE-NEXT: seta %bl ## encoding: [0x0f,0x97,0xc3]
109 ; X86-SSE-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
110 ; X86-SSE-NEXT: popl %ebx ## encoding: [0x5b]
111 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
113 ; X86-AVX-LABEL: test_x86_sse42_pcmpestria128:
115 ; X86-AVX-NEXT: pushl %ebx ## encoding: [0x53]
116 ; X86-AVX-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
117 ; X86-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
118 ; X86-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
119 ; X86-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
120 ; X86-AVX-NEXT: seta %bl ## encoding: [0x0f,0x97,0xc3]
121 ; X86-AVX-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
122 ; X86-AVX-NEXT: popl %ebx ## encoding: [0x5b]
123 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
125 ; X64-SSE-LABEL: test_x86_sse42_pcmpestria128:
127 ; X64-SSE-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
128 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
129 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
130 ; X64-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
131 ; X64-SSE-NEXT: seta %sil ## encoding: [0x40,0x0f,0x97,0xc6]
132 ; X64-SSE-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
133 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
135 ; X64-AVX-LABEL: test_x86_sse42_pcmpestria128:
137 ; X64-AVX-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
138 ; X64-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
139 ; X64-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
140 ; X64-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
141 ; X64-AVX-NEXT: seta %sil ## encoding: [0x40,0x0f,0x97,0xc6]
142 ; X64-AVX-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
143 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
144 %res = call i32 @llvm.x86.sse42.pcmpestria128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
147 declare i32 @llvm.x86.sse42.pcmpestria128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
150 define i32 @test_x86_sse42_pcmpestric128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
151 ; X86-SSE-LABEL: test_x86_sse42_pcmpestric128:
153 ; X86-SSE-NEXT: pushl %ebx ## encoding: [0x53]
154 ; X86-SSE-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
155 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
156 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
157 ; X86-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
158 ; X86-SSE-NEXT: setb %bl ## encoding: [0x0f,0x92,0xc3]
159 ; X86-SSE-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
160 ; X86-SSE-NEXT: popl %ebx ## encoding: [0x5b]
161 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
163 ; X86-AVX-LABEL: test_x86_sse42_pcmpestric128:
165 ; X86-AVX-NEXT: pushl %ebx ## encoding: [0x53]
166 ; X86-AVX-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
167 ; X86-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
168 ; X86-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
169 ; X86-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
170 ; X86-AVX-NEXT: setb %bl ## encoding: [0x0f,0x92,0xc3]
171 ; X86-AVX-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
172 ; X86-AVX-NEXT: popl %ebx ## encoding: [0x5b]
173 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
175 ; X64-SSE-LABEL: test_x86_sse42_pcmpestric128:
177 ; X64-SSE-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
178 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
179 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
180 ; X64-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
181 ; X64-SSE-NEXT: setb %sil ## encoding: [0x40,0x0f,0x92,0xc6]
182 ; X64-SSE-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
183 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
185 ; X64-AVX-LABEL: test_x86_sse42_pcmpestric128:
187 ; X64-AVX-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
188 ; X64-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
189 ; X64-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
190 ; X64-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
191 ; X64-AVX-NEXT: setb %sil ## encoding: [0x40,0x0f,0x92,0xc6]
192 ; X64-AVX-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
193 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
194 %res = call i32 @llvm.x86.sse42.pcmpestric128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
197 declare i32 @llvm.x86.sse42.pcmpestric128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
200 define i32 @test_x86_sse42_pcmpestrio128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
201 ; X86-SSE-LABEL: test_x86_sse42_pcmpestrio128:
203 ; X86-SSE-NEXT: pushl %ebx ## encoding: [0x53]
204 ; X86-SSE-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
205 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
206 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
207 ; X86-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
208 ; X86-SSE-NEXT: seto %bl ## encoding: [0x0f,0x90,0xc3]
209 ; X86-SSE-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
210 ; X86-SSE-NEXT: popl %ebx ## encoding: [0x5b]
211 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
213 ; X86-AVX-LABEL: test_x86_sse42_pcmpestrio128:
215 ; X86-AVX-NEXT: pushl %ebx ## encoding: [0x53]
216 ; X86-AVX-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
217 ; X86-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
218 ; X86-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
219 ; X86-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
220 ; X86-AVX-NEXT: seto %bl ## encoding: [0x0f,0x90,0xc3]
221 ; X86-AVX-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
222 ; X86-AVX-NEXT: popl %ebx ## encoding: [0x5b]
223 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
225 ; X64-SSE-LABEL: test_x86_sse42_pcmpestrio128:
227 ; X64-SSE-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
228 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
229 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
230 ; X64-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
231 ; X64-SSE-NEXT: seto %sil ## encoding: [0x40,0x0f,0x90,0xc6]
232 ; X64-SSE-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
233 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
235 ; X64-AVX-LABEL: test_x86_sse42_pcmpestrio128:
237 ; X64-AVX-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
238 ; X64-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
239 ; X64-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
240 ; X64-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
241 ; X64-AVX-NEXT: seto %sil ## encoding: [0x40,0x0f,0x90,0xc6]
242 ; X64-AVX-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
243 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
244 %res = call i32 @llvm.x86.sse42.pcmpestrio128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
247 declare i32 @llvm.x86.sse42.pcmpestrio128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
250 define i32 @test_x86_sse42_pcmpestris128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
251 ; X86-SSE-LABEL: test_x86_sse42_pcmpestris128:
253 ; X86-SSE-NEXT: pushl %ebx ## encoding: [0x53]
254 ; X86-SSE-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
255 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
256 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
257 ; X86-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
258 ; X86-SSE-NEXT: sets %bl ## encoding: [0x0f,0x98,0xc3]
259 ; X86-SSE-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
260 ; X86-SSE-NEXT: popl %ebx ## encoding: [0x5b]
261 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
263 ; X86-AVX-LABEL: test_x86_sse42_pcmpestris128:
265 ; X86-AVX-NEXT: pushl %ebx ## encoding: [0x53]
266 ; X86-AVX-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
267 ; X86-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
268 ; X86-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
269 ; X86-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
270 ; X86-AVX-NEXT: sets %bl ## encoding: [0x0f,0x98,0xc3]
271 ; X86-AVX-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
272 ; X86-AVX-NEXT: popl %ebx ## encoding: [0x5b]
273 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
275 ; X64-SSE-LABEL: test_x86_sse42_pcmpestris128:
277 ; X64-SSE-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
278 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
279 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
280 ; X64-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
281 ; X64-SSE-NEXT: sets %sil ## encoding: [0x40,0x0f,0x98,0xc6]
282 ; X64-SSE-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
283 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
285 ; X64-AVX-LABEL: test_x86_sse42_pcmpestris128:
287 ; X64-AVX-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
288 ; X64-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
289 ; X64-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
290 ; X64-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
291 ; X64-AVX-NEXT: sets %sil ## encoding: [0x40,0x0f,0x98,0xc6]
292 ; X64-AVX-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
293 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
294 %res = call i32 @llvm.x86.sse42.pcmpestris128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
297 declare i32 @llvm.x86.sse42.pcmpestris128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
300 define i32 @test_x86_sse42_pcmpestriz128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
301 ; X86-SSE-LABEL: test_x86_sse42_pcmpestriz128:
303 ; X86-SSE-NEXT: pushl %ebx ## encoding: [0x53]
304 ; X86-SSE-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
305 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
306 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
307 ; X86-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
308 ; X86-SSE-NEXT: sete %bl ## encoding: [0x0f,0x94,0xc3]
309 ; X86-SSE-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
310 ; X86-SSE-NEXT: popl %ebx ## encoding: [0x5b]
311 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
313 ; X86-AVX-LABEL: test_x86_sse42_pcmpestriz128:
315 ; X86-AVX-NEXT: pushl %ebx ## encoding: [0x53]
316 ; X86-AVX-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
317 ; X86-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
318 ; X86-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
319 ; X86-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
320 ; X86-AVX-NEXT: sete %bl ## encoding: [0x0f,0x94,0xc3]
321 ; X86-AVX-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
322 ; X86-AVX-NEXT: popl %ebx ## encoding: [0x5b]
323 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
325 ; X64-SSE-LABEL: test_x86_sse42_pcmpestriz128:
327 ; X64-SSE-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
328 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
329 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
330 ; X64-SSE-NEXT: pcmpestri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x61,0xc1,0x07]
331 ; X64-SSE-NEXT: sete %sil ## encoding: [0x40,0x0f,0x94,0xc6]
332 ; X64-SSE-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
333 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
335 ; X64-AVX-LABEL: test_x86_sse42_pcmpestriz128:
337 ; X64-AVX-NEXT: xorl %esi, %esi ## encoding: [0x31,0xf6]
338 ; X64-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
339 ; X64-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
340 ; X64-AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
341 ; X64-AVX-NEXT: sete %sil ## encoding: [0x40,0x0f,0x94,0xc6]
342 ; X64-AVX-NEXT: movl %esi, %eax ## encoding: [0x89,0xf0]
343 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
344 %res = call i32 @llvm.x86.sse42.pcmpestriz128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <i32> [#uses=1]
347 declare i32 @llvm.x86.sse42.pcmpestriz128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
350 define <16 x i8> @test_x86_sse42_pcmpestrm128(<16 x i8> %a0, <16 x i8> %a2) {
351 ; SSE-LABEL: test_x86_sse42_pcmpestrm128:
353 ; SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
354 ; SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
355 ; SSE-NEXT: pcmpestrm $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x60,0xc1,0x07]
356 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
358 ; AVX-LABEL: test_x86_sse42_pcmpestrm128:
360 ; AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
361 ; AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
362 ; AVX-NEXT: vpcmpestrm $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x60,0xc1,0x07]
363 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
364 %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]
367 declare <16 x i8> @llvm.x86.sse42.pcmpestrm128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone
370 define <16 x i8> @test_x86_sse42_pcmpestrm128_load(<16 x i8> %a0, ptr %a2) {
371 ; X86-SSE-LABEL: test_x86_sse42_pcmpestrm128_load:
373 ; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
374 ; X86-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
375 ; X86-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
376 ; X86-SSE-NEXT: pcmpestrm $7, (%ecx), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x60,0x01,0x07]
377 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
379 ; X86-AVX-LABEL: test_x86_sse42_pcmpestrm128_load:
381 ; X86-AVX-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
382 ; X86-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
383 ; X86-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
384 ; X86-AVX-NEXT: vpcmpestrm $7, (%ecx), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x60,0x01,0x07]
385 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
387 ; X64-SSE-LABEL: test_x86_sse42_pcmpestrm128_load:
389 ; X64-SSE-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
390 ; X64-SSE-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
391 ; X64-SSE-NEXT: pcmpestrm $7, (%rdi), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x60,0x07,0x07]
392 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
394 ; X64-AVX-LABEL: test_x86_sse42_pcmpestrm128_load:
396 ; X64-AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
397 ; X64-AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
398 ; X64-AVX-NEXT: vpcmpestrm $7, (%rdi), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x60,0x07,0x07]
399 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
400 %1 = load <16 x i8>, ptr %a2
401 %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]
406 define i32 @test_x86_sse42_pcmpistri128(<16 x i8> %a0, <16 x i8> %a1) {
407 ; SSE-LABEL: test_x86_sse42_pcmpistri128:
409 ; SSE-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
410 ; SSE-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
411 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
413 ; AVX-LABEL: test_x86_sse42_pcmpistri128:
415 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
416 ; AVX-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
417 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
418 %res = call i32 @llvm.x86.sse42.pcmpistri128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
421 declare i32 @llvm.x86.sse42.pcmpistri128(<16 x i8>, <16 x i8>, i8) nounwind readnone
424 define i32 @test_x86_sse42_pcmpistri128_load(ptr %a0, ptr %a1) {
425 ; X86-SSE-LABEL: test_x86_sse42_pcmpistri128_load:
427 ; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
428 ; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
429 ; X86-SSE-NEXT: movdqa (%ecx), %xmm0 ## encoding: [0x66,0x0f,0x6f,0x01]
430 ; X86-SSE-NEXT: pcmpistri $7, (%eax), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0x00,0x07]
431 ; X86-SSE-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
432 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
434 ; X86-AVX1-LABEL: test_x86_sse42_pcmpistri128_load:
435 ; X86-AVX1: ## %bb.0:
436 ; X86-AVX1-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
437 ; X86-AVX1-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
438 ; X86-AVX1-NEXT: vmovdqa (%ecx), %xmm0 ## encoding: [0xc5,0xf9,0x6f,0x01]
439 ; X86-AVX1-NEXT: vpcmpistri $7, (%eax), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0x00,0x07]
440 ; X86-AVX1-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
441 ; X86-AVX1-NEXT: retl ## encoding: [0xc3]
443 ; X86-AVX512-LABEL: test_x86_sse42_pcmpistri128_load:
444 ; X86-AVX512: ## %bb.0:
445 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
446 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
447 ; X86-AVX512-NEXT: vmovdqa (%ecx), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x01]
448 ; X86-AVX512-NEXT: vpcmpistri $7, (%eax), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0x00,0x07]
449 ; X86-AVX512-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
450 ; X86-AVX512-NEXT: retl ## encoding: [0xc3]
452 ; X64-SSE-LABEL: test_x86_sse42_pcmpistri128_load:
454 ; X64-SSE-NEXT: movdqa (%rdi), %xmm0 ## encoding: [0x66,0x0f,0x6f,0x07]
455 ; X64-SSE-NEXT: pcmpistri $7, (%rsi), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0x06,0x07]
456 ; X64-SSE-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
457 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
459 ; X64-AVX1-LABEL: test_x86_sse42_pcmpistri128_load:
460 ; X64-AVX1: ## %bb.0:
461 ; X64-AVX1-NEXT: vmovdqa (%rdi), %xmm0 ## encoding: [0xc5,0xf9,0x6f,0x07]
462 ; X64-AVX1-NEXT: vpcmpistri $7, (%rsi), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0x06,0x07]
463 ; X64-AVX1-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
464 ; X64-AVX1-NEXT: retq ## encoding: [0xc3]
466 ; X64-AVX512-LABEL: test_x86_sse42_pcmpistri128_load:
467 ; X64-AVX512: ## %bb.0:
468 ; X64-AVX512-NEXT: vmovdqa (%rdi), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x07]
469 ; X64-AVX512-NEXT: vpcmpistri $7, (%rsi), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0x06,0x07]
470 ; X64-AVX512-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
471 ; X64-AVX512-NEXT: retq ## encoding: [0xc3]
472 %1 = load <16 x i8>, ptr %a0
473 %2 = load <16 x i8>, ptr %a1
474 %res = call i32 @llvm.x86.sse42.pcmpistri128(<16 x i8> %1, <16 x i8> %2, i8 7) ; <i32> [#uses=1]
479 define i32 @test_x86_sse42_pcmpistria128(<16 x i8> %a0, <16 x i8> %a1) {
480 ; SSE-LABEL: test_x86_sse42_pcmpistria128:
482 ; SSE-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
483 ; SSE-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
484 ; SSE-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
485 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
487 ; AVX-LABEL: test_x86_sse42_pcmpistria128:
489 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
490 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
491 ; AVX-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
492 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
493 %res = call i32 @llvm.x86.sse42.pcmpistria128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
496 declare i32 @llvm.x86.sse42.pcmpistria128(<16 x i8>, <16 x i8>, i8) nounwind readnone
499 define i32 @test_x86_sse42_pcmpistric128(<16 x i8> %a0, <16 x i8> %a1) {
500 ; SSE-LABEL: test_x86_sse42_pcmpistric128:
502 ; SSE-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
503 ; SSE-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
504 ; SSE-NEXT: setb %al ## encoding: [0x0f,0x92,0xc0]
505 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
507 ; AVX-LABEL: test_x86_sse42_pcmpistric128:
509 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
510 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
511 ; AVX-NEXT: setb %al ## encoding: [0x0f,0x92,0xc0]
512 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
513 %res = call i32 @llvm.x86.sse42.pcmpistric128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
516 declare i32 @llvm.x86.sse42.pcmpistric128(<16 x i8>, <16 x i8>, i8) nounwind readnone
519 define i32 @test_x86_sse42_pcmpistrio128(<16 x i8> %a0, <16 x i8> %a1) {
520 ; SSE-LABEL: test_x86_sse42_pcmpistrio128:
522 ; SSE-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
523 ; SSE-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
524 ; SSE-NEXT: seto %al ## encoding: [0x0f,0x90,0xc0]
525 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
527 ; AVX-LABEL: test_x86_sse42_pcmpistrio128:
529 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
530 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
531 ; AVX-NEXT: seto %al ## encoding: [0x0f,0x90,0xc0]
532 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
533 %res = call i32 @llvm.x86.sse42.pcmpistrio128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
536 declare i32 @llvm.x86.sse42.pcmpistrio128(<16 x i8>, <16 x i8>, i8) nounwind readnone
539 define i32 @test_x86_sse42_pcmpistris128(<16 x i8> %a0, <16 x i8> %a1) {
540 ; SSE-LABEL: test_x86_sse42_pcmpistris128:
542 ; SSE-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
543 ; SSE-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
544 ; SSE-NEXT: sets %al ## encoding: [0x0f,0x98,0xc0]
545 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
547 ; AVX-LABEL: test_x86_sse42_pcmpistris128:
549 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
550 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
551 ; AVX-NEXT: sets %al ## encoding: [0x0f,0x98,0xc0]
552 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
553 %res = call i32 @llvm.x86.sse42.pcmpistris128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
556 declare i32 @llvm.x86.sse42.pcmpistris128(<16 x i8>, <16 x i8>, i8) nounwind readnone
559 define i32 @test_x86_sse42_pcmpistriz128(<16 x i8> %a0, <16 x i8> %a1) {
560 ; SSE-LABEL: test_x86_sse42_pcmpistriz128:
562 ; SSE-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
563 ; SSE-NEXT: pcmpistri $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x63,0xc1,0x07]
564 ; SSE-NEXT: sete %al ## encoding: [0x0f,0x94,0xc0]
565 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
567 ; AVX-LABEL: test_x86_sse42_pcmpistriz128:
569 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
570 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
571 ; AVX-NEXT: sete %al ## encoding: [0x0f,0x94,0xc0]
572 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
573 %res = call i32 @llvm.x86.sse42.pcmpistriz128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <i32> [#uses=1]
576 declare i32 @llvm.x86.sse42.pcmpistriz128(<16 x i8>, <16 x i8>, i8) nounwind readnone
579 define <16 x i8> @test_x86_sse42_pcmpistrm128(<16 x i8> %a0, <16 x i8> %a1) {
580 ; SSE-LABEL: test_x86_sse42_pcmpistrm128:
582 ; SSE-NEXT: pcmpistrm $7, %xmm1, %xmm0 ## encoding: [0x66,0x0f,0x3a,0x62,0xc1,0x07]
583 ; SSE-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
585 ; AVX-LABEL: test_x86_sse42_pcmpistrm128:
587 ; AVX-NEXT: vpcmpistrm $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x62,0xc1,0x07]
588 ; AVX-NEXT: ret{{[l|q]}} ## encoding: [0xc3]
589 %res = call <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <<16 x i8>> [#uses=1]
592 declare <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8>, <16 x i8>, i8) nounwind readnone
595 define <16 x i8> @test_x86_sse42_pcmpistrm128_load(<16 x i8> %a0, ptr %a1) {
596 ; X86-SSE-LABEL: test_x86_sse42_pcmpistrm128_load:
598 ; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
599 ; X86-SSE-NEXT: pcmpistrm $7, (%eax), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x62,0x00,0x07]
600 ; X86-SSE-NEXT: retl ## encoding: [0xc3]
602 ; X86-AVX-LABEL: test_x86_sse42_pcmpistrm128_load:
604 ; X86-AVX-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
605 ; X86-AVX-NEXT: vpcmpistrm $7, (%eax), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x62,0x00,0x07]
606 ; X86-AVX-NEXT: retl ## encoding: [0xc3]
608 ; X64-SSE-LABEL: test_x86_sse42_pcmpistrm128_load:
610 ; X64-SSE-NEXT: pcmpistrm $7, (%rdi), %xmm0 ## encoding: [0x66,0x0f,0x3a,0x62,0x07,0x07]
611 ; X64-SSE-NEXT: retq ## encoding: [0xc3]
613 ; X64-AVX-LABEL: test_x86_sse42_pcmpistrm128_load:
615 ; X64-AVX-NEXT: vpcmpistrm $7, (%rdi), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x62,0x07,0x07]
616 ; X64-AVX-NEXT: retq ## encoding: [0xc3]
617 %1 = load <16 x i8>, ptr %a1, align 1
618 %res = call <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8> %a0, <16 x i8> %1, i8 7) ; <<16 x i8>> [#uses=1]