The TargetData is not used for the isPowerOfTwo determination. It has never

been used in the first place.  It simply was passed to the function and to the
recursive invocations.  Simply drop the parameter and update the callers for the
new signature.

Patch by Saleem Abdulrasool!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169988 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2012-12-12 16:52:40 +00:00
parent 1afbb51796
commit b09c146b11
4 changed files with 15 additions and 18 deletions

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, Q.TD, /*OrZero*/true))
if (isPowerOfTwo(Op0, /*OrZero*/true))
return Op0;
if (isPowerOfTwo(Op1, Q.TD, /*OrZero*/true))
if (isPowerOfTwo(Op1, /*OrZero*/true))
return Op1;
}