Skip to content

Commit 0dc9776

Browse files
committed
Use PtrVT instead of getPointerTy(DAG.getDataLayout())
1 parent d304961 commit 0dc9776

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20153,12 +20153,10 @@ SDValue RISCVTargetLowering::LowerCall(CallLoweringInfo &CLI,
2015320153
// split it and then direct call can be matched by PseudoCALL.
2015420154
if (getTargetMachine().getCodeModel() == CodeModel::Large) {
2015520155
if (GlobalAddressSDNode *S = dyn_cast<GlobalAddressSDNode>(Callee)) {
20156-
Callee =
20157-
getLargeGlobalAddress(S, DL, getPointerTy(DAG.getDataLayout()), DAG);
20156+
Callee = getLargeGlobalAddress(S, DL, PtrVT, DAG);
2015820157
} else if (ExternalSymbolSDNode *S =
2015920158
dyn_cast<ExternalSymbolSDNode>(Callee)) {
20160-
Callee =
20161-
getLargeExternalSymbol(S, DL, getPointerTy(DAG.getDataLayout()), DAG);
20159+
Callee = getLargeExternalSymbol(S, DL, PtrVT, DAG);
2016220160
}
2016320161
} else {
2016420162
if (GlobalAddressSDNode *S = dyn_cast<GlobalAddressSDNode>(Callee)) {

0 commit comments

Comments
 (0)