[SelectionDAG] Simplify extract_subvector( insert_subvector ( Vec, In, Idx ), Idx...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 6 Sep 2016 16:42:05 +0000 (16:42 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 6 Sep 2016 16:42:05 +0000 (16:42 +0000)
commit1b4462b7c18006c856ecd0314d6be415a7c0d58f
tree9354048659d8a04f59472a775d8ca4fd106c999a
parent6e2e0e8b8f0162271982667e4fece98b41e3e8ba
[SelectionDAG] Simplify extract_subvector( insert_subvector ( Vec, In, Idx ), Idx ) -> In

If we are extracting a subvector that has just been inserted then we should just use the original inserted subvector.

This has come up in certain several x86 shuffle lowering cases where we are crossing 128-bit lanes.

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

llvm-svn: 280715
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/X86/vector-shuffle-256-v16.ll