[PATCH] D32674: [LoopIdiom] PR32811 check for safety while expanding

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 13:30:36 PDT 2017


hiraditya added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:823
   Value *NumBytes =
       Expander.expandCodeFor(NumBytesS, IntPtr, Preheader->getTerminator());
 
----------------
efriedma wrote:
> Do we also need to check whether it's safe to expand NumBytesS?
I don't think so (IIUC), because the NumBytes is based on the trip count of the loop*storesize, both of them should be safe to expand if the loop has a valid SCEV.


https://reviews.llvm.org/D32674





More information about the llvm-commits mailing list