================
@@ -386,6 +420,20 @@ bool AMDGPUPromoteAllocaImpl::run(Function &F, bool 
PromoteToLDS) {
       LLVM_DEBUG(dbgs() << "Analyzing: " << *AI << '\n');
 
       AllocaAnalysis AA{AI};
+
+      // An alloca already in the VGPR address space is not promoted, only
+      // given a place there. Required for functionality, so it runs whether
+      // or not optimizations are enabled.
+      if (AI->getAddressSpace() == AMDGPUAS::VGPR) {
+        if (IsLatePass)
+          Allocas.push_back(std::move(AA));
+        continue;
+      }
----------------
arsenm wrote:

There are more bugs here but I think it's critical this feature not touch 
promote alloca, other than to inform promote alloca that it should hold off on 
using more VGPRs for the occupancy target 

https://github.com/llvm/llvm-project/pull/214248
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to