[llvm] [NFC][AMDGPU] Use m_Intrinsic and m_AnyIntrinsic PatternMatch combinators across the backend (PR #194337)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 07:05:51 PDT 2026


================
@@ -1641,10 +1641,9 @@ static bool runImpl(SetVector<Function *> &Functions, bool IsModulePass,
       if (Ptr) {
         A.getOrCreateAAFor<AAAddressSpace>(IRPosition::value(*Ptr));
         A.getOrCreateAAFor<AANoAliasAddrSpace>(IRPosition::value(*Ptr));
-        if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(Ptr)) {
-          if (II->getIntrinsicID() == Intrinsic::amdgcn_make_buffer_rsrc)
----------------
arsenm wrote:

This kind of usage doesn't really fit the usual pattern pattern. This is something that would more naturally be a switch over intrinsic ID, it just happens this only covers 1 intrinsic now 

https://github.com/llvm/llvm-project/pull/194337


More information about the llvm-commits mailing list