[PATCH] D140599: AMDGPU: Promote array alloca if used by memmove/memcpy
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 9 02:33:00 PST 2023
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:544
+ Instruction *Inst = DeferredInsts.pop_back_val();
+ if (MemTransferInst *TransferInst = dyn_cast<MemTransferInst>(Inst)) {
+ // TODO: Support the case if the pointers are from different alloca or
----------------
This can be `cast` instead of `dyn_cast`.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:611
+ Type *VecPtrTy = VectorTy->getPointerTo(Alloca->getAddressSpace());
+ Value *BitCast = Builder.CreateBitCast(Alloca, VecPtrTy);
+ Value *VecValue = Builder.CreateLoad(VectorTy, BitCast);
----------------
ruiling wrote:
> arsenm wrote:
> > No reason to care about type pointers anymore
> Our graphics compiler has not fully switched to opaque pointers yet. @foad am I right?
Yes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140599/new/
https://reviews.llvm.org/D140599
More information about the llvm-commits
mailing list