[llvm] [AMDGPU] Add missing conversion link in alloca promotion pass (PR #177945)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 26 06:01:20 PST 2026


================
@@ -582,6 +582,66 @@ computeGEPToVectorIndex(GetElementPtrInst *GEP, AllocaInst *Alloca,
   return Result;
 }
 
+/// Creates a cast chain to convert Val to DstTy for load/store promotions.
+///
+/// \param DL      Module Data Layout.
+/// \param Builder IRBuilder to insert instructions with.
+/// \param Val     Value to be casted.
+/// \param DstTy   Destination type for the cast.
+/// \return the final value in the created cast chain.
+template <typename FolderTy, typename InserterTy>
+static Value *createLoadStoreCastChain(const DataLayout &DL,
+                                       IRBuilder<FolderTy, InserterTy> &Builder,
----------------
arsenm wrote:

```suggestion
static Value *createLoadStoreCastChain(const DataLayout &DL,
                                       IRBuilderBase &Builder,
```

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


More information about the llvm-commits mailing list