[DAGCombiner] Generalize (or (and X, c1), c2) -> (and (or X, c2), c1|c2) combine...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 21 Dec 2017 16:34:46 +0000 (16:34 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 21 Dec 2017 16:34:46 +0000 (16:34 +0000)
commit6b915d3353feff1a4004790ac4c233b88d1382e1
tree07a6a572ecb90bf774800a9fb6c07160e57e304d
parent4707709d1bd58206caa4dec6e02ec3efa0cabd16
[DAGCombiner] Generalize (or (and X, c1), c2) -> (and (or X, c2), c1|c2) combine to work on non-splat vectors

The knownbits_mask_or_shuffle_uitofp change is interesting - shuffle combines manage to kick in, removing the AND constant mask load. For targets with fast-variable-shuffle this should reduce further to VPOR+VPSHUFB+VCVTDQ2PS.

llvm-svn: 321279
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/combine-or.ll
llvm/test/CodeGen/X86/known-bits-vector.ll