OSDN Git Service

[DAGCombiner] Support (shl (ext (shl x, c1)), c2) -> (shl (ext x), (add c1, c2))...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 19 Jun 2019 12:41:37 +0000 (12:41 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 19 Jun 2019 12:41:37 +0000 (12:41 +0000)
commit1e8341d5444c6ac86f55979d927cd13bf17fe42a
treed0256250851add52ccaac46783af0e3fa965bc7e
parentc69190afafc22ac1c8ced5b42987f308d2e6c9f1
[DAGCombiner] Support (shl (ext (shl x, c1)), c2) -> (shl (ext x), (add c1, c2)) non-uniform folds.

Use matchBinaryPredicate instead of isConstOrConstSplat to let us handle non-uniform shift cases.

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