1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[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:
Ulrich Weigand 2015-11-13 13:00:27 +00:00
parent fbe7678f74
commit 2b0ba63e17
2 changed files with 4 additions and 12 deletions

View File

@ -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

View File

@ -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::