OSDN Git Service

[DAGCombine] Avoid INSERT_SUBVECTOR reinsertions (PR28678)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 10 Aug 2016 10:50:53 +0000 (10:50 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 10 Aug 2016 10:50:53 +0000 (10:50 +0000)
commitd8d5e7955506fd322b62721814f5fb44554d7d65
tree60cbef2f770e1d10da7da4bebc0f12365ae7c329
parent822ef54156c692eeffa3eb5514d61df67a4bf4ec
[DAGCombine] Avoid INSERT_SUBVECTOR reinsertions (PR28678)

If the input vector to INSERT_SUBVECTOR is another INSERT_SUBVECTOR, and this inserted subvector replaces the last insertion, then insert into the common source vector.

i.e.
INSERT_SUBVECTOR( INSERT_SUBVECTOR( Vec, SubOld, Idx ), SubNew, Idx ) --> INSERT_SUBVECTOR( Vec, SubNew, Idx )

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278211 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/avx-intrinsics-fast-isel.ll
test/CodeGen/X86/insertelement-zero.ll