[PATCH] D152386: [LoadStoreVectorizer] Only upgrade align for alloca
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 07:23:16 PDT 2023
bjope added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp:805
+ Value *PtrOperand = getLoadStorePointerOperand(C[CBegin].Inst);
+ bool IsAllocaAccess = isa<AllocaInst>(PtrOperand->stripPointerCasts());
Align Alignment = getLoadStoreAlignment(C[CBegin].Inst);
----------------
arsenm wrote:
> Defer the strip pointer casts until after the cheaper getAllocAddrSpace checks?
> Defer the strip pointer casts until after the cheaper getAllocAddrSpace checks?
Right, I can fix that!
Although I'm not sure if we really need to check the getAllocaAddrSpace now when we check that it is an alloca. But if doing that check first, then it at least is possible to avoid the strip pointer cast for targets with multiple address spaces.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152386/new/
https://reviews.llvm.org/D152386
More information about the llvm-commits
mailing list