Skip to content

Commit 81d9dfe

Browse files
committed
Use else if to avoid touching all the lines below
1 parent 0dc9776 commit 81d9dfe

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
@@ -20158,15 +20158,11 @@ SDValue RISCVTargetLowering::LowerCall(CallLoweringInfo &CLI,
2015820158
dyn_cast<ExternalSymbolSDNode>(Callee)) {
2015920159
Callee = getLargeExternalSymbol(S, DL, PtrVT, DAG);
2016020160
}
20161-
} else {
20162-
if (GlobalAddressSDNode *S = dyn_cast<GlobalAddressSDNode>(Callee)) {
20163-
const GlobalValue *GV = S->getGlobal();
20164-
Callee = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, RISCVII::MO_CALL);
20165-
} else if (ExternalSymbolSDNode *S =
20166-
dyn_cast<ExternalSymbolSDNode>(Callee)) {
20167-
Callee =
20168-
DAG.getTargetExternalSymbol(S->getSymbol(), PtrVT, RISCVII::MO_CALL);
20169-
}
20161+
} else if (GlobalAddressSDNode *S = dyn_cast<GlobalAddressSDNode>(Callee)) {
20162+
const GlobalValue *GV = S->getGlobal();
20163+
Callee = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, RISCVII::MO_CALL);
20164+
} else if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee)) {
20165+
Callee = DAG.getTargetExternalSymbol(S->getSymbol(), PtrVT, RISCVII::MO_CALL);
2017020166
}
2017120167

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

0 commit comments

Comments
 (0)