[llvm] [AMDGPU] Fix `AMDGPUPromoteAlloca` handling certain loads incorrectly (PR #123173)

Chinmay Deshpande via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 01:53:25 PST 2025


================
@@ -397,6 +397,14 @@ calculateVectorIndex(Value *Ptr,
   return I->second;
 }
 
+static void updateVectorIndex(Value *OldIdx, Value *NewIdx,
+                              std::map<GetElementPtrInst *, Value *> &GEPIdx) {
+  for (auto &[GEP, Idx] : GEPIdx) {
+    if (Idx == OldIdx)
+      GEPIdx[GEP] = NewIdx;
----------------
chinmaydd wrote:

Yes, this looks like the same issue. I suppose I'll wait for that to be merged and check if it resolves the three tickets I have linked. 

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


More information about the llvm-commits mailing list