[llvm-branch-commits] [llvm] [CodeGen] Remove legacy getTgtMemIntrinsic overload (PR #175846)

Nicolai Hähnle via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jan 13 13:46:51 PST 2026


https://github.com/nhaehnle created https://github.com/llvm/llvm-project/pull/175846

It is now fully unused.

---

**Stack**:
- [4/4] #175846 ⬅
- [3/4] #175845
- [2/4] #175844
- [1/4] #175843


⚠️ *Part of a stack created by [spr](https://github.com/nhaehnle/spr). Merging this PR using the GitHub UI may have unexpected results.*

>From 8af43d9388a39602e8303be19cd5a013ae1e3c26 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= <nicolai.haehnle at amd.com>
Date: Mon, 12 Jan 2026 09:42:05 -0800
Subject: [PATCH] [CodeGen] Remove legacy getTgtMemIntrinsic overload

It is now fully unused.

commit-id:028dd72d
---
 llvm/include/llvm/CodeGen/TargetLowering.h | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/llvm/include/llvm/CodeGen/TargetLowering.h b/llvm/include/llvm/CodeGen/TargetLowering.h
index 5a2a32e72719f..8349ca50f6837 100644
--- a/llvm/include/llvm/CodeGen/TargetLowering.h
+++ b/llvm/include/llvm/CodeGen/TargetLowering.h
@@ -1265,26 +1265,8 @@ class LLVM_ABI TargetLoweringBase {
   /// access multiple memory locations.
   virtual void getTgtMemIntrinsic(SmallVectorImpl<IntrinsicInfo> &Infos,
                                   const CallBase &I, MachineFunction &MF,
-                                  unsigned Intrinsic) const {
-    // The default implementation forwards to the legacy single-info overload
-    // for compatibility.
-    IntrinsicInfo Info;
-    if (getTgtMemIntrinsic(Info, I, MF, Intrinsic))
-      Infos.push_back(Info);
-  }
+                                  unsigned Intrinsic) const {}
 
-protected:
-  /// This is a legacy single-info overload. New code should override the
-  /// SmallVectorImpl overload instead to support multiple memory operands.
-  ///
-  /// TODO: Remove this once the refactoring is complete.
-  virtual bool getTgtMemIntrinsic(IntrinsicInfo &, const CallBase &,
-                                  MachineFunction &,
-                                  unsigned /*Intrinsic*/) const {
-    return false;
-  }
-
-public:
   /// Returns true if the target can instruction select the specified FP
   /// immediate natively. If false, the legalizer will materialize the FP
   /// immediate as a load from a constant pool.



More information about the llvm-branch-commits mailing list