[PATCH] D90171: [SVE] Fix TypeSize warning in RuntimePointerChecking::insert
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 28 14:10:56 PDT 2020
fhahn added inline comments.
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:231
auto &DL = Lp->getHeader()->getModule()->getDataLayout();
- unsigned EltSize =
- DL.getTypeStoreSizeInBits(Ptr->getType()->getPointerElementType()) / 8;
- const SCEV *EltSizeSCEV = SE->getConstant(ScEnd->getType(), EltSize);
+ Type *IntIdxTy = DL.getIndexType(Ptr->getType());
+ const SCEV *EltSizeSCEV =
----------------
nit: just IdxTy?
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:233
+ const SCEV *EltSizeSCEV =
+ SE->getSizeOfExpr(IntIdxTy, Ptr->getType()->getPointerElementType());
ScEnd = SE->getAddExpr(ScEnd, EltSizeSCEV);
----------------
I think this slightly changes the behavior if store and alloc size are different, is that intentional? (because getSizeOfExpr uses alloc size).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90171/new/
https://reviews.llvm.org/D90171
More information about the llvm-commits
mailing list