diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-05-12 17:20:30 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-05-12 17:20:30 +0000 |
commit | d49344495d55bf46b15fc7feab2c0e3ef4a47e38 (patch) | |
tree | 498ae502cdeb461c0f830e3bc78b3ebb50df55f9 /lib/Target/XCore | |
parent | 43ed711041909a9eae0adc9a899afb9e3251f283 (diff) |
[KnownBits] Add bit counting methods to KnownBits struct and use them where possible
This patch adds min/max population count, leading/trailing zero/one bit counting methods.
The min methods return answers based on bits that are known without considering unknown bits. The max methods give answers taking into account the largest count that unknown bits could give.
Differential Revision: https://reviews.llvm.org/D32931
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore')
-rw-r--r-- | lib/Target/XCore/XCoreISelLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/XCore/XCoreISelLowering.cpp b/lib/Target/XCore/XCoreISelLowering.cpp index 7c0d27e9167..1da189c5cd3 100644 --- a/lib/Target/XCore/XCoreISelLowering.cpp +++ b/lib/Target/XCore/XCoreISelLowering.cpp @@ -409,7 +409,7 @@ static bool isWordAligned(SDValue Value, SelectionDAG &DAG) { KnownBits Known; DAG.computeKnownBits(Value, Known); - return Known.Zero.countTrailingOnes() >= 2; + return Known.countMinTrailingZeros() >= 2; } SDValue XCoreTargetLowering:: |