From 6f214c72d6fa77ab4cdb95f6a7a91964a76a58a9 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 22 Jun 2015 21:10:42 +0000 Subject: [PATCH] [X86][AVX2] Added missing stack folding tests for vpshufhw/vpshuflw git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240332 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/stack-folding-int-avx2.ll | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/test/CodeGen/X86/stack-folding-int-avx2.ll b/test/CodeGen/X86/stack-folding-int-avx2.ll index e930d244638..a164fbbc7a6 100644 --- a/test/CodeGen/X86/stack-folding-int-avx2.ll +++ b/test/CodeGen/X86/stack-folding-int-avx2.ll @@ -867,9 +867,21 @@ define <8 x i32> @stack_fold_pshufd(<8 x i32> %a0) { ret <8 x i32> %2 } -; TODO stack_fold_pshufhw +define <16 x i16> @stack_fold_vpshufhw(<16 x i16> %a0) { + ;CHECK-LABEL: stack_fold_vpshufhw + ;CHECK: vpshufhw $27, {{-?[0-9]*}}(%rsp), {{%ymm[0-9][0-9]*}} {{.*#+}} 32-byte Folded Reload + %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{flags}"() + %2 = shufflevector <16 x i16> %a0, <16 x i16> undef, <16 x i32> + ret <16 x i16> %2 +} -; TODO stack_fold_pshuflw +define <16 x i16> @stack_fold_vpshuflw(<16 x i16> %a0) { + ;CHECK-LABEL: stack_fold_vpshuflw + ;CHECK: vpshuflw $27, {{-?[0-9]*}}(%rsp), {{%ymm[0-9][0-9]*}} {{.*#+}} 32-byte Folded Reload + %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{flags}"() + %2 = shufflevector <16 x i16> %a0, <16 x i16> undef, <16 x i32> + ret <16 x i16> %2 +} define <32 x i8> @stack_fold_psignb(<32 x i8> %a0, <32 x i8> %a1) { ;CHECK-LABEL: stack_fold_psignb