From 64abec8d569e08c036ee805ce198f6c91e016e7b Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Wed, 29 Mar 2017 19:39:46 +0000 Subject: [PATCH] [DAGCombiner] Remove else after return. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299022 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 1bd9fd0f3de..922947a6e70 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/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); } } -- 2.40.0