[DAG] Extend visitSCALAR_TO_VECTOR optimization to truncated vector.
authorNirav Dave <niravd@google.com>
Tue, 1 Aug 2017 13:45:35 +0000 (13:45 +0000)
committerNirav Dave <niravd@google.com>
Tue, 1 Aug 2017 13:45:35 +0000 (13:45 +0000)
commitb5cb48c6ae16d6ffc54c7d7281160bcc4acdc4cb
treecdc1dd0b714825d56b5d329663d4f06dac24f68a
parenta2b4748bdc11ad679426be6b7fe67a3eff66063a
[DAG] Extend visitSCALAR_TO_VECTOR optimization to truncated vector.

Summary:
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

llvm-svn: 309680
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/arm64-neon-copy.ll
llvm/test/CodeGen/AArch64/neon-scalar-copy.ll