[llvm] r271393 - [X86][SSE] Added non-temporal store tests for all 512-bit vector types
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 1 06:58:00 PDT 2016
Author: rksimon
Date: Wed Jun 1 08:58:00 2016
New Revision: 271393
URL: http://llvm.org/viewvc/llvm-project?rev=271393&view=rev
Log:
[X86][SSE] Added non-temporal store tests for all 512-bit vector types
Modified:
llvm/trunk/test/CodeGen/X86/fast-isel-nontemporal.ll
Modified: llvm/trunk/test/CodeGen/X86/fast-isel-nontemporal.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-nontemporal.ll?rev=271393&r1=271392&r2=271393&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fast-isel-nontemporal.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fast-isel-nontemporal.ll Wed Jun 1 08:58:00 2016
@@ -2,7 +2,8 @@
; RUN: llc -verify-machineinstrs -mtriple=x86_64-unknown-unknown -mattr=+sse2 -fast-isel -O0 < %s | FileCheck %s --check-prefix=ALL --check-prefix=SSE --check-prefix=SSE2
; RUN: llc -verify-machineinstrs -mtriple=x86_64-unknown-unknown -mattr=+sse4a -fast-isel -O0 < %s | FileCheck %s --check-prefix=ALL --check-prefix=SSE --check-prefix=SSE4A
; RUN: llc -verify-machineinstrs -mtriple=x86_64-unknown-unknown -mattr=+avx -fast-isel -O0 < %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX
-; RUN: llc -verify-machineinstrs -mtriple=x86_64-unknown-unknown -mcpu=knl -fast-isel -O0 < %s | FileCheck %s --check-prefix=ALL --check-prefix=KNL
+; RUN: llc -verify-machineinstrs -mtriple=x86_64-unknown-unknown -mattr=+avx512f -fast-isel -O0 < %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX512 --check-prefix=AVX512F
+; RUN: llc -verify-machineinstrs -mtriple=x86_64-unknown-unknown -mattr=+avx512bw -fast-isel -O0 < %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX512 --check-prefix=AVX512BW
;
; Scalar Stores
@@ -44,10 +45,10 @@ define void @test_ntfloat(float* nocaptu
; AVX-NEXT: vmovss %xmm0, (%rdi)
; AVX-NEXT: retq
;
-; KNL-LABEL: test_ntfloat:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovss %xmm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_ntfloat:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovss %xmm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store float %X, float* %ptr, align 4, !nontemporal !1
ret void
@@ -69,10 +70,10 @@ define void @test_ntdouble(double* nocap
; AVX-NEXT: vmovsd %xmm0, (%rdi)
; AVX-NEXT: retq
;
-; KNL-LABEL: test_ntdouble:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovsd %xmm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_ntdouble:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovsd %xmm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store double %X, double* %ptr, align 8, !nontemporal !1
ret void
@@ -93,10 +94,10 @@ define void @test_nt4xfloat(<4 x float>*
; AVX-NEXT: vmovntps %xmm0, (%rdi)
; AVX-NEXT: retq
;
-; KNL-LABEL: test_nt4xfloat:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovntps %xmm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_nt4xfloat:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntps %xmm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store <4 x float> %X, <4 x float>* %ptr, align 16, !nontemporal !1
ret void
@@ -113,10 +114,10 @@ define void @test_nt2xdouble(<2 x double
; AVX-NEXT: vmovntpd %xmm0, (%rdi)
; AVX-NEXT: retq
;
-; KNL-LABEL: test_nt2xdouble:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovntpd %xmm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_nt2xdouble:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntpd %xmm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store <2 x double> %X, <2 x double>* %ptr, align 16, !nontemporal !1
ret void
@@ -133,10 +134,10 @@ define void @test_nt16xi8(<16 x i8>* noc
; AVX-NEXT: vmovntdq %xmm0, (%rdi)
; AVX-NEXT: retq
;
-; KNL-LABEL: test_nt16xi8:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovntdq %xmm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_nt16xi8:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntdq %xmm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store <16 x i8> %X, <16 x i8>* %ptr, align 16, !nontemporal !1
ret void
@@ -153,10 +154,10 @@ define void @test_nt8xi16(<8 x i16>* noc
; AVX-NEXT: vmovntdq %xmm0, (%rdi)
; AVX-NEXT: retq
;
-; KNL-LABEL: test_nt8xi16:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovntdq %xmm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_nt8xi16:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntdq %xmm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store <8 x i16> %X, <8 x i16>* %ptr, align 16, !nontemporal !1
ret void
@@ -173,10 +174,10 @@ define void @test_nt4xi32(<4 x i32>* noc
; AVX-NEXT: vmovntdq %xmm0, (%rdi)
; AVX-NEXT: retq
;
-; KNL-LABEL: test_nt4xi32:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovntdq %xmm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_nt4xi32:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntdq %xmm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store <4 x i32> %X, <4 x i32>* %ptr, align 16, !nontemporal !1
ret void
@@ -193,10 +194,10 @@ define void @test_nt2xi64(<2 x i64>* noc
; AVX-NEXT: vmovntdq %xmm0, (%rdi)
; AVX-NEXT: retq
;
-; KNL-LABEL: test_nt2xi64:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovntdq %xmm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_nt2xi64:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntdq %xmm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store <2 x i64> %X, <2 x i64>* %ptr, align 16, !nontemporal !1
ret void
@@ -219,10 +220,10 @@ define void @test_nt8xfloat(<8 x float>*
; AVX-NEXT: vzeroupper
; AVX-NEXT: retq
;
-; KNL-LABEL: test_nt8xfloat:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovntps %ymm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_nt8xfloat:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntps %ymm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store <8 x float> %X, <8 x float>* %ptr, align 32, !nontemporal !1
ret void
@@ -241,10 +242,10 @@ define void @test_nt4xdouble(<4 x double
; AVX-NEXT: vzeroupper
; AVX-NEXT: retq
;
-; KNL-LABEL: test_nt4xdouble:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovntpd %ymm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_nt4xdouble:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntpd %ymm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store <4 x double> %X, <4 x double>* %ptr, align 32, !nontemporal !1
ret void
@@ -263,10 +264,10 @@ define void @test_nt32xi8(<32 x i8>* noc
; AVX-NEXT: vzeroupper
; AVX-NEXT: retq
;
-; KNL-LABEL: test_nt32xi8:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovntdq %ymm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_nt32xi8:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntdq %ymm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store <32 x i8> %X, <32 x i8>* %ptr, align 32, !nontemporal !1
ret void
@@ -285,10 +286,10 @@ define void @test_nt16xi16(<16 x i16>* n
; AVX-NEXT: vzeroupper
; AVX-NEXT: retq
;
-; KNL-LABEL: test_nt16xi16:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovntdq %ymm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_nt16xi16:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntdq %ymm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store <16 x i16> %X, <16 x i16>* %ptr, align 32, !nontemporal !1
ret void
@@ -307,10 +308,10 @@ define void @test_nt8xi32(<8 x i32>* noc
; AVX-NEXT: vzeroupper
; AVX-NEXT: retq
;
-; KNL-LABEL: test_nt8xi32:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovntdq %ymm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_nt8xi32:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntdq %ymm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store <8 x i32> %X, <8 x i32>* %ptr, align 32, !nontemporal !1
ret void
@@ -329,13 +330,179 @@ define void @test_nt4xi64(<4 x i64>* noc
; AVX-NEXT: vzeroupper
; AVX-NEXT: retq
;
-; KNL-LABEL: test_nt4xi64:
-; KNL: # BB#0: # %entry
-; KNL-NEXT: vmovntdq %ymm0, (%rdi)
-; KNL-NEXT: retq
+; AVX512-LABEL: test_nt4xi64:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntdq %ymm0, (%rdi)
+; AVX512-NEXT: retq
entry:
store <4 x i64> %X, <4 x i64>* %ptr, align 32, !nontemporal !1
ret void
}
+;
+; 512-bit Vector Stores
+;
+
+define void @test_nt16xfloat(<16 x float>* nocapture %ptr, <16 x float> %X) {
+; SSE-LABEL: test_nt16xfloat:
+; SSE: # BB#0: # %entry
+; SSE-NEXT: movntps %xmm0, (%rdi)
+; SSE-NEXT: movntps %xmm1, 16(%rdi)
+; SSE-NEXT: movntps %xmm2, 32(%rdi)
+; SSE-NEXT: movntps %xmm3, 48(%rdi)
+; SSE-NEXT: retq
+;
+; AVX-LABEL: test_nt16xfloat:
+; AVX: # BB#0: # %entry
+; AVX-NEXT: vmovntps %ymm0, (%rdi)
+; AVX-NEXT: vmovntps %ymm1, 32(%rdi)
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+;
+; AVX512-LABEL: test_nt16xfloat:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntps %zmm0, (%rdi)
+; AVX512-NEXT: retq
+entry:
+ store <16 x float> %X, <16 x float>* %ptr, align 64, !nontemporal !1
+ ret void
+}
+
+define void @test_nt8xdouble(<8 x double>* nocapture %ptr, <8 x double> %X) {
+; SSE-LABEL: test_nt8xdouble:
+; SSE: # BB#0: # %entry
+; SSE-NEXT: movntpd %xmm0, (%rdi)
+; SSE-NEXT: movntpd %xmm1, 16(%rdi)
+; SSE-NEXT: movntpd %xmm2, 32(%rdi)
+; SSE-NEXT: movntpd %xmm3, 48(%rdi)
+; SSE-NEXT: retq
+;
+; AVX-LABEL: test_nt8xdouble:
+; AVX: # BB#0: # %entry
+; AVX-NEXT: vmovntpd %ymm0, (%rdi)
+; AVX-NEXT: vmovntpd %ymm1, 32(%rdi)
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+;
+; AVX512-LABEL: test_nt8xdouble:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntpd %zmm0, (%rdi)
+; AVX512-NEXT: retq
+entry:
+ store <8 x double> %X, <8 x double>* %ptr, align 64, !nontemporal !1
+ ret void
+}
+
+define void @test_nt64xi8(<64 x i8>* nocapture %ptr, <64 x i8> %X) {
+; SSE-LABEL: test_nt64xi8:
+; SSE: # BB#0: # %entry
+; SSE-NEXT: movntdq %xmm0, (%rdi)
+; SSE-NEXT: movntdq %xmm1, 16(%rdi)
+; SSE-NEXT: movntdq %xmm2, 32(%rdi)
+; SSE-NEXT: movntdq %xmm3, 48(%rdi)
+; SSE-NEXT: retq
+;
+; AVX-LABEL: test_nt64xi8:
+; AVX: # BB#0: # %entry
+; AVX-NEXT: vmovntps %ymm0, (%rdi)
+; AVX-NEXT: vmovntps %ymm1, 32(%rdi)
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+;
+; AVX512F-LABEL: test_nt64xi8:
+; AVX512F: # BB#0: # %entry
+; AVX512F-NEXT: vmovntdq %ymm0, (%rdi)
+; AVX512F-NEXT: vmovntdq %ymm1, 32(%rdi)
+; AVX512F-NEXT: retq
+;
+; AVX512BW-LABEL: test_nt64xi8:
+; AVX512BW: # BB#0: # %entry
+; AVX512BW-NEXT: vmovntdq %zmm0, (%rdi)
+; AVX512BW-NEXT: retq
+entry:
+ store <64 x i8> %X, <64 x i8>* %ptr, align 64, !nontemporal !1
+ ret void
+}
+
+define void @test_nt32xi16(<32 x i16>* nocapture %ptr, <32 x i16> %X) {
+; SSE-LABEL: test_nt32xi16:
+; SSE: # BB#0: # %entry
+; SSE-NEXT: movntdq %xmm0, (%rdi)
+; SSE-NEXT: movntdq %xmm1, 16(%rdi)
+; SSE-NEXT: movntdq %xmm2, 32(%rdi)
+; SSE-NEXT: movntdq %xmm3, 48(%rdi)
+; SSE-NEXT: retq
+;
+; AVX-LABEL: test_nt32xi16:
+; AVX: # BB#0: # %entry
+; AVX-NEXT: vmovntps %ymm0, (%rdi)
+; AVX-NEXT: vmovntps %ymm1, 32(%rdi)
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+;
+; AVX512F-LABEL: test_nt32xi16:
+; AVX512F: # BB#0: # %entry
+; AVX512F-NEXT: vmovntdq %ymm0, (%rdi)
+; AVX512F-NEXT: vmovntdq %ymm1, 32(%rdi)
+; AVX512F-NEXT: retq
+;
+; AVX512BW-LABEL: test_nt32xi16:
+; AVX512BW: # BB#0: # %entry
+; AVX512BW-NEXT: vmovntdq %zmm0, (%rdi)
+; AVX512BW-NEXT: retq
+entry:
+ store <32 x i16> %X, <32 x i16>* %ptr, align 64, !nontemporal !1
+ ret void
+}
+
+define void @test_nt16xi32(<16 x i32>* nocapture %ptr, <16 x i32> %X) {
+; SSE-LABEL: test_nt16xi32:
+; SSE: # BB#0: # %entry
+; SSE-NEXT: movntdq %xmm0, (%rdi)
+; SSE-NEXT: movntdq %xmm1, 16(%rdi)
+; SSE-NEXT: movntdq %xmm2, 32(%rdi)
+; SSE-NEXT: movntdq %xmm3, 48(%rdi)
+; SSE-NEXT: retq
+;
+; AVX-LABEL: test_nt16xi32:
+; AVX: # BB#0: # %entry
+; AVX-NEXT: vmovntps %ymm0, (%rdi)
+; AVX-NEXT: vmovntps %ymm1, 32(%rdi)
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+;
+; AVX512-LABEL: test_nt16xi32:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntdq %zmm0, (%rdi)
+; AVX512-NEXT: retq
+entry:
+ store <16 x i32> %X, <16 x i32>* %ptr, align 64, !nontemporal !1
+ ret void
+}
+
+define void @test_nt8xi64(<8 x i64>* nocapture %ptr, <8 x i64> %X) {
+; SSE-LABEL: test_nt8xi64:
+; SSE: # BB#0: # %entry
+; SSE-NEXT: movntdq %xmm0, (%rdi)
+; SSE-NEXT: movntdq %xmm1, 16(%rdi)
+; SSE-NEXT: movntdq %xmm2, 32(%rdi)
+; SSE-NEXT: movntdq %xmm3, 48(%rdi)
+; SSE-NEXT: retq
+;
+; AVX-LABEL: test_nt8xi64:
+; AVX: # BB#0: # %entry
+; AVX-NEXT: vmovntdq %ymm0, (%rdi)
+; AVX-NEXT: vmovntdq %ymm1, 32(%rdi)
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+;
+; AVX512-LABEL: test_nt8xi64:
+; AVX512: # BB#0: # %entry
+; AVX512-NEXT: vmovntdq %zmm0, (%rdi)
+; AVX512-NEXT: retq
+entry:
+ store <8 x i64> %X, <8 x i64>* %ptr, align 64, !nontemporal !1
+ ret void
+}
+
!1 = !{i32 1}
More information about the llvm-commits
mailing list