[llvm] [AMDGPU] Rework architected SGPRs implementation (PR #79001)

Christudasan Devadasan via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 08:51:58 PST 2024


================
@@ -107,8 +107,8 @@ SIMachineFunctionInfo::SIMachineFunctionInfo(const Function &F,
       MayNeedAGPRs = false; // We will select all MAI with VGPR operands.
   }
 
-  if (!AMDGPU::isGraphics(CC) ||
-      (CC == CallingConv::AMDGPU_CS && ST.hasArchitectedSGPRs())) {
+  if (!AMDGPU::isGraphics(CC) || CC == CallingConv::AMDGPU_CS ||
+      ST.hasArchitectedSGPRs()) {
----------------
cdevadas wrote:

This change looks redundant as this patch always allocate the TTMP* for subtargets with architectedSGPR enabled.
This was initially added with https://github.com/llvm/llvm-project/commit/2171f04c121ed27fe2705d3f116df052daeb40a5.
You can revert this check to just have only !AMDGPU::isGraphics(CC)

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


More information about the llvm-commits mailing list