forked from OSchip/llvm-project
[SystemZ] Simplify boolean conditional return statements
Use clang-tidy to simplify conditonal return statements. Author: LegalizeAdulthood Differential Revision: http://reviews.llvm.org/D9986 llvm-svn: 253038
This commit is contained in:
parent
7e3c7ee0b1
commit
19d24d2699
|
@ -775,9 +775,7 @@ bool SystemZTargetLowering::allowTruncateForTailCall(Type *FromType,
|
|||
}
|
||||
|
||||
bool SystemZTargetLowering::mayBeEmittedAsTailCall(CallInst *CI) const {
|
||||
if (!CI->isTailCall())
|
||||
return false;
|
||||
return true;
|
||||
return CI->isTailCall();
|
||||
}
|
||||
|
||||
// We do not yet support 128-bit single-element vector types. If the user
|
||||
|
|
|
@ -492,11 +492,8 @@ SystemZInstrInfo::optimizeCompareInstr(MachineInstr *Compare,
|
|||
const MachineRegisterInfo *MRI) const {
|
||||
assert(!SrcReg2 && "Only optimizing constant comparisons so far");
|
||||
bool IsLogical = (Compare->getDesc().TSFlags & SystemZII::IsLogical) != 0;
|
||||
if (Value == 0 &&
|
||||
!IsLogical &&
|
||||
removeIPMBasedCompare(Compare, SrcReg, MRI, &RI))
|
||||
return true;
|
||||
return false;
|
||||
return Value == 0 && !IsLogical &&
|
||||
removeIPMBasedCompare(Compare, SrcReg, MRI, &RI);
|
||||
}
|
||||
|
||||
// If Opcode is a move that has a conditional variant, return that variant,
|
||||
|
@ -511,10 +508,7 @@ static unsigned getConditionalMove(unsigned Opcode) {
|
|||
|
||||
bool SystemZInstrInfo::isPredicable(MachineInstr *MI) const {
|
||||
unsigned Opcode = MI->getOpcode();
|
||||
if (STI.hasLoadStoreOnCond() &&
|
||||
getConditionalMove(Opcode))
|
||||
return true;
|
||||
return false;
|
||||
return STI.hasLoadStoreOnCond() && getConditionalMove(Opcode);
|
||||
}
|
||||
|
||||
bool SystemZInstrInfo::
|
||||
|
|
Loading…
Reference in New Issue