]> granicus.if.org Git - llvm/commit
[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)
commit0c5b3f0761296c4afda969cf7f72b770f8ff59fb
tree6294d2c02aeecf6b0e830a89bcbf5d538c24b850
parent1f5dcd896faebd29371e11983bf7d56e6d012678
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286454 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/combine-shl.ll