diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-07-12 13:03:58 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-07-12 13:03:58 +0000 |
commit | 8a463897e9bb393288e179cf4f1fd09602c8d027 (patch) | |
tree | 67ce8dcafb403c384f2b0b7226db6638d360ae01 /llvm/test | |
parent | 8d7760cb7cc704b2b033be7810c922ec1fe8c9fb (diff) | |
download | bcm5719-llvm-8a463897e9bb393288e179cf4f1fd09602c8d027.tar.gz bcm5719-llvm-8a463897e9bb393288e179cf4f1fd09602c8d027.zip |
[X86][AVX] Use Zeroable mask to improve shuffle mask widening
Noticed while updating D42044, lowerV2X128VectorShuffle can improve the shuffle mask with the zeroable data to create a target shuffle mask to recognise more 'zero upper 128' patterns.
NOTE: lowerV4X128VectorShuffle could benefit as well but the code needs refactoring first to discriminate between SM_SentinelUndef and SM_SentinelZero for negative shuffle indices.
Differential Revision: https://reviews.llvm.org/D49092
llvm-svn: 336900
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/X86/avx-cast.ll | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/X86/avx-cast.ll b/llvm/test/CodeGen/X86/avx-cast.ll index 868e61ce5ef..4240f798bf9 100644 --- a/llvm/test/CodeGen/X86/avx-cast.ll +++ b/llvm/test/CodeGen/X86/avx-cast.ll @@ -20,9 +20,7 @@ define <8 x float> @castA(<4 x float> %m) nounwind uwtable readnone ssp { define <4 x double> @castB(<2 x double> %m) nounwind uwtable readnone ssp { ; AVX-LABEL: castB: ; AVX: ## %bb.0: -; AVX-NEXT: ## kill: def $xmm0 killed $xmm0 def $ymm0 -; AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 -; AVX-NEXT: vblendps {{.*#+}} ymm0 = ymm0[0,1,2,3],ymm1[4,5,6,7] +; AVX-NEXT: vmovaps %xmm0, %xmm0 ; AVX-NEXT: retq %shuffle.i = shufflevector <2 x double> %m, <2 x double> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 2> ret <4 x double> %shuffle.i @@ -33,9 +31,7 @@ define <4 x double> @castB(<2 x double> %m) nounwind uwtable readnone ssp { define <4 x i64> @castC(<2 x i64> %m) nounwind uwtable readnone ssp { ; AVX-LABEL: castC: ; AVX: ## %bb.0: -; AVX-NEXT: ## kill: def $xmm0 killed $xmm0 def $ymm0 -; AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1 -; AVX-NEXT: vblendps {{.*#+}} ymm0 = ymm0[0,1,2,3],ymm1[4,5,6,7] +; AVX-NEXT: vmovaps %xmm0, %xmm0 ; AVX-NEXT: retq %shuffle.i = shufflevector <2 x i64> %m, <2 x i64> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 2> ret <4 x i64> %shuffle.i |