[x86] add separate check prefix for SSE; NFC
authorSanjay Patel <spatel@rotateright.com>
Tue, 28 Mar 2017 15:55:50 +0000 (15:55 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 28 Mar 2017 15:55:50 +0000 (15:55 +0000)
We want to check each test on each target, so we need another prefix
when SSE and AVX diverge (as they will if we handle 32-byte and higher).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298926 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/X86/memcmp.ll

index 064e383d84b7113a2d9a793c81d7ce0cf123e746..1da6c254e071fae8bc6190135cdb0133c8f825c9 100644 (file)
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefix=X32
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X64
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X64 --check-prefix=SSE2
 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=AVX2 | FileCheck %s --check-prefix=X64 --check-prefix=AVX2
 
 ; This tests codegen time inlining/optimization of memcmp
@@ -178,6 +178,16 @@ define i1 @length16(i8* %x, i8* %y) nounwind {
 ; X32-NEXT:    setne %al
 ; X32-NEXT:    retl
 ;
+; SSE2-LABEL: length16:
+; SSE2:       # BB#0:
+; SSE2-NEXT:    movdqu (%rsi), %xmm0
+; SSE2-NEXT:    movdqu (%rdi), %xmm1
+; SSE2-NEXT:    pcmpeqb %xmm0, %xmm1
+; SSE2-NEXT:    pmovmskb %xmm1, %eax
+; SSE2-NEXT:    cmpl $65535, %eax # imm = 0xFFFF
+; SSE2-NEXT:    setne %al
+; SSE2-NEXT:    retq
+;
 ; AVX2-LABEL: length16:
 ; AVX2:       # BB#0:
 ; AVX2-NEXT:    vmovdqu (%rdi), %xmm0
@@ -204,6 +214,15 @@ define i1 @length16_const(i8* %X, i32* nocapture %P) nounwind {
 ; X32-NEXT:    sete %al
 ; X32-NEXT:    retl
 ;
+; SSE2-LABEL: length16_const:
+; SSE2:       # BB#0:
+; SSE2-NEXT:    movdqu (%rdi), %xmm0
+; SSE2-NEXT:    pcmpeqb {{.*}}(%rip), %xmm0
+; SSE2-NEXT:    pmovmskb %xmm0, %eax
+; SSE2-NEXT:    cmpl $65535, %eax # imm = 0xFFFF
+; SSE2-NEXT:    sete %al
+; SSE2-NEXT:    retq
+;
 ; AVX2-LABEL: length16_const:
 ; AVX2:       # BB#0:
 ; AVX2-NEXT:    vmovdqu (%rdi), %xmm0