llvm.org GIT mirror llvm / e43ad9f
[x86] add AVX2 run to show 256-bit opportunity; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298918 91177308-0d34-0410-b5e6-96231b3b80d8 Sanjay Patel 3 years ago
1 changed file(s) with 17 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
0 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
11 ; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefix=X32
22 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X64
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=AVX2 | FileCheck %s --check-prefix=X64 --check-prefix=AVX2
34
45 ; This tests codegen time inlining/optimization of memcmp
56 ; rdar://6480398
176177 ; X32-NEXT: setne %al
177178 ; X32-NEXT: retl
178179 ;
179 ; X64-LABEL: length16:
180 ; X64: # BB#0:
181 ; X64-NEXT: movdqu (%rsi), %xmm0
182 ; X64-NEXT: movdqu (%rdi), %xmm1
183 ; X64-NEXT: pcmpeqb %xmm0, %xmm1
184 ; X64-NEXT: pmovmskb %xmm1, %eax
185 ; X64-NEXT: cmpl $65535, %eax # imm = 0xFFFF
186 ; X64-NEXT: setne %al
187 ; X64-NEXT: retq
180 ; AVX2-LABEL: length16:
181 ; AVX2: # BB#0:
182 ; AVX2-NEXT: vmovdqu (%rdi), %xmm0
183 ; AVX2-NEXT: vpcmpeqb (%rsi), %xmm0, %xmm0
184 ; AVX2-NEXT: vpmovmskb %xmm0, %eax
185 ; AVX2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
186 ; AVX2-NEXT: setne %al
187 ; AVX2-NEXT: retq
188188 %call = tail call i32 @memcmp(i8* %x, i8* %y, i64 16) nounwind
189189 %cmp = icmp ne i32 %call, 0
190190 ret i1 %cmp
203203 ; X32-NEXT: sete %al
204204 ; X32-NEXT: retl
205205 ;
206 ; X64-LABEL: length16_const:
207 ; X64: # BB#0:
208 ; X64-NEXT: movdqu (%rdi), %xmm0
209 ; X64-NEXT: pcmpeqb {{.*}}(%rip), %xmm0
210 ; X64-NEXT: pmovmskb %xmm0, %eax
211 ; X64-NEXT: cmpl $65535, %eax # imm = 0xFFFF
212 ; X64-NEXT: sete %al
213 ; X64-NEXT: retq
206 ; AVX2-LABEL: length16_const:
207 ; AVX2: # BB#0:
208 ; AVX2-NEXT: vmovdqu (%rdi), %xmm0
209 ; AVX2-NEXT: vpcmpeqb {{.*}}(%rip), %xmm0, %xmm0
210 ; AVX2-NEXT: vpmovmskb %xmm0, %eax
211 ; AVX2-NEXT: cmpl $65535, %eax # imm = 0xFFFF
212 ; AVX2-NEXT: sete %al
213 ; AVX2-NEXT: retq
214214 %m = tail call i32 @memcmp(i8* %X, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i32 0, i32 0), i64 16) nounwind
215215 %c = icmp eq i32 %m, 0
216216 ret i1 %c