[DAGCombiner] Correctly extract the ConstOrConstSplat shift value for SHL nodes
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 10 Nov 2016 14:35:09 +0000 (14:35 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 10 Nov 2016 14:35:09 +0000 (14:35 +0000)
commit37c9034bd6d9ac397450e19314f875823e1b6819
treee20695f11b1419dc57126fd17834bb680afb5cd2
parentc16824d2173cf1e24c6b6e771186f7c9335e1480
[DAGCombiner] Correctly extract the ConstOrConstSplat shift value for SHL nodes

We were failing to extract a constant splat shift value if the shifted value was being masked.

The (shl (and (setcc) N01CV) N1CV) -> (and (setcc) N01CV<<N1CV) combine was unnecessarily preventing this.

llvm-svn: 286454
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/combine-shl.ll