forked from OSchip/llvm-project
Refactor: Simplify boolean conditional return statements in lib/Transforms/Vectorize (NFC).
Summary: Use clang-tidy to simplify boolean conditional return statements Differential Revision: http://reviews.llvm.org/D10003 Patch by Richard<legalize@xmission.com> llvm-svn: 251206
This commit is contained in:
parent
64f772eac9
commit
1eeb2da7d4
|
@ -5215,9 +5215,8 @@ static bool isLikelyComplexAddressComputation(Value *Ptr,
|
|||
}
|
||||
|
||||
static bool isStrideMul(Instruction *I, LoopVectorizationLegality *Legal) {
|
||||
if (Legal->hasStride(I->getOperand(0)) || Legal->hasStride(I->getOperand(1)))
|
||||
return true;
|
||||
return false;
|
||||
return Legal->hasStride(I->getOperand(0)) ||
|
||||
Legal->hasStride(I->getOperand(1));
|
||||
}
|
||||
|
||||
unsigned
|
||||
|
|
|
@ -168,10 +168,8 @@ static unsigned getAltOpcode(unsigned Op) {
|
|||
/// of an alternate sequence which can later be merged as
|
||||
/// a ShuffleVector instruction.
|
||||
static bool canCombineAsAltInst(unsigned Op) {
|
||||
if (Op == Instruction::FAdd || Op == Instruction::FSub ||
|
||||
Op == Instruction::Sub || Op == Instruction::Add)
|
||||
return true;
|
||||
return false;
|
||||
return Op == Instruction::FAdd || Op == Instruction::FSub ||
|
||||
Op == Instruction::Sub || Op == Instruction::Add;
|
||||
}
|
||||
|
||||
/// \returns ShuffleVector instruction if instructions in \p VL have
|
||||
|
@ -1990,10 +1988,7 @@ static bool shouldReorderOperands(int i, Instruction &I,
|
|||
return false;
|
||||
}
|
||||
// One opcode, put the instruction on the right.
|
||||
if (ILeft) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return ILeft != nullptr;
|
||||
}
|
||||
|
||||
void BoUpSLP::reorderInputsAccordingToOpcode(ArrayRef<Value *> VL,
|
||||
|
|
Loading…
Reference in New Issue