summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-03 16:34:59 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-03 16:34:59 +0000
commitd33ee1b960fb29201da97d3af9a662f4ec1a3bff (patch)
treecb797c08f831dcee02a76726af80c44e4dc91e00 /llvm/lib/Analysis
parent9daf9c047d190d2bce09d966697d18eea1624a09 (diff)
downloadbcm5719-llvm-d33ee1b960fb29201da97d3af9a662f4ec1a3bff.tar.gz
bcm5719-llvm-d33ee1b960fb29201da97d3af9a662f4ec1a3bff.zip
[APInt] Move isMask and isShiftedMask out of APIntOps and into the APInt class. Implement them without memory allocation for multiword
This moves the isMask and isShiftedMask functions to be class methods. They now use the MathExtras.h function for single word size and leading/trailing zeros/ones or countPopulation for the multiword size. The previous implementation made multiple temorary memory allocations to do the bitwise arithmetic operations to match the MathExtras.h implementation. Differential Revision: https://reviews.llvm.org/D31565 llvm-svn: 299362
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 986209acfd0..ca32cf3c7c3 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -5321,7 +5321,7 @@ const SCEV *ScalarEvolution::createSCEV(Value *V) {
// If C is a low-bits mask, the zero extend is serving to
// mask off the high bits. Complement the operand and
// re-apply the zext.
- if (APIntOps::isMask(Z0TySize, CI->getValue()))
+ if (CI->getValue().isMask(Z0TySize))
return getZeroExtendExpr(getNotSCEV(Z0), UTy);
// If C is a single bit, it may be in the sign-bit position
OpenPOWER on IntegriCloud