Summary: Use clang-tidy to simplify boolean conditional return statements
Differential Revision: http://reviews.llvm.org/D10003
Patch by Richard<legalize@xmission.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251206
91177308-0d34-0410-b5e6-
96231b3b80d8
}
static bool isStrideMul(Instruction *I, LoopVectorizationLegality *Legal) {
}
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));
/// of an alternate sequence which can later be merged as
/// a ShuffleVector instruction.
static bool canCombineAsAltInst(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
}
/// \returns ShuffleVector instruction if instructions in \p VL have
return false;
}
// One opcode, put the instruction on the right.
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,
}
void BoUpSLP::reorderInputsAccordingToOpcode(ArrayRef<Value *> VL,