[DAGCombiner] fold insert_subvector of insert_subvector
authorSanjay Patel <spatel@rotateright.com>
Sat, 12 Jan 2019 15:12:28 +0000 (15:12 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sat, 12 Jan 2019 15:12:28 +0000 (15:12 +0000)
commit625d5aef628968e90803c3b8edd4d537c007aaf8
treeeddd859a79b2a91764f239c50335a74c6728f0a3
parent2fb9646762712982cd1d0559ec992f39e0a5914d
[DAGCombiner] fold insert_subvector of insert_subvector

This pattern:

    t33: v8i32 = insert_subvector undef:v8i32, t35, Constant:i64<0>
  t21: v16i32 = insert_subvector undef:v16i32, t33, Constant:i64<0>

...shows up in PR33758:
https://bugs.llvm.org/show_bug.cgi?id=33758
...although this patch doesn't make any difference to the final result on that yet.

In the affected tests here, it looks like it just makes RA wiggle. But we might
as well squash this to prevent it interfering with other pattern-matching.

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

llvm-svn: 351008
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/vector-reduce-mul-widen.ll
llvm/test/CodeGen/X86/vector-reduce-mul.ll