[PATCH] D119886: [AMDGPU] Promote recursive loads from kernel argument to constant
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 16 08:37:58 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteKernelArguments.cpp:138
+ Value *OrigPtr = Ptr;
+ while (isa<AddrSpaceCastInst>(OrigPtr))
+ OrigPtr = cast<AddrSpaceCastInst>(OrigPtr)->getPointerOperand();
----------------
rampitec wrote:
> vpykhtin wrote:
> > Nit: you can shorten the loop unsing while (auto *P = dyn_cast<AddrSpaceCastInst>(OrigPtr)) ...
> I need both Ptr and OrigPtr after the loop.
stripPointerCasts?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119886/new/
https://reviews.llvm.org/D119886
More information about the llvm-commits
mailing list