[PATCH] D152706: [AMDGPU] Use SSAUpdater in PromoteAlloca
Pierre van Houtryve via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 00:15:00 PDT 2023
Pierre-vh marked an inline comment as done.
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)) {
----------------
arsenm wrote:
> 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
Oops, wrong place, it already does it (`&Ptr == &Alloca`), it's something in D155699
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