[llvm] [ISel] Use CallBase instead of CallInst (PR #164769)
Luo Yuanke via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 23 01:00:35 PDT 2025
https://github.com/LuoYuanke created https://github.com/llvm/llvm-project/pull/164769
This is to follow the discussion in https://github.com/llvm/llvm-project/pull/164565
CallBase can cover more call-like instructions which carry caling convention
flag.
>From d30286622879e8cedb34332e15d32296b4c42f17 Mon Sep 17 00:00:00 2001
From: Yuanke Luo <ykluo at birentech.com>
Date: Thu, 23 Oct 2025 15:54:23 +0800
Subject: [PATCH] [ISel] Use CallBase instead of CallInst
This is to follow the discussion in https://github.com/llvm/llvm-project/pull/164565
CallBase can cover more call-like instructions which carry caling convention
flag.
---
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index dcf2df305d24a..e2ec82cc7a22f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1978,9 +1978,9 @@ SDValue SelectionDAGBuilder::getValueImpl(const Value *V) {
Register InReg = FuncInfo.InitializeRegForValue(Inst);
std::optional<CallingConv::ID> CallConv;
- auto *CI = dyn_cast<CallInst>(Inst);
- if (CI && !CI->isInlineAsm())
- CallConv = CI->getCallingConv();
+ auto *CB = dyn_cast<CallBase>(Inst);
+ if (CB && !CB->isInlineAsm())
+ CallConv = CB->getCallingConv();
RegsForValue RFV(*DAG.getContext(), TLI, DAG.getDataLayout(), InReg,
Inst->getType(), CallConv);
More information about the llvm-commits
mailing list