Skip to content

Conversation

@LuoYuanke
Copy link
Contributor

This is to follow the discussion in #164565
CallBase can cover more call-like instructions which carry caling convention
flag.

This is to follow the discussion in llvm#164565
CallBase can cover more call-like instructions which carry caling convention
flag.
@llvmbot llvmbot added the llvm:SelectionDAG SelectionDAGISel as well label Oct 23, 2025
@LuoYuanke LuoYuanke requested a review from arsenm October 23, 2025 08:01
@llvmbot
Copy link
Member

llvmbot commented Oct 23, 2025

@llvm/pr-subscribers-llvm-selectiondag

Author: Luo Yuanke (LuoYuanke)

Changes

This is to follow the discussion in #164565
CallBase can cover more call-like instructions which carry caling convention
flag.


Full diff: https://github.com/llvm/llvm-project/pull/164769.diff

1 Files Affected:

  • (modified) llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (+3-3)
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);

@LuoYuanke LuoYuanke merged commit 9a0a1fa into llvm:main Oct 25, 2025
12 checks passed
@LuoYuanke LuoYuanke deleted the fast-isel-bug2 branch October 25, 2025 12:37
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 25, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-aarch64-darwin running on doug-worker-4 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/29757

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang-Unit :: Format/./FormatTests/failed_to_discover_tests_from_gtest' FAILED ********************

********************


dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
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 <ykluo@birentech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:SelectionDAG SelectionDAGISel as well

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants