summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-03-29 19:39:46 +0000
committerDavide Italiano <davide@freebsd.org>2017-03-29 19:39:46 +0000
commitcdcdc978794406b8959e05011034c8d452393792 (patch)
tree33e16b18af488b3d616586e3a227f09728e43ddb
parentaa693468c5675e639f2444b713f347da9b55c5f0 (diff)
downloadbcm5719-llvm-cdcdc978794406b8959e05011034c8d452393792.tar.gz
bcm5719-llvm-cdcdc978794406b8959e05011034c8d452393792.zip
[DAGCombiner] Remove else after return. NFCI.
llvm-svn: 299022
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 1bd9fd0f3de..922947a6e70 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -4665,10 +4665,9 @@ const Optional<ByteProvider> 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<ConstantSDNode>(Op->getOperand(1));
@@ -4698,8 +4697,7 @@ const Optional<ByteProvider> calculateByteProvider(SDValue Op, unsigned Index,
return Op.getOpcode() == ISD::ZERO_EXTEND
? Optional<ByteProvider>(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<ByteProvider> calculateByteProvider(SDValue Op, unsigned Index,
return L->getExtensionType() == ISD::ZEXTLOAD
? Optional<ByteProvider>(ByteProvider::getConstantZero())
: None;
- else
- return ByteProvider::getMemory(L, Index);
+ return ByteProvider::getMemory(L, Index);
}
}
OpenPOWER on IntegriCloud