[llvm] r265167 - [x86] add an SSE1 run for these tests
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 1 11:11:30 PDT 2016
Author: spatel
Date: Fri Apr 1 13:11:30 2016
New Revision: 265167
URL: http://llvm.org/viewvc/llvm-project?rev=265167&view=rev
Log:
[x86] add an SSE1 run for these tests
Note however that this is identical to the existing SSE2 run.
What we really want is yet another run for an SSE2 machine that
also has fast unaligned 16-byte accesses.
Modified:
llvm/trunk/test/CodeGen/X86/memset-nonzero.ll
Modified: llvm/trunk/test/CodeGen/X86/memset-nonzero.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/memset-nonzero.ll?rev=265167&r1=265166&r2=265167&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/memset-nonzero.ll (original)
+++ llvm/trunk/test/CodeGen/X86/memset-nonzero.ll Fri Apr 1 13:11:30 2016
@@ -1,16 +1,17 @@
; NOTE: Assertions have been autogenerated by update_test_checks.py
-; RUN: llc -mtriple=x86_64-unknown-unknown < %s -mattr=sse2 | FileCheck %s --check-prefix=ANY --check-prefix=SSE2
+; RUN: llc -mtriple=x86_64-unknown-unknown < %s -mattr=sse | FileCheck %s --check-prefix=ANY --check-prefix=SSE --check-prefix=SSE1
+; RUN: llc -mtriple=x86_64-unknown-unknown < %s -mattr=sse2 | FileCheck %s --check-prefix=ANY --check-prefix=SSE --check-prefix=SSE2
; RUN: llc -mtriple=x86_64-unknown-unknown < %s -mattr=avx | FileCheck %s --check-prefix=ANY --check-prefix=AVX --check-prefix=AVX1
; RUN: llc -mtriple=x86_64-unknown-unknown < %s -mattr=avx2 | FileCheck %s --check-prefix=ANY --check-prefix=AVX --check-prefix=AVX2
; https://llvm.org/bugs/show_bug.cgi?id=27100
define void @memset_16_nonzero_bytes(i8* %x) {
-; SSE2-LABEL: memset_16_nonzero_bytes:
-; SSE2: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A
-; SSE2-NEXT: movq %rax, 8(%rdi)
-; SSE2-NEXT: movq %rax, (%rdi)
-; SSE2-NEXT: retq
+; SSE-LABEL: memset_16_nonzero_bytes:
+; SSE: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A
+; SSE-NEXT: movq %rax, 8(%rdi)
+; SSE-NEXT: movq %rax, (%rdi)
+; SSE-NEXT: retq
;
; AVX-LABEL: memset_16_nonzero_bytes:
; AVX: vmovaps {{.*#+}} xmm0 = [42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42]
@@ -22,13 +23,13 @@ define void @memset_16_nonzero_bytes(i8*
}
define void @memset_32_nonzero_bytes(i8* %x) {
-; SSE2-LABEL: memset_32_nonzero_bytes:
-; SSE2: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A
-; SSE2-NEXT: movq %rax, 24(%rdi)
-; SSE2-NEXT: movq %rax, 16(%rdi)
-; SSE2-NEXT: movq %rax, 8(%rdi)
-; SSE2-NEXT: movq %rax, (%rdi)
-; SSE2-NEXT: retq
+; SSE-LABEL: memset_32_nonzero_bytes:
+; SSE: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A
+; SSE-NEXT: movq %rax, 24(%rdi)
+; SSE-NEXT: movq %rax, 16(%rdi)
+; SSE-NEXT: movq %rax, 8(%rdi)
+; SSE-NEXT: movq %rax, (%rdi)
+; SSE-NEXT: retq
;
; AVX-LABEL: memset_32_nonzero_bytes:
; AVX: vmovaps {{.*#+}} ymm0 = [42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42]
@@ -41,17 +42,17 @@ define void @memset_32_nonzero_bytes(i8*
}
define void @memset_64_nonzero_bytes(i8* %x) {
-; SSE2-LABEL: memset_64_nonzero_bytes:
-; SSE2: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A
-; SSE2-NEXT: movq %rax, 56(%rdi)
-; SSE2-NEXT: movq %rax, 48(%rdi)
-; SSE2-NEXT: movq %rax, 40(%rdi)
-; SSE2-NEXT: movq %rax, 32(%rdi)
-; SSE2-NEXT: movq %rax, 24(%rdi)
-; SSE2-NEXT: movq %rax, 16(%rdi)
-; SSE2-NEXT: movq %rax, 8(%rdi)
-; SSE2-NEXT: movq %rax, (%rdi)
-; SSE2-NEXT: retq
+; SSE-LABEL: memset_64_nonzero_bytes:
+; SSE: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A
+; SSE-NEXT: movq %rax, 56(%rdi)
+; SSE-NEXT: movq %rax, 48(%rdi)
+; SSE-NEXT: movq %rax, 40(%rdi)
+; SSE-NEXT: movq %rax, 32(%rdi)
+; SSE-NEXT: movq %rax, 24(%rdi)
+; SSE-NEXT: movq %rax, 16(%rdi)
+; SSE-NEXT: movq %rax, 8(%rdi)
+; SSE-NEXT: movq %rax, (%rdi)
+; SSE-NEXT: retq
;
; AVX-LABEL: memset_64_nonzero_bytes:
; AVX: vmovaps {{.*#+}} ymm0 = [42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42]
@@ -65,25 +66,25 @@ define void @memset_64_nonzero_bytes(i8*
}
define void @memset_128_nonzero_bytes(i8* %x) {
-; SSE2-LABEL: memset_128_nonzero_bytes:
-; SSE2: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A
-; SSE2-NEXT: movq %rax, 120(%rdi)
-; SSE2-NEXT: movq %rax, 112(%rdi)
-; SSE2-NEXT: movq %rax, 104(%rdi)
-; SSE2-NEXT: movq %rax, 96(%rdi)
-; SSE2-NEXT: movq %rax, 88(%rdi)
-; SSE2-NEXT: movq %rax, 80(%rdi)
-; SSE2-NEXT: movq %rax, 72(%rdi)
-; SSE2-NEXT: movq %rax, 64(%rdi)
-; SSE2-NEXT: movq %rax, 56(%rdi)
-; SSE2-NEXT: movq %rax, 48(%rdi)
-; SSE2-NEXT: movq %rax, 40(%rdi)
-; SSE2-NEXT: movq %rax, 32(%rdi)
-; SSE2-NEXT: movq %rax, 24(%rdi)
-; SSE2-NEXT: movq %rax, 16(%rdi)
-; SSE2-NEXT: movq %rax, 8(%rdi)
-; SSE2-NEXT: movq %rax, (%rdi)
-; SSE2-NEXT: retq
+; SSE-LABEL: memset_128_nonzero_bytes:
+; SSE: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A
+; SSE-NEXT: movq %rax, 120(%rdi)
+; SSE-NEXT: movq %rax, 112(%rdi)
+; SSE-NEXT: movq %rax, 104(%rdi)
+; SSE-NEXT: movq %rax, 96(%rdi)
+; SSE-NEXT: movq %rax, 88(%rdi)
+; SSE-NEXT: movq %rax, 80(%rdi)
+; SSE-NEXT: movq %rax, 72(%rdi)
+; SSE-NEXT: movq %rax, 64(%rdi)
+; SSE-NEXT: movq %rax, 56(%rdi)
+; SSE-NEXT: movq %rax, 48(%rdi)
+; SSE-NEXT: movq %rax, 40(%rdi)
+; SSE-NEXT: movq %rax, 32(%rdi)
+; SSE-NEXT: movq %rax, 24(%rdi)
+; SSE-NEXT: movq %rax, 16(%rdi)
+; SSE-NEXT: movq %rax, 8(%rdi)
+; SSE-NEXT: movq %rax, (%rdi)
+; SSE-NEXT: retq
;
; AVX-LABEL: memset_128_nonzero_bytes:
; AVX: vmovaps {{.*#+}} ymm0 = [42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42]
@@ -99,15 +100,15 @@ define void @memset_128_nonzero_bytes(i8
}
define void @memset_256_nonzero_bytes(i8* %x) {
-; SSE2-LABEL: memset_256_nonzero_bytes:
-; SSE2: pushq %rax
-; SSE2-NEXT: .Ltmp0:
-; SSE2-NEXT: .cfi_def_cfa_offset 16
-; SSE2-NEXT: movl $42, %esi
-; SSE2-NEXT: movl $256, %edx # imm = 0x100
-; SSE2-NEXT: callq memset
-; SSE2-NEXT: popq %rax
-; SSE2-NEXT: retq
+; SSE-LABEL: memset_256_nonzero_bytes:
+; SSE: pushq %rax
+; SSE-NEXT: .Ltmp0:
+; SSE-NEXT: .cfi_def_cfa_offset 16
+; SSE-NEXT: movl $42, %esi
+; SSE-NEXT: movl $256, %edx # imm = 0x100
+; SSE-NEXT: callq memset
+; SSE-NEXT: popq %rax
+; SSE-NEXT: retq
;
; AVX-LABEL: memset_256_nonzero_bytes:
; AVX: vmovaps {{.*#+}} ymm0 = [42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42]
@@ -131,13 +132,13 @@ declare i8* @__memset_chk(i8*, i32, i64,
; Repeat with a non-constant value for the stores.
define void @memset_16_nonconst_bytes(i8* %x, i8 %c) {
-; SSE2-LABEL: memset_16_nonconst_bytes:
-; SSE2: movzbl %sil, %eax
-; SSE2-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101
-; SSE2-NEXT: imulq %rax, %rcx
-; SSE2-NEXT: movq %rcx, 8(%rdi)
-; SSE2-NEXT: movq %rcx, (%rdi)
-; SSE2-NEXT: retq
+; SSE-LABEL: memset_16_nonconst_bytes:
+; SSE: movzbl %sil, %eax
+; SSE-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101
+; SSE-NEXT: imulq %rax, %rcx
+; SSE-NEXT: movq %rcx, 8(%rdi)
+; SSE-NEXT: movq %rcx, (%rdi)
+; SSE-NEXT: retq
;
; AVX1-LABEL: memset_16_nonconst_bytes:
; AVX1: vmovd %esi, %xmm0
@@ -157,15 +158,15 @@ define void @memset_16_nonconst_bytes(i8
}
define void @memset_32_nonconst_bytes(i8* %x, i8 %c) {
-; SSE2-LABEL: memset_32_nonconst_bytes:
-; SSE2: movzbl %sil, %eax
-; SSE2-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101
-; SSE2-NEXT: imulq %rax, %rcx
-; SSE2-NEXT: movq %rcx, 24(%rdi)
-; SSE2-NEXT: movq %rcx, 16(%rdi)
-; SSE2-NEXT: movq %rcx, 8(%rdi)
-; SSE2-NEXT: movq %rcx, (%rdi)
-; SSE2-NEXT: retq
+; SSE-LABEL: memset_32_nonconst_bytes:
+; SSE: movzbl %sil, %eax
+; SSE-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101
+; SSE-NEXT: imulq %rax, %rcx
+; SSE-NEXT: movq %rcx, 24(%rdi)
+; SSE-NEXT: movq %rcx, 16(%rdi)
+; SSE-NEXT: movq %rcx, 8(%rdi)
+; SSE-NEXT: movq %rcx, (%rdi)
+; SSE-NEXT: retq
;
; AVX1-LABEL: memset_32_nonconst_bytes:
; AVX1: vmovd %esi, %xmm0
@@ -188,19 +189,19 @@ define void @memset_32_nonconst_bytes(i8
}
define void @memset_64_nonconst_bytes(i8* %x, i8 %c) {
-; SSE2-LABEL: memset_64_nonconst_bytes:
-; SSE2: movzbl %sil, %eax
-; SSE2-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101
-; SSE2-NEXT: imulq %rax, %rcx
-; SSE2-NEXT: movq %rcx, 56(%rdi)
-; SSE2-NEXT: movq %rcx, 48(%rdi)
-; SSE2-NEXT: movq %rcx, 40(%rdi)
-; SSE2-NEXT: movq %rcx, 32(%rdi)
-; SSE2-NEXT: movq %rcx, 24(%rdi)
-; SSE2-NEXT: movq %rcx, 16(%rdi)
-; SSE2-NEXT: movq %rcx, 8(%rdi)
-; SSE2-NEXT: movq %rcx, (%rdi)
-; SSE2-NEXT: retq
+; SSE-LABEL: memset_64_nonconst_bytes:
+; SSE: movzbl %sil, %eax
+; SSE-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101
+; SSE-NEXT: imulq %rax, %rcx
+; SSE-NEXT: movq %rcx, 56(%rdi)
+; SSE-NEXT: movq %rcx, 48(%rdi)
+; SSE-NEXT: movq %rcx, 40(%rdi)
+; SSE-NEXT: movq %rcx, 32(%rdi)
+; SSE-NEXT: movq %rcx, 24(%rdi)
+; SSE-NEXT: movq %rcx, 16(%rdi)
+; SSE-NEXT: movq %rcx, 8(%rdi)
+; SSE-NEXT: movq %rcx, (%rdi)
+; SSE-NEXT: retq
;
; AVX1-LABEL: memset_64_nonconst_bytes:
; AVX1: vmovd %esi, %xmm0
@@ -225,27 +226,27 @@ define void @memset_64_nonconst_bytes(i8
}
define void @memset_128_nonconst_bytes(i8* %x, i8 %c) {
-; SSE2-LABEL: memset_128_nonconst_bytes:
-; SSE2: movzbl %sil, %eax
-; SSE2-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101
-; SSE2-NEXT: imulq %rax, %rcx
-; SSE2-NEXT: movq %rcx, 120(%rdi)
-; SSE2-NEXT: movq %rcx, 112(%rdi)
-; SSE2-NEXT: movq %rcx, 104(%rdi)
-; SSE2-NEXT: movq %rcx, 96(%rdi)
-; SSE2-NEXT: movq %rcx, 88(%rdi)
-; SSE2-NEXT: movq %rcx, 80(%rdi)
-; SSE2-NEXT: movq %rcx, 72(%rdi)
-; SSE2-NEXT: movq %rcx, 64(%rdi)
-; SSE2-NEXT: movq %rcx, 56(%rdi)
-; SSE2-NEXT: movq %rcx, 48(%rdi)
-; SSE2-NEXT: movq %rcx, 40(%rdi)
-; SSE2-NEXT: movq %rcx, 32(%rdi)
-; SSE2-NEXT: movq %rcx, 24(%rdi)
-; SSE2-NEXT: movq %rcx, 16(%rdi)
-; SSE2-NEXT: movq %rcx, 8(%rdi)
-; SSE2-NEXT: movq %rcx, (%rdi)
-; SSE2-NEXT: retq
+; SSE-LABEL: memset_128_nonconst_bytes:
+; SSE: movzbl %sil, %eax
+; SSE-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101
+; SSE-NEXT: imulq %rax, %rcx
+; SSE-NEXT: movq %rcx, 120(%rdi)
+; SSE-NEXT: movq %rcx, 112(%rdi)
+; SSE-NEXT: movq %rcx, 104(%rdi)
+; SSE-NEXT: movq %rcx, 96(%rdi)
+; SSE-NEXT: movq %rcx, 88(%rdi)
+; SSE-NEXT: movq %rcx, 80(%rdi)
+; SSE-NEXT: movq %rcx, 72(%rdi)
+; SSE-NEXT: movq %rcx, 64(%rdi)
+; SSE-NEXT: movq %rcx, 56(%rdi)
+; SSE-NEXT: movq %rcx, 48(%rdi)
+; SSE-NEXT: movq %rcx, 40(%rdi)
+; SSE-NEXT: movq %rcx, 32(%rdi)
+; SSE-NEXT: movq %rcx, 24(%rdi)
+; SSE-NEXT: movq %rcx, 16(%rdi)
+; SSE-NEXT: movq %rcx, 8(%rdi)
+; SSE-NEXT: movq %rcx, (%rdi)
+; SSE-NEXT: retq
;
; AVX1-LABEL: memset_128_nonconst_bytes:
; AVX1: vmovd %esi, %xmm0
@@ -274,9 +275,9 @@ define void @memset_128_nonconst_bytes(i
}
define void @memset_256_nonconst_bytes(i8* %x, i8 %c) {
-; SSE2-LABEL: memset_256_nonconst_bytes:
-; SSE2: movl $256, %edx # imm = 0x100
-; SSE2-NEXT: jmp memset # TAILCALL
+; SSE-LABEL: memset_256_nonconst_bytes:
+; SSE: movl $256, %edx # imm = 0x100
+; SSE-NEXT: jmp memset # TAILCALL
;
; AVX1-LABEL: memset_256_nonconst_bytes:
; AVX1: vmovd %esi, %xmm0
More information about the llvm-commits
mailing list