[PATCH] D152706: [AMDGPU] Use SSAUpdater in PromoteAlloca

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 07:08:07 PDT 2023


Pierre-vh 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)) {
----------------
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?


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