[DAG] Add SimplifyDemandedVectorElts binop SimplifyMultipleUseDemandedBits handling
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 25 May 2020 11:41:08 +0000 (12:41 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 25 May 2020 11:41:22 +0000 (12:41 +0100)
commit9fa58d1bf2f83a556c109f701aacfb92e2184c23
tree116f3c67ffb9c57575a911c2763e39ff7e3f1a4f
parent0e83e67cd359aef475e5c3b86c1a5c932cfb1aba
[DAG] Add SimplifyDemandedVectorElts binop SimplifyMultipleUseDemandedBits handling

For the supported binops (basic arithmetic, logicals + shifts), if we fail to simplify the demanded vector elts, then call SimplifyMultipleUseDemandedBits and try to peek through ops to remove unnecessary dependencies.

This helps with PR40502.

Differential Revision: https://reviews.llvm.org/D79003
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/AArch64/mul_by_elt.ll
llvm/test/CodeGen/X86/combine-pmuldq.ll
llvm/test/CodeGen/X86/combine-sdiv.ll
llvm/test/CodeGen/X86/oddsubvector.ll
llvm/test/CodeGen/X86/vector-fshl-rot-128.ll
llvm/test/CodeGen/X86/vector-fshl-rot-256.ll
llvm/test/CodeGen/X86/vector-fshr-rot-128.ll
llvm/test/CodeGen/X86/vector-fshr-rot-256.ll
llvm/test/CodeGen/X86/vector-narrow-binop.ll