From 106bb1fe2db88fe77458ec594c461c8428588dab Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 9 Nov 2016 05:38:47 +0000 Subject: [PATCH] [AVX-512] Add more varied alignments to tests for storing the lower 128-bits of a 256 or 512-bit subvector extract. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286343 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/avx512-extract-subvector.ll | 132 +++++++++++++++++++ 1 file changed, 132 insertions(+) diff --git a/test/CodeGen/X86/avx512-extract-subvector.ll b/test/CodeGen/X86/avx512-extract-subvector.ll index 8ea9b532cd7..9e866245282 100644 --- a/test/CodeGen/X86/avx512-extract-subvector.ll +++ b/test/CodeGen/X86/avx512-extract-subvector.ll @@ -141,6 +141,18 @@ entry: ret void } +define void @extract_subvector256_v4f64_store_lo_align_16(double* nocapture %addr, <4 x double> %a) nounwind uwtable ssp { +; SKX-LABEL: extract_subvector256_v4f64_store_lo_align_16: +; SKX: ## BB#0: ## %entry +; SKX-NEXT: vmovaps %xmm0, (%rdi) +; SKX-NEXT: retq +entry: + %0 = shufflevector <4 x double> %a, <4 x double> undef, <2 x i32> + %1 = bitcast double* %addr to <2 x double>* + store <2 x double> %0, <2 x double>* %1, align 16 + ret void +} + define void @extract_subvector256_v4f32_store_lo(float* nocapture %addr, <8 x float> %a) nounwind uwtable ssp { ; SKX-LABEL: extract_subvector256_v4f32_store_lo: ; SKX: ## BB#0: ## %entry @@ -153,6 +165,18 @@ entry: ret void } +define void @extract_subvector256_v4f32_store_lo_align_16(float* nocapture %addr, <8 x float> %a) nounwind uwtable ssp { +; SKX-LABEL: extract_subvector256_v4f32_store_lo_align_16: +; SKX: ## BB#0: ## %entry +; SKX-NEXT: vmovaps %xmm0, (%rdi) +; SKX-NEXT: retq +entry: + %0 = shufflevector <8 x float> %a, <8 x float> undef, <4 x i32> + %1 = bitcast float* %addr to <4 x float>* + store <4 x float> %0, <4 x float>* %1, align 16 + ret void +} + define void @extract_subvector256_v2i64_store_lo(i64* nocapture %addr, <4 x i64> %a) nounwind uwtable ssp { ; SKX-LABEL: extract_subvector256_v2i64_store_lo: ; SKX: ## BB#0: ## %entry @@ -165,6 +189,18 @@ entry: ret void } +define void @extract_subvector256_v2i64_store_lo_align_16(i64* nocapture %addr, <4 x i64> %a) nounwind uwtable ssp { +; SKX-LABEL: extract_subvector256_v2i64_store_lo_align_16: +; SKX: ## BB#0: ## %entry +; SKX-NEXT: vmovaps %xmm0, (%rdi) +; SKX-NEXT: retq +entry: + %0 = shufflevector <4 x i64> %a, <4 x i64> undef, <2 x i32> + %1 = bitcast i64* %addr to <2 x i64>* + store <2 x i64> %0, <2 x i64>* %1, align 16 + ret void +} + define void @extract_subvector256_v4i32_store_lo(i32* nocapture %addr, <8 x i32> %a) nounwind uwtable ssp { ; SKX-LABEL: extract_subvector256_v4i32_store_lo: ; SKX: ## BB#0: ## %entry @@ -177,6 +213,18 @@ entry: ret void } +define void @extract_subvector256_v4i32_store_lo_align_16(i32* nocapture %addr, <8 x i32> %a) nounwind uwtable ssp { +; SKX-LABEL: extract_subvector256_v4i32_store_lo_align_16: +; SKX: ## BB#0: ## %entry +; SKX-NEXT: vmovaps %xmm0, (%rdi) +; SKX-NEXT: retq +entry: + %0 = shufflevector <8 x i32> %a, <8 x i32> undef, <4 x i32> + %1 = bitcast i32* %addr to <4 x i32>* + store <4 x i32> %0, <4 x i32>* %1, align 16 + ret void +} + define void @extract_subvector256_v8i16_store_lo(i16* nocapture %addr, <16 x i16> %a) nounwind uwtable ssp { ; SKX-LABEL: extract_subvector256_v8i16_store_lo: ; SKX: ## BB#0: ## %entry @@ -189,6 +237,18 @@ entry: ret void } +define void @extract_subvector256_v8i16_store_lo_align_16(i16* nocapture %addr, <16 x i16> %a) nounwind uwtable ssp { +; SKX-LABEL: extract_subvector256_v8i16_store_lo_align_16: +; SKX: ## BB#0: ## %entry +; SKX-NEXT: vmovaps %xmm0, (%rdi) +; SKX-NEXT: retq +entry: + %0 = shufflevector <16 x i16> %a, <16 x i16> undef, <8 x i32> + %1 = bitcast i16* %addr to <8 x i16>* + store <8 x i16> %0, <8 x i16>* %1, align 16 + ret void +} + define void @extract_subvector256_v16i8_store_lo(i8* nocapture %addr, <32 x i8> %a) nounwind uwtable ssp { ; SKX-LABEL: extract_subvector256_v16i8_store_lo: ; SKX: ## BB#0: ## %entry @@ -201,6 +261,18 @@ entry: ret void } +define void @extract_subvector256_v16i8_store_lo_align_16(i8* nocapture %addr, <32 x i8> %a) nounwind uwtable ssp { +; SKX-LABEL: extract_subvector256_v16i8_store_lo_align_16: +; SKX: ## BB#0: ## %entry +; SKX-NEXT: vmovaps %xmm0, (%rdi) +; SKX-NEXT: retq +entry: + %0 = shufflevector <32 x i8> %a, <32 x i8> undef, <16 x i32> + %1 = bitcast i8* %addr to <16 x i8>* + store <16 x i8> %0, <16 x i8>* %1, align 16 + ret void +} + define void @extract_subvector512_v2f64_store_lo(double* nocapture %addr, <8 x double> %a) nounwind uwtable ssp { ; SKX-LABEL: extract_subvector512_v2f64_store_lo: ; SKX: ## BB#0: ## %entry @@ -213,6 +285,18 @@ entry: ret void } +define void @extract_subvector512_v2f64_store_lo_align_16(double* nocapture %addr, <8 x double> %a) nounwind uwtable ssp { +; SKX-LABEL: extract_subvector512_v2f64_store_lo_align_16: +; SKX: ## BB#0: ## %entry +; SKX-NEXT: vmovaps %xmm0, (%rdi) +; SKX-NEXT: retq +entry: + %0 = shufflevector <8 x double> %a, <8 x double> undef, <2 x i32> + %1 = bitcast double* %addr to <2 x double>* + store <2 x double> %0, <2 x double>* %1, align 16 + ret void +} + define void @extract_subvector512_v4f32_store_lo(float* nocapture %addr, <16 x float> %a) nounwind uwtable ssp { ; SKX-LABEL: extract_subvector512_v4f32_store_lo: ; SKX: ## BB#0: ## %entry @@ -225,6 +309,18 @@ entry: ret void } +define void @extract_subvector512_v4f32_store_lo_align_16(float* nocapture %addr, <16 x float> %a) nounwind uwtable ssp { +; SKX-LABEL: extract_subvector512_v4f32_store_lo_align_16: +; SKX: ## BB#0: ## %entry +; SKX-NEXT: vmovaps %xmm0, (%rdi) +; SKX-NEXT: retq +entry: + %0 = shufflevector <16 x float> %a, <16 x float> undef, <4 x i32> + %1 = bitcast float* %addr to <4 x float>* + store <4 x float> %0, <4 x float>* %1, align 16 + ret void +} + define void @extract_subvector512_v2i64_store_lo(i64* nocapture %addr, <8 x i64> %a) nounwind uwtable ssp { ; SKX-LABEL: extract_subvector512_v2i64_store_lo: ; SKX: ## BB#0: ## %entry @@ -237,6 +333,18 @@ entry: ret void } +define void @extract_subvector512_v2i64_store_lo_align_16(i64* nocapture %addr, <8 x i64> %a) nounwind uwtable ssp { +; SKX-LABEL: extract_subvector512_v2i64_store_lo_align_16: +; SKX: ## BB#0: ## %entry +; SKX-NEXT: vmovaps %xmm0, (%rdi) +; SKX-NEXT: retq +entry: + %0 = shufflevector <8 x i64> %a, <8 x i64> undef, <2 x i32> + %1 = bitcast i64* %addr to <2 x i64>* + store <2 x i64> %0, <2 x i64>* %1, align 16 + ret void +} + define void @extract_subvector512_v4i32_store_lo(i32* nocapture %addr, <16 x i32> %a) nounwind uwtable ssp { ; SKX-LABEL: extract_subvector512_v4i32_store_lo: ; SKX: ## BB#0: ## %entry @@ -249,6 +357,18 @@ entry: ret void } +define void @extract_subvector512_v4i32_store_lo_align_16(i32* nocapture %addr, <16 x i32> %a) nounwind uwtable ssp { +; SKX-LABEL: extract_subvector512_v4i32_store_lo_align_16: +; SKX: ## BB#0: ## %entry +; SKX-NEXT: vmovaps %xmm0, (%rdi) +; SKX-NEXT: retq +entry: + %0 = shufflevector <16 x i32> %a, <16 x i32> undef, <4 x i32> + %1 = bitcast i32* %addr to <4 x i32>* + store <4 x i32> %0, <4 x i32>* %1, align 16 + ret void +} + define void @extract_subvector512_v8i16_store_lo(i16* nocapture %addr, <32 x i16> %a) nounwind uwtable ssp { ; SKX-LABEL: extract_subvector512_v8i16_store_lo: ; SKX: ## BB#0: ## %entry @@ -273,6 +393,18 @@ entry: ret void } +define void @extract_subvector512_v16i8_store_lo_align_16(i8* nocapture %addr, <64 x i8> %a) nounwind uwtable ssp { +; SKX-LABEL: extract_subvector512_v16i8_store_lo_align_16: +; SKX: ## BB#0: ## %entry +; SKX-NEXT: vmovaps %xmm0, (%rdi) +; SKX-NEXT: retq +entry: + %0 = shufflevector <64 x i8> %a, <64 x i8> undef, <16 x i32> + %1 = bitcast i8* %addr to <16 x i8>* + store <16 x i8> %0, <16 x i8>* %1, align 16 + ret void +} + define void @extract_subvector512_v4f64_store_lo(double* nocapture %addr, <8 x double> %a) nounwind uwtable ssp { ; SKX-LABEL: extract_subvector512_v4f64_store_lo: ; SKX: ## BB#0: ## %entry -- 2.50.1