[PATCH] D11149: Fix memcheck interval ends for pointers with negative strides
Adam Nemet
anemet at apple.com
Tue Jul 14 11:33:28 PDT 2015
anemet added a comment.
Is this a preexisting bug to grouping pointers? IOW, did we handle swapping start and end like this for pointers before your change?
If this was a bug even before, we probably want to benchmark this to avoid surprises. (In theory we could have had a case where the memchecks should have failed but did not but do after your change.)
Please also add a test for the non-constant case.
Thanks!
================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:144-147
@@ +143,6 @@
+ // expressions.
+ const SCEV *Min = SE->getUMinExpr(ScStart, ScEnd);
+ const SCEV *Max = SE->getUMaxExpr(ScStart, ScEnd);
+ ScStart = Min;
+ ScEnd = Max;
+ }
----------------
Nit: you can assign to ScStart and ScEnd directly.
http://reviews.llvm.org/D11149
More information about the llvm-commits
mailing list