aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/ValueTracking.cpp')
-rw-r--r--lib/Analysis/ValueTracking.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp
index 72b3f03a93..44c1b5326b 100644
--- a/lib/Analysis/ValueTracking.cpp
+++ b/lib/Analysis/ValueTracking.cpp
@@ -666,9 +666,7 @@ bool llvm::isPowerOfTwo(Value *V, const TargetData *TD, unsigned Depth) {
// (signbit) >>l X is clearly a power of two if the one is not shifted off the
// bottom. If it is shifted off the bottom then the result is undefined.
- ConstantInt *CI;
- if (match(V, m_LShr(m_ConstantInt(CI), m_Value())) &&
- CI->getValue().isSignBit())
+ if (match(V, m_LShr(m_SignBit(), m_Value())))
return true;
// The remaining tests are all recursive, so bail out if we hit the limit.