[llvm] 9a0a1fa - [ISel] Use CallBase instead of CallInst (#164769)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 25 05:37:24 PDT 2025
Author: Luo Yuanke
Date: 2025-10-25T20:37:20+08:00
New Revision: 9a0a1fadef0880e19c1c278486b4e79aa04e580f
URL: https://github.com/llvm/llvm-project/commit/9a0a1fadef0880e19c1c278486b4e79aa04e580f
DIFF: https://github.com/llvm/llvm-project/commit/9a0a1fadef0880e19c1c278486b4e79aa04e580f.diff
LOG: [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 at birentech.com>
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index dee090950ea8d..a52265055c88a 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);
More information about the llvm-commits
mailing list