diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-12-14 15:08:13 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-12-14 15:08:13 +0000 |
commit | 05ab8ffc7ec8124fd612ba13d93c58951bff4a0c (patch) | |
tree | 756ff63bd1b696eda59597aabb02baeebbfb7b09 /clang-tools-extra/clang-tidy/llvm | |
parent | 1ce2a23a1e22b7ceded0c989fc7b79da05cfe9bb (diff) | |
download | bcm5719-llvm-05ab8ffc7ec8124fd612ba13d93c58951bff4a0c.tar.gz bcm5719-llvm-05ab8ffc7ec8124fd612ba13d93c58951bff4a0c.zip |
[DAGCombiner] Try to use SelectionDAG::isKnownToBeAPowerOfTwo instead of just APInt::isPowerOf2
Generalize sdiv/udiv/srem/urem combines using APInt::isPowerOf2, which only works for const/splat-const values, to call SelectionDAG::isKnownToBeAPowerOfTwo instead which recognises many more cases.
Added a DAGCombiner::BuildLogBase2 helper since PowerOf2 combines often involve taking the log2 of such a value.
Differential Revision: https://reviews.llvm.org/D27714
llvm-svn: 289654
Diffstat (limited to 'clang-tools-extra/clang-tidy/llvm')
0 files changed, 0 insertions, 0 deletions