diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-12-12 16:52:40 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-12-12 16:52:40 +0000 |
commit | b09c146b116359616f6cbd4c8b3328607e00ff42 (patch) | |
tree | c81ad3f2747332bbf1dae618dec28a25004746d5 /lib/Analysis/InstructionSimplify.cpp | |
parent | 1afbb517965e29b07cb42e2335d5eadd87de6535 (diff) | |
download | external_llvm-b09c146b116359616f6cbd4c8b3328607e00ff42.zip external_llvm-b09c146b116359616f6cbd4c8b3328607e00ff42.tar.gz external_llvm-b09c146b116359616f6cbd4c8b3328607e00ff42.tar.bz2 |
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
Diffstat (limited to 'lib/Analysis/InstructionSimplify.cpp')
-rw-r--r-- | lib/Analysis/InstructionSimplify.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp index 35b1e66..2bcd363 100644 --- a/lib/Analysis/InstructionSimplify.cpp +++ b/lib/Analysis/InstructionSimplify.cpp @@ -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; } |