OSDN Git Service

[APInt] Use trailing bit counting methods instead of population count method in isAll...
authorCraig Topper <craig.topper@intel.com>
Fri, 23 Jun 2017 20:28:49 +0000 (20:28 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 23 Jun 2017 20:28:49 +0000 (20:28 +0000)
commit1a9610bd3caa4ac2af973d120bb2ffaa5e3c0e1d
treeadb30b501905d4f0234b186ae3d7c808c461bc0f
parent7584e452e62e9ec9aaaa551224560cbf6ddba9ea
[APInt] Use trailing bit counting methods instead of population count method in isAllOnesValue, isMaxSigendValue, and isMinSignedValue. NFCI

The trailing bit methods will early out if they find a bit of the opposite while popcount must always look at all bits. I also assume that more CPUs implement trailing bit counting with native instructions than population count.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306154 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/APInt.h