diff options
| author | Duncan Sands <baldrick@free.fr> | 2011-02-01 08:50:33 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2011-02-01 08:50:33 +0000 |
| commit | 4b397fcdc20aae16f4af2d2636137002fa86b023 (patch) | |
| tree | f13f8160d9b7d3843aa0ad40a7dcdde429674eda /llvm/lib/Analysis/ValueTracking.cpp | |
| parent | cf0ff030a84c8058a980334add88c296a53ca4e3 (diff) | |
| download | llvm-4b397fcdc20aae16f4af2d2636137002fa86b023.zip llvm-4b397fcdc20aae16f4af2d2636137002fa86b023.tar.gz llvm-4b397fcdc20aae16f4af2d2636137002fa86b023.tar.bz2 | |
Add a m_SignBit pattern for convenience.
llvm-svn: 124656
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
| -rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 72b3f03..44c1b53 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/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. |
