Skip to content

Commit ee38bb4

Browse files
committed
Remove else from after return
1 parent f6e60b5 commit ee38bb4

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

llvm/lib/Target/RISCV/RISCVConstantPoolValue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void RISCVConstantPoolValue::print(raw_ostream &O) const {
7474
bool RISCVConstantPoolValue::equals(const RISCVConstantPoolValue *A) const {
7575
if (isGlobalValue() && A->isGlobalValue())
7676
return GV == A->GV;
77-
else if (isExtSymbol() && A->isExtSymbol())
77+
if (isExtSymbol() && A->isExtSymbol())
7878
return S == A->S;
7979

8080
return false;

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7431,13 +7431,12 @@ static SDValue getLargeExternalSymbol(ExternalSymbolSDNode *N, SDLoc DL, EVT Ty,
74317431

74327432
template <class NodeTy>
74337433
static SDValue getLargeAddr(NodeTy *N, SDLoc DL, EVT Ty, SelectionDAG &DAG) {
7434-
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(N)) {
7434+
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(N))
74357435
return getLargeGlobalAddress(G, DL, Ty, DAG);
7436-
} else {
7437-
// Using pc-relative mode for other node type.
7438-
SDValue Addr = getTargetNode(N, DL, Ty, DAG, 0);
7439-
return DAG.getNode(RISCVISD::LLA, DL, Ty, Addr);
7440-
}
7436+
7437+
// Using pc-relative mode for other node type.
7438+
SDValue Addr = getTargetNode(N, DL, Ty, DAG, 0);
7439+
return DAG.getNode(RISCVISD::LLA, DL, Ty, Addr);
74417440
}
74427441

74437442
template <class NodeTy>

0 commit comments

Comments
 (0)