[DAG] Simplify OR(X,SHL(Y,BW/2)) eq/ne 0/-1 'all/any-of' style patterns
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 7 Jan 2021 12:02:50 +0000 (12:02 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 7 Jan 2021 12:03:19 +0000 (12:03 +0000)
commit350ab7aa1c6735c0a136c118f7b43773fd74bf2d
tree80230177ee853181ba812ed9361e4fecaf142402
parent33f90f38e11c7c23d6e2a23ca526f8b0d8f53771
[DAG] Simplify OR(X,SHL(Y,BW/2)) eq/ne 0/-1 'all/any-of' style patterns

Attempt to simplify all/any-of style patterns that concatenate 2 smaller integers together into an and(x,y)/or(x,y) + icmp 0/-1 instead.

This is mainly to help some bool predicate reduction patterns where we end up concatenating bool vectors that have been bitcasted to integers.

Differential Revision: https://reviews.llvm.org/D93599
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/X86/avx512-mask-op.ll
llvm/test/CodeGen/X86/cmp-concat.ll
llvm/test/CodeGen/X86/movmsk-cmp.ll