[llvm] [AMDGPU] Preserve call info when lowering SI_CALL_ISEL (PR #192192)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 23:40:50 PDT 2026
https://github.com/StevenYangCC created https://github.com/llvm/llvm-project/pull/192192
Keep additional call metadata attached when the custom inserter rewrites SI_CALL_ISEL into SI_CALL so later analyses still see the original direct-call information.
>From 9a3e908bae7bdba5460f403a73c347c168580dea Mon Sep 17 00:00:00 2001
From: "chengcang.yang" <yangchengcang at gmail.com>
Date: Fri, 10 Apr 2026 17:21:18 +0800
Subject: [PATCH] [AMDGPU] Preserve call info when lowering SI_CALL_ISEL
Keep additional call metadata attached when the custom inserter rewrites SI_CALL_ISEL into SI_CALL so later analyses still see the original direct-call information.
Made-with: Cursor
---
llvm/lib/Target/AMDGPU/SIISelLowering.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index 6750dfcbaac62..b37950e32ffb3 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -6847,6 +6847,8 @@ SITargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
MIB.add(MO);
MIB.cloneMemRefs(MI);
+ if (MI.shouldUpdateAdditionalCallInfo())
+ MF->moveAdditionalCallInfo(&MI, MIB.getInstr());
MI.eraseFromParent();
return BB;
}
More information about the llvm-commits
mailing list