aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Yuanke <lyk_03@hotmail.com>2025-10-25 20:37:20 +0800
committerGitHub <noreply@github.com>2025-10-25 20:37:20 +0800
commit9a0a1fadef0880e19c1c278486b4e79aa04e580f (patch)
tree6f161e35a69757a93f578a23313d3b631d359c26
parentbbe92096bbcdfe9bdb47bf7ca42b17992ad94e74 (diff)
downloadllvm-9a0a1fadef0880e19c1c278486b4e79aa04e580f.zip
llvm-9a0a1fadef0880e19c1c278486b4e79aa04e580f.tar.gz
llvm-9a0a1fadef0880e19c1c278486b4e79aa04e580f.tar.bz2
[ISel] Use CallBase instead of CallInst (#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. Co-authored-by: Yuanke Luo <ykluo@birentech.com>
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index dee0909..a522650 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -2015,9 +2015,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);