From 3409abefac2ef5faa4f997bb9becede7e2864844 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Tue, 28 Mar 2017 15:55:50 +0000 Subject: [PATCH] [x86] add separate check prefix for SSE; NFC 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 | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/test/CodeGen/X86/memcmp.ll b/test/CodeGen/X86/memcmp.ll index 064e383d84b..1da6c254e07 100644 --- a/test/CodeGen/X86/memcmp.ll +++ b/test/CodeGen/X86/memcmp.ll @@ -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 -- 2.40.0