[PATCH] D152706: [AMDGPU] Use SSAUpdater in PromoteAlloca
    Matt Arsenault via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jul 20 07:47:37 PDT 2023
    
    
  
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:610
+      // Alloca already accessed as vector.
       if (Ptr == &Alloca && DL->getTypeStoreSize(Alloca.getAllocatedType()) ==
+                                DL->getTypeStoreSize(AccessTy)) {
----------------
Pierre-vh wrote:
> This will crash if we load/store a value at an offset, and the access type is the same size as the alloca.
> Should we check that the index is zero as well here?
Probably, need to not break on out of bounds access
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152706/new/
https://reviews.llvm.org/D152706
    
    
More information about the llvm-commits
mailing list