[llvm] [AMDGPU] Add function attribute to disable TBUFFER combine (PR #156454)

Piotr Sobczak via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 10 04:42:42 PDT 2025


================
@@ -195,6 +195,9 @@ SIMachineFunctionInfo::SIMachineFunctionInfo(const Function &F,
     VGPRForAGPRCopy =
         AMDGPU::VGPR_32RegClass.getRegister(ST.getMaxNumVGPRs(F) - 1);
   }
+
+  if (F.hasFnAttribute("amdgpu-disable-tbuffer-combine"))
+    setDisableTBufferCombine(true);
----------------
piotrAMD wrote:

I see where you're coming from on this, and I had similar thoughts in https://github.com/llvm/llvm-project/pull/115479. But being always correct by default has some clear advantages. The price to pay for this is to always set a certain flag to enable relaxed mode.

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


More information about the llvm-commits mailing list