[DAGCombine] visitEXTRACT_SUBVECTOR - 'little to big' extract_subvector(bitcast(...
authorSanjay Patel <spatel@rotateright.com>
Mon, 23 Dec 2019 14:46:49 +0000 (09:46 -0500)
committerSanjay Patel <spatel@rotateright.com>
Mon, 23 Dec 2019 15:11:45 +0000 (10:11 -0500)
commit8cefc37be5aba4948936c7beb97cde7a68449f1f
tree4300a3310408f9a85c58607cf986653664079d6f
parent0860db966a7d2ab61b26e41426a55189986924b4
[DAGCombine] visitEXTRACT_SUBVECTOR - 'little to big' extract_subvector(bitcast()) support

This moves the X86 specific transform from rL364407
into DAGCombiner to generically handle 'little to big' cases
(for example: extract_subvector(v2i64 bitcast(v16i8))). This
allows us to remove both the x86 implementation and the aarch64
bitcast(extract_subvector(bitcast())) combine.

Earlier patches that dealt with regressions initially exposed
by this patch:
rG5e5e99c041e4
rG0b38af89e2c0

Patch by: @RKSimon (Simon Pilgrim)

Differential Revision: https://reviews.llvm.org/D63815
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/AArch64/merge-store.ll
llvm/test/CodeGen/ARM/combine-vmovdrr.ll
llvm/test/CodeGen/X86/avg-mask.ll
llvm/test/CodeGen/X86/madd.ll
llvm/test/CodeGen/X86/masked_store_trunc_ssat.ll
llvm/test/CodeGen/X86/shuffle-vs-trunc-512.ll