[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.

llvm-svn: 265167
This commit is contained in:
Sanjay Patel 2016-04-01 18:11:30 +00:00
parent 36404d0030
commit d3e3d48cb9
1 changed files with 106 additions and 105 deletions

View File

@ -1,16 +1,17 @@
; NOTE: Assertions have been autogenerated by update_test_checks.py ; 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=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 ; 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 ; https://llvm.org/bugs/show_bug.cgi?id=27100
define void @memset_16_nonzero_bytes(i8* %x) { define void @memset_16_nonzero_bytes(i8* %x) {
; SSE2-LABEL: memset_16_nonzero_bytes: ; SSE-LABEL: memset_16_nonzero_bytes:
; SSE2: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A ; SSE: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A
; SSE2-NEXT: movq %rax, 8(%rdi) ; SSE-NEXT: movq %rax, 8(%rdi)
; SSE2-NEXT: movq %rax, (%rdi) ; SSE-NEXT: movq %rax, (%rdi)
; SSE2-NEXT: retq ; SSE-NEXT: retq
; ;
; AVX-LABEL: memset_16_nonzero_bytes: ; 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] ; 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* %x) {
} }
define void @memset_32_nonzero_bytes(i8* %x) { define void @memset_32_nonzero_bytes(i8* %x) {
; SSE2-LABEL: memset_32_nonzero_bytes: ; SSE-LABEL: memset_32_nonzero_bytes:
; SSE2: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A ; SSE: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A
; SSE2-NEXT: movq %rax, 24(%rdi) ; SSE-NEXT: movq %rax, 24(%rdi)
; SSE2-NEXT: movq %rax, 16(%rdi) ; SSE-NEXT: movq %rax, 16(%rdi)
; SSE2-NEXT: movq %rax, 8(%rdi) ; SSE-NEXT: movq %rax, 8(%rdi)
; SSE2-NEXT: movq %rax, (%rdi) ; SSE-NEXT: movq %rax, (%rdi)
; SSE2-NEXT: retq ; SSE-NEXT: retq
; ;
; AVX-LABEL: memset_32_nonzero_bytes: ; 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] ; 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* %x) {
} }
define void @memset_64_nonzero_bytes(i8* %x) { define void @memset_64_nonzero_bytes(i8* %x) {
; SSE2-LABEL: memset_64_nonzero_bytes: ; SSE-LABEL: memset_64_nonzero_bytes:
; SSE2: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A ; SSE: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A
; SSE2-NEXT: movq %rax, 56(%rdi) ; SSE-NEXT: movq %rax, 56(%rdi)
; SSE2-NEXT: movq %rax, 48(%rdi) ; SSE-NEXT: movq %rax, 48(%rdi)
; SSE2-NEXT: movq %rax, 40(%rdi) ; SSE-NEXT: movq %rax, 40(%rdi)
; SSE2-NEXT: movq %rax, 32(%rdi) ; SSE-NEXT: movq %rax, 32(%rdi)
; SSE2-NEXT: movq %rax, 24(%rdi) ; SSE-NEXT: movq %rax, 24(%rdi)
; SSE2-NEXT: movq %rax, 16(%rdi) ; SSE-NEXT: movq %rax, 16(%rdi)
; SSE2-NEXT: movq %rax, 8(%rdi) ; SSE-NEXT: movq %rax, 8(%rdi)
; SSE2-NEXT: movq %rax, (%rdi) ; SSE-NEXT: movq %rax, (%rdi)
; SSE2-NEXT: retq ; SSE-NEXT: retq
; ;
; AVX-LABEL: memset_64_nonzero_bytes: ; 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] ; 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* %x) {
} }
define void @memset_128_nonzero_bytes(i8* %x) { define void @memset_128_nonzero_bytes(i8* %x) {
; SSE2-LABEL: memset_128_nonzero_bytes: ; SSE-LABEL: memset_128_nonzero_bytes:
; SSE2: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A ; SSE: movabsq $3038287259199220266, %rax # imm = 0x2A2A2A2A2A2A2A2A
; SSE2-NEXT: movq %rax, 120(%rdi) ; SSE-NEXT: movq %rax, 120(%rdi)
; SSE2-NEXT: movq %rax, 112(%rdi) ; SSE-NEXT: movq %rax, 112(%rdi)
; SSE2-NEXT: movq %rax, 104(%rdi) ; SSE-NEXT: movq %rax, 104(%rdi)
; SSE2-NEXT: movq %rax, 96(%rdi) ; SSE-NEXT: movq %rax, 96(%rdi)
; SSE2-NEXT: movq %rax, 88(%rdi) ; SSE-NEXT: movq %rax, 88(%rdi)
; SSE2-NEXT: movq %rax, 80(%rdi) ; SSE-NEXT: movq %rax, 80(%rdi)
; SSE2-NEXT: movq %rax, 72(%rdi) ; SSE-NEXT: movq %rax, 72(%rdi)
; SSE2-NEXT: movq %rax, 64(%rdi) ; SSE-NEXT: movq %rax, 64(%rdi)
; SSE2-NEXT: movq %rax, 56(%rdi) ; SSE-NEXT: movq %rax, 56(%rdi)
; SSE2-NEXT: movq %rax, 48(%rdi) ; SSE-NEXT: movq %rax, 48(%rdi)
; SSE2-NEXT: movq %rax, 40(%rdi) ; SSE-NEXT: movq %rax, 40(%rdi)
; SSE2-NEXT: movq %rax, 32(%rdi) ; SSE-NEXT: movq %rax, 32(%rdi)
; SSE2-NEXT: movq %rax, 24(%rdi) ; SSE-NEXT: movq %rax, 24(%rdi)
; SSE2-NEXT: movq %rax, 16(%rdi) ; SSE-NEXT: movq %rax, 16(%rdi)
; SSE2-NEXT: movq %rax, 8(%rdi) ; SSE-NEXT: movq %rax, 8(%rdi)
; SSE2-NEXT: movq %rax, (%rdi) ; SSE-NEXT: movq %rax, (%rdi)
; SSE2-NEXT: retq ; SSE-NEXT: retq
; ;
; AVX-LABEL: memset_128_nonzero_bytes: ; 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] ; 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* %x) {
} }
define void @memset_256_nonzero_bytes(i8* %x) { define void @memset_256_nonzero_bytes(i8* %x) {
; SSE2-LABEL: memset_256_nonzero_bytes: ; SSE-LABEL: memset_256_nonzero_bytes:
; SSE2: pushq %rax ; SSE: pushq %rax
; SSE2-NEXT: .Ltmp0: ; SSE-NEXT: .Ltmp0:
; SSE2-NEXT: .cfi_def_cfa_offset 16 ; SSE-NEXT: .cfi_def_cfa_offset 16
; SSE2-NEXT: movl $42, %esi ; SSE-NEXT: movl $42, %esi
; SSE2-NEXT: movl $256, %edx # imm = 0x100 ; SSE-NEXT: movl $256, %edx # imm = 0x100
; SSE2-NEXT: callq memset ; SSE-NEXT: callq memset
; SSE2-NEXT: popq %rax ; SSE-NEXT: popq %rax
; SSE2-NEXT: retq ; SSE-NEXT: retq
; ;
; AVX-LABEL: memset_256_nonzero_bytes: ; 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] ; 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, i64)
; Repeat with a non-constant value for the stores. ; Repeat with a non-constant value for the stores.
define void @memset_16_nonconst_bytes(i8* %x, i8 %c) { define void @memset_16_nonconst_bytes(i8* %x, i8 %c) {
; SSE2-LABEL: memset_16_nonconst_bytes: ; SSE-LABEL: memset_16_nonconst_bytes:
; SSE2: movzbl %sil, %eax ; SSE: movzbl %sil, %eax
; SSE2-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101 ; SSE-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101
; SSE2-NEXT: imulq %rax, %rcx ; SSE-NEXT: imulq %rax, %rcx
; SSE2-NEXT: movq %rcx, 8(%rdi) ; SSE-NEXT: movq %rcx, 8(%rdi)
; SSE2-NEXT: movq %rcx, (%rdi) ; SSE-NEXT: movq %rcx, (%rdi)
; SSE2-NEXT: retq ; SSE-NEXT: retq
; ;
; AVX1-LABEL: memset_16_nonconst_bytes: ; AVX1-LABEL: memset_16_nonconst_bytes:
; AVX1: vmovd %esi, %xmm0 ; AVX1: vmovd %esi, %xmm0
@ -157,15 +158,15 @@ define void @memset_16_nonconst_bytes(i8* %x, i8 %c) {
} }
define void @memset_32_nonconst_bytes(i8* %x, i8 %c) { define void @memset_32_nonconst_bytes(i8* %x, i8 %c) {
; SSE2-LABEL: memset_32_nonconst_bytes: ; SSE-LABEL: memset_32_nonconst_bytes:
; SSE2: movzbl %sil, %eax ; SSE: movzbl %sil, %eax
; SSE2-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101 ; SSE-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101
; SSE2-NEXT: imulq %rax, %rcx ; SSE-NEXT: imulq %rax, %rcx
; SSE2-NEXT: movq %rcx, 24(%rdi) ; SSE-NEXT: movq %rcx, 24(%rdi)
; SSE2-NEXT: movq %rcx, 16(%rdi) ; SSE-NEXT: movq %rcx, 16(%rdi)
; SSE2-NEXT: movq %rcx, 8(%rdi) ; SSE-NEXT: movq %rcx, 8(%rdi)
; SSE2-NEXT: movq %rcx, (%rdi) ; SSE-NEXT: movq %rcx, (%rdi)
; SSE2-NEXT: retq ; SSE-NEXT: retq
; ;
; AVX1-LABEL: memset_32_nonconst_bytes: ; AVX1-LABEL: memset_32_nonconst_bytes:
; AVX1: vmovd %esi, %xmm0 ; AVX1: vmovd %esi, %xmm0
@ -188,19 +189,19 @@ define void @memset_32_nonconst_bytes(i8* %x, i8 %c) {
} }
define void @memset_64_nonconst_bytes(i8* %x, i8 %c) { define void @memset_64_nonconst_bytes(i8* %x, i8 %c) {
; SSE2-LABEL: memset_64_nonconst_bytes: ; SSE-LABEL: memset_64_nonconst_bytes:
; SSE2: movzbl %sil, %eax ; SSE: movzbl %sil, %eax
; SSE2-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101 ; SSE-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101
; SSE2-NEXT: imulq %rax, %rcx ; SSE-NEXT: imulq %rax, %rcx
; SSE2-NEXT: movq %rcx, 56(%rdi) ; SSE-NEXT: movq %rcx, 56(%rdi)
; SSE2-NEXT: movq %rcx, 48(%rdi) ; SSE-NEXT: movq %rcx, 48(%rdi)
; SSE2-NEXT: movq %rcx, 40(%rdi) ; SSE-NEXT: movq %rcx, 40(%rdi)
; SSE2-NEXT: movq %rcx, 32(%rdi) ; SSE-NEXT: movq %rcx, 32(%rdi)
; SSE2-NEXT: movq %rcx, 24(%rdi) ; SSE-NEXT: movq %rcx, 24(%rdi)
; SSE2-NEXT: movq %rcx, 16(%rdi) ; SSE-NEXT: movq %rcx, 16(%rdi)
; SSE2-NEXT: movq %rcx, 8(%rdi) ; SSE-NEXT: movq %rcx, 8(%rdi)
; SSE2-NEXT: movq %rcx, (%rdi) ; SSE-NEXT: movq %rcx, (%rdi)
; SSE2-NEXT: retq ; SSE-NEXT: retq
; ;
; AVX1-LABEL: memset_64_nonconst_bytes: ; AVX1-LABEL: memset_64_nonconst_bytes:
; AVX1: vmovd %esi, %xmm0 ; AVX1: vmovd %esi, %xmm0
@ -225,27 +226,27 @@ define void @memset_64_nonconst_bytes(i8* %x, i8 %c) {
} }
define void @memset_128_nonconst_bytes(i8* %x, i8 %c) { define void @memset_128_nonconst_bytes(i8* %x, i8 %c) {
; SSE2-LABEL: memset_128_nonconst_bytes: ; SSE-LABEL: memset_128_nonconst_bytes:
; SSE2: movzbl %sil, %eax ; SSE: movzbl %sil, %eax
; SSE2-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101 ; SSE-NEXT: movabsq $72340172838076673, %rcx # imm = 0x101010101010101
; SSE2-NEXT: imulq %rax, %rcx ; SSE-NEXT: imulq %rax, %rcx
; SSE2-NEXT: movq %rcx, 120(%rdi) ; SSE-NEXT: movq %rcx, 120(%rdi)
; SSE2-NEXT: movq %rcx, 112(%rdi) ; SSE-NEXT: movq %rcx, 112(%rdi)
; SSE2-NEXT: movq %rcx, 104(%rdi) ; SSE-NEXT: movq %rcx, 104(%rdi)
; SSE2-NEXT: movq %rcx, 96(%rdi) ; SSE-NEXT: movq %rcx, 96(%rdi)
; SSE2-NEXT: movq %rcx, 88(%rdi) ; SSE-NEXT: movq %rcx, 88(%rdi)
; SSE2-NEXT: movq %rcx, 80(%rdi) ; SSE-NEXT: movq %rcx, 80(%rdi)
; SSE2-NEXT: movq %rcx, 72(%rdi) ; SSE-NEXT: movq %rcx, 72(%rdi)
; SSE2-NEXT: movq %rcx, 64(%rdi) ; SSE-NEXT: movq %rcx, 64(%rdi)
; SSE2-NEXT: movq %rcx, 56(%rdi) ; SSE-NEXT: movq %rcx, 56(%rdi)
; SSE2-NEXT: movq %rcx, 48(%rdi) ; SSE-NEXT: movq %rcx, 48(%rdi)
; SSE2-NEXT: movq %rcx, 40(%rdi) ; SSE-NEXT: movq %rcx, 40(%rdi)
; SSE2-NEXT: movq %rcx, 32(%rdi) ; SSE-NEXT: movq %rcx, 32(%rdi)
; SSE2-NEXT: movq %rcx, 24(%rdi) ; SSE-NEXT: movq %rcx, 24(%rdi)
; SSE2-NEXT: movq %rcx, 16(%rdi) ; SSE-NEXT: movq %rcx, 16(%rdi)
; SSE2-NEXT: movq %rcx, 8(%rdi) ; SSE-NEXT: movq %rcx, 8(%rdi)
; SSE2-NEXT: movq %rcx, (%rdi) ; SSE-NEXT: movq %rcx, (%rdi)
; SSE2-NEXT: retq ; SSE-NEXT: retq
; ;
; AVX1-LABEL: memset_128_nonconst_bytes: ; AVX1-LABEL: memset_128_nonconst_bytes:
; AVX1: vmovd %esi, %xmm0 ; AVX1: vmovd %esi, %xmm0
@ -274,9 +275,9 @@ define void @memset_128_nonconst_bytes(i8* %x, i8 %c) {
} }
define void @memset_256_nonconst_bytes(i8* %x, i8 %c) { define void @memset_256_nonconst_bytes(i8* %x, i8 %c) {
; SSE2-LABEL: memset_256_nonconst_bytes: ; SSE-LABEL: memset_256_nonconst_bytes:
; SSE2: movl $256, %edx # imm = 0x100 ; SSE: movl $256, %edx # imm = 0x100
; SSE2-NEXT: jmp memset # TAILCALL ; SSE-NEXT: jmp memset # TAILCALL
; ;
; AVX1-LABEL: memset_256_nonconst_bytes: ; AVX1-LABEL: memset_256_nonconst_bytes:
; AVX1: vmovd %esi, %xmm0 ; AVX1: vmovd %esi, %xmm0