Skip to content

Commit 9eb398d

Browse files
committed
Use else if to avoid touching all the lines below
1 parent 624766b commit 9eb398d

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20207,15 +20207,11 @@ SDValue RISCVTargetLowering::LowerCall(CallLoweringInfo &CLI,
2020720207
dyn_cast<ExternalSymbolSDNode>(Callee)) {
2020820208
Callee = getLargeExternalSymbol(S, DL, PtrVT, DAG);
2020920209
}
20210-
} else {
20211-
if (GlobalAddressSDNode *S = dyn_cast<GlobalAddressSDNode>(Callee)) {
20212-
const GlobalValue *GV = S->getGlobal();
20213-
Callee = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, RISCVII::MO_CALL);
20214-
} else if (ExternalSymbolSDNode *S =
20215-
dyn_cast<ExternalSymbolSDNode>(Callee)) {
20216-
Callee =
20217-
DAG.getTargetExternalSymbol(S->getSymbol(), PtrVT, RISCVII::MO_CALL);
20218-
}
20210+
} else if (GlobalAddressSDNode *S = dyn_cast<GlobalAddressSDNode>(Callee)) {
20211+
const GlobalValue *GV = S->getGlobal();
20212+
Callee = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, RISCVII::MO_CALL);
20213+
} else if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee)) {
20214+
Callee = DAG.getTargetExternalSymbol(S->getSymbol(), PtrVT, RISCVII::MO_CALL);
2021920215
}
2022020216

2022120217
// The first call operand is the chain and the second is the target address.

0 commit comments

Comments
 (0)