[llvm] r334299 - [NFC][InstSimplify] SimplifyAddInst(): coding style: variable names.
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 8 08:44:53 PDT 2018
Author: lebedevri
Date: Fri Jun 8 08:44:53 2018
New Revision: 334299
URL: http://llvm.org/viewvc/llvm-project?rev=334299&view=rev
Log:
[NFC][InstSimplify] SimplifyAddInst(): coding style: variable names.
Modified:
llvm/trunk/lib/Analysis/InstructionSimplify.cpp
Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=334299&r1=334298&r2=334299&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Fri Jun 8 08:44:53 2018
@@ -527,7 +527,7 @@ static Constant *foldOrCommuteConstant(I
/// Given operands for an Add, see if we can fold the result.
/// If not, this returns null.
-static Value *SimplifyAddInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
+static Value *SimplifyAddInst(Value *Op0, Value *Op1, bool IsNSW, bool IsNUW,
const SimplifyQuery &Q, unsigned MaxRecurse) {
if (Constant *C = foldOrCommuteConstant(Instruction::Add, Op0, Op1, Q))
return C;
@@ -557,12 +557,12 @@ static Value *SimplifyAddInst(Value *Op0
// add nsw/nuw (xor Y, signmask), signmask --> Y
// The no-wrapping add guarantees that the top bit will be set by the add.
// Therefore, the xor must be clearing the already set sign bit of Y.
- if ((isNSW || isNUW) && match(Op1, m_SignMask()) &&
+ if ((IsNSW || IsNUW) && match(Op1, m_SignMask()) &&
match(Op0, m_Xor(m_Value(Y), m_SignMask())))
return Y;
// add nuw %x, -1 -> -1, because %x can only be 0.
- if (isNUW && match(Op1, m_AllOnes()))
+ if (IsNUW && match(Op1, m_AllOnes()))
return Op1; // Which is -1.
/// i1 add -> xor.
@@ -587,9 +587,9 @@ static Value *SimplifyAddInst(Value *Op0
return nullptr;
}
-Value *llvm::SimplifyAddInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
+Value *llvm::SimplifyAddInst(Value *Op0, Value *Op1, bool IsNSW, bool IsNUW,
const SimplifyQuery &Query) {
- return ::SimplifyAddInst(Op0, Op1, isNSW, isNUW, Query, RecursionLimit);
+ return ::SimplifyAddInst(Op0, Op1, IsNSW, IsNUW, Query, RecursionLimit);
}
/// Compute the base pointer and cumulative constant offsets for V.
More information about the llvm-commits
mailing list