]> granicus.if.org Git - llvm/commit
[DAG] Extend visitSCALAR_TO_VECTOR optimization to truncated vector.
authorNirav Dave <niravd@google.com>
Mon, 7 Aug 2017 14:07:49 +0000 (14:07 +0000)
committerNirav Dave <niravd@google.com>
Mon, 7 Aug 2017 14:07:49 +0000 (14:07 +0000)
commit22e14e2efdc3bf38c9b75c6694945f98b3dac96b
tree26793970a3fb1416bd75e7daf84c45aff7cd7b00
parent4362efa895aa537011c28658bf33c1d9cba1cc5c
[DAG] Extend visitSCALAR_TO_VECTOR optimization to truncated vector.

Relanding after case to insert explicit truncation as necessary.

Allow SCALAR_TO_VECTOR of EXTRACT_VECTOR_ELT to reduce to
EXTRACT_SUBVECTOR of vector shuffle when output is smaller. Marginally
improves vector shuffle computations.

Reviewers: efriedma, RKSimon, spatel

Subscribers: javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D35566

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310256 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/AArch64/arm64-neon-copy.ll
test/CodeGen/AArch64/neon-scalar-copy.ll