From: Davide Italiano Date: Wed, 29 Mar 2017 19:39:46 +0000 (+0000) Subject: [DAGCombiner] Remove else after return. NFCI. X-Git-Tag: llvmorg-5.0.0-rc1~8937 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cdcdc978794406b8959e05011034c8d452393792;p=platform%2Fupstream%2Fllvm.git [DAGCombiner] Remove else after return. NFCI. llvm-svn: 299022 --- diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 1bd9fd0..922947a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -4665,10 +4665,9 @@ const Optional calculateByteProvider(SDValue Op, unsigned Index, if (LHS->isConstantZero()) return RHS; - else if (RHS->isConstantZero()) + if (RHS->isConstantZero()) return LHS; - else - return None; + return None; } case ISD::SHL: { auto ShiftOp = dyn_cast(Op->getOperand(1)); @@ -4698,8 +4697,7 @@ const Optional calculateByteProvider(SDValue Op, unsigned Index, return Op.getOpcode() == ISD::ZERO_EXTEND ? Optional(ByteProvider::getConstantZero()) : None; - else - return calculateByteProvider(NarrowOp, Index, Depth + 1); + return calculateByteProvider(NarrowOp, Index, Depth + 1); } case ISD::BSWAP: return calculateByteProvider(Op->getOperand(0), ByteWidth - Index - 1, @@ -4718,8 +4716,7 @@ const Optional calculateByteProvider(SDValue Op, unsigned Index, return L->getExtensionType() == ISD::ZEXTLOAD ? Optional(ByteProvider::getConstantZero()) : None; - else - return ByteProvider::getMemory(L, Index); + return ByteProvider::getMemory(L, Index); } }