[PATCH] D39233: [SCEV][NFC] Strengthen safety assert in SCEV expander

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 05:13:26 PDT 2017


mkazantsev updated this revision to Diff 120055.
mkazantsev added a comment.

Split to 2 NFC changes


https://reviews.llvm.org/D39233

Files:
  lib/Analysis/ScalarEvolutionExpander.cpp


Index: lib/Analysis/ScalarEvolutionExpander.cpp
===================================================================
--- lib/Analysis/ScalarEvolutionExpander.cpp
+++ lib/Analysis/ScalarEvolutionExpander.cpp
@@ -1746,7 +1746,8 @@
   if (I != InsertedExpressions.end())
     return I->second;
 
-  assert(isSafeToExpand(S, SE) && "Attempt to expand something unsafe!");
+  assert(isSafeToExpandAt(S, InsertPt, SE) &&
+         "Attempt to expand something unsafe at the specified point!");
   SCEVInsertPointGuard Guard(Builder, this);
   Builder.SetInsertPoint(InsertPt);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39233.120055.patch
Type: text/x-patch
Size: 572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171024/c94d7aad/attachment.bin>


More information about the llvm-commits mailing list