diff options
| author | Craig Topper <craig.topper@gmail.com> | 2017-01-24 02:36:59 +0000 | 
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2017-01-24 02:36:59 +0000 | 
| commit | ff272ad4f36b9794ca79ebcad01df91544d5a67b (patch) | |
| tree | 42c42412e21a5ed6aaf3bf144036e635ca601620 /llvm/test/CodeGen/X86/vector-zext.ll | |
| parent | b889744e5bb7d307872d33dfb3e22cd8416a3a2a (diff) | |
| download | bcm5719-llvm-ff272ad4f36b9794ca79ebcad01df91544d5a67b.tar.gz bcm5719-llvm-ff272ad4f36b9794ca79ebcad01df91544d5a67b.zip | |
[SelectionDAG] Teach getNode to simplify a couple easy cases of EXTRACT_SUBVECTOR
Summary:
This teaches getNode to simplify extracting from Undef. This is similar to what is done for EXTRACT_VECTOR_ELT. It also adds support for extracting from CONCAT_VECTOR when we can reuse one of the inputs to the concat. These seem like simple non-target specific optimizations.
For X86 we currently handle undef in extractSubvector, but not all EXTRACT_SUBVECTOR creations go through there.
Ultimately, my motivation here is to simplify extractSubvector and remove custom lowering for EXTRACT_SUBVECTOR since we don't do anything but handle undef and BUILD_VECTOR optimizations, but those should be DAG combines.
Reviewers: RKSimon, delena
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29000
llvm-svn: 292876
Diffstat (limited to 'llvm/test/CodeGen/X86/vector-zext.ll')
| -rw-r--r-- | llvm/test/CodeGen/X86/vector-zext.ll | 14 | 
1 files changed, 4 insertions, 10 deletions
| diff --git a/llvm/test/CodeGen/X86/vector-zext.ll b/llvm/test/CodeGen/X86/vector-zext.ll index 1febf559bde..e1c3d8f7d08 100644 --- a/llvm/test/CodeGen/X86/vector-zext.ll +++ b/llvm/test/CodeGen/X86/vector-zext.ll @@ -458,16 +458,10 @@ define <8 x i64> @zext_16i8_to_8i64(<16 x i8> %A) nounwind uwtable readnone ssp  ; AVX2-NEXT:    vmovdqa %ymm2, %ymm0  ; AVX2-NEXT:    retq  ; -; AVX512F-LABEL: zext_16i8_to_8i64: -; AVX512F:       # BB#0: # %entry -; AVX512F-NEXT:    vpmovzxbq {{.*#+}} zmm0 = xmm0[0],zero,zero,zero,zero,zero,zero,zero,xmm0[1],zero,zero,zero,zero,zero,zero,zero,xmm0[2],zero,zero,zero,zero,zero,zero,zero,xmm0[3],zero,zero,zero,zero,zero,zero,zero,xmm0[4],zero,zero,zero,zero,zero,zero,zero,xmm0[5],zero,zero,zero,zero,zero,zero,zero,xmm0[6],zero,zero,zero,zero,zero,zero,zero,xmm0[7],zero,zero,zero,zero,zero,zero,zero -; AVX512F-NEXT:    retq -; -; AVX512BW-LABEL: zext_16i8_to_8i64: -; AVX512BW:       # BB#0: # %entry -; AVX512BW-NEXT:    # kill: %XMM0<def> %XMM0<kill> %ZMM0<def> -; AVX512BW-NEXT:    vpmovzxbq {{.*#+}} zmm0 = xmm0[0],zero,zero,zero,zero,zero,zero,zero,xmm0[1],zero,zero,zero,zero,zero,zero,zero,xmm0[2],zero,zero,zero,zero,zero,zero,zero,xmm0[3],zero,zero,zero,zero,zero,zero,zero,xmm0[4],zero,zero,zero,zero,zero,zero,zero,xmm0[5],zero,zero,zero,zero,zero,zero,zero,xmm0[6],zero,zero,zero,zero,zero,zero,zero,xmm0[7],zero,zero,zero,zero,zero,zero,zero -; AVX512BW-NEXT:    retq +; AVX512-LABEL: zext_16i8_to_8i64: +; AVX512:       # BB#0: # %entry +; AVX512-NEXT:    vpmovzxbq {{.*#+}} zmm0 = xmm0[0],zero,zero,zero,zero,zero,zero,zero,xmm0[1],zero,zero,zero,zero,zero,zero,zero,xmm0[2],zero,zero,zero,zero,zero,zero,zero,xmm0[3],zero,zero,zero,zero,zero,zero,zero,xmm0[4],zero,zero,zero,zero,zero,zero,zero,xmm0[5],zero,zero,zero,zero,zero,zero,zero,xmm0[6],zero,zero,zero,zero,zero,zero,zero,xmm0[7],zero,zero,zero,zero,zero,zero,zero +; AVX512-NEXT:    retq  entry:    %B = shufflevector <16 x i8> %A, <16 x i8> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>    %C = zext <8 x i8> %B to <8 x i64> | 

