summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/llvm
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2016-12-14 15:08:13 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2016-12-14 15:08:13 +0000
commit05ab8ffc7ec8124fd612ba13d93c58951bff4a0c (patch)
tree756ff63bd1b696eda59597aabb02baeebbfb7b09 /clang-tools-extra/clang-tidy/llvm
parent1ce2a23a1e22b7ceded0c989fc7b79da05cfe9bb (diff)
downloadbcm5719-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
OpenPOWER on IntegriCloud