[PATCH] D90171: [SVE] Fix TypeSize warning in RuntimePointerChecking::insert

Joe Ellis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 01:16:26 PST 2020


joechrisellis added inline comments.


================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:233
+    const SCEV *EltSizeSCEV =
+        SE->getSizeOfExpr(IntIdxTy, Ptr->getType()->getPointerElementType());
     ScEnd = SE->getAddExpr(ScEnd, EltSizeSCEV);
----------------
fhahn wrote:
> joechrisellis wrote:
> > fhahn wrote:
> > > I think this slightly changes the behavior if store and alloc size are different, is that intentional? (because getSizeOfExpr uses alloc size).
> > Excellent spot -- I have fixed this.
> Not sure how hard it would be to come up with a test, but it would probably be good to have one
Hi @fhahn, sorry for the lag in replying here!

I tried to make a test for this but wasn't able to come up with anything that defends against the different behaviour when alloc size != store size. I think I will leave this out from the patch, if that is okay with you? Otherwise, it would be useful to hear your ideas on how we could create such a test. :)


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