1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +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 { bool SystemZTargetLowering::mayBeEmittedAsTailCall(CallInst *CI) const {
if (!CI->isTailCall()) return CI->isTailCall();
return false;
return true;
} }
// We do not yet support 128-bit single-element vector types. If the user // 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 { const MachineRegisterInfo *MRI) const {
assert(!SrcReg2 && "Only optimizing constant comparisons so far"); assert(!SrcReg2 && "Only optimizing constant comparisons so far");
bool IsLogical = (Compare->getDesc().TSFlags & SystemZII::IsLogical) != 0; bool IsLogical = (Compare->getDesc().TSFlags & SystemZII::IsLogical) != 0;
if (Value == 0 && return Value == 0 && !IsLogical &&
!IsLogical && removeIPMBasedCompare(Compare, SrcReg, MRI, &RI);
removeIPMBasedCompare(Compare, SrcReg, MRI, &RI))
return true;
return false;
} }
// If Opcode is a move that has a conditional variant, return that variant, // 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 { bool SystemZInstrInfo::isPredicable(MachineInstr *MI) const {
unsigned Opcode = MI->getOpcode(); unsigned Opcode = MI->getOpcode();
if (STI.hasLoadStoreOnCond() && return STI.hasLoadStoreOnCond() && getConditionalMove(Opcode);
getConditionalMove(Opcode))
return true;
return false;
} }
bool SystemZInstrInfo:: bool SystemZInstrInfo::