Skip to content

Commit 9a0a1fa

Browse files
LuoYuankeYuanke Luo
andauthored
[ISel] Use CallBase instead of CallInst (llvm#164769)
This is to follow the discussion in llvm#164565 CallBase can cover more call-like instructions which carry caling convention flag. Co-authored-by: Yuanke Luo <[email protected]>
1 parent bbe9209 commit 9a0a1fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,9 +2015,9 @@ SDValue SelectionDAGBuilder::getValueImpl(const Value *V) {
20152015
Register InReg = FuncInfo.InitializeRegForValue(Inst);
20162016

20172017
std::optional<CallingConv::ID> CallConv;
2018-
auto *CI = dyn_cast<CallInst>(Inst);
2019-
if (CI && !CI->isInlineAsm())
2020-
CallConv = CI->getCallingConv();
2018+
auto *CB = dyn_cast<CallBase>(Inst);
2019+
if (CB && !CB->isInlineAsm())
2020+
CallConv = CB->getCallingConv();
20212021

20222022
RegsForValue RFV(*DAG.getContext(), TLI, DAG.getDataLayout(), InReg,
20232023
Inst->getType(), CallConv);

0 commit comments

Comments
 (0)