Rename isPowerOfTwo to isKnownToBeAPowerOfTwo.

In a previous thread it was pointed out that isPowerOfTwo is not a very precise
name since it can return false for powers of two if it is unable to show that
they are powers of two.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170093 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2012-12-13 03:37:24 +00:00
parent ed185daba7
commit dbaa2376f7
4 changed files with 21 additions and 21 deletions
+2 -2
View File
@@ -1457,9 +1457,9 @@ static Value *SimplifyAndInst(Value *Op0, Value *Op1, const Query &Q,
// A & (-A) = A if A is a power of two or zero.
if (match(Op0, m_Neg(m_Specific(Op1))) ||
match(Op1, m_Neg(m_Specific(Op0)))) {
if (isPowerOfTwo(Op0, /*OrZero*/true))
if (isKnownToBeAPowerOfTwo(Op0, /*OrZero*/true))
return Op0;
if (isPowerOfTwo(Op1, /*OrZero*/true))
if (isKnownToBeAPowerOfTwo(Op1, /*OrZero*/true))
return Op1;
}