[PATCH] D122835: [SCEV] Remove an invalid assertion in SCEV.

YangguangLi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 12:54:07 PDT 2022


Yangguang updated this revision to Diff 426809.
Yangguang retitled this revision from "[SCEV] Fix a bug that caused an invalid assertion." to "[SCEV] Remove an invalid assertion in SCEV.".
Yangguang edited the summary of this revision.
Yangguang added a comment.

Removed the whole assertion as suggested.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122835/new/

https://reviews.llvm.org/D122835

Files:
  llvm/lib/Analysis/ScalarEvolution.cpp


Index: llvm/lib/Analysis/ScalarEvolution.cpp
===================================================================
--- llvm/lib/Analysis/ScalarEvolution.cpp
+++ llvm/lib/Analysis/ScalarEvolution.cpp
@@ -8436,11 +8436,6 @@
       BECount = getUMinFromMismatchedTypes(
           EL0.ExactNotTaken, EL1.ExactNotTaken,
           /*Sequential=*/!isa<BinaryOperator>(ExitCond));
-
-      // If EL0.ExactNotTaken was zero and ExitCond was a short-circuit form,
-      // it should have been simplified to zero (see the condition (3) above)
-      assert(!isa<BinaryOperator>(ExitCond) || !EL0.ExactNotTaken->isZero() ||
-             BECount->isZero());
     }
     if (EL0.MaxNotTaken == getCouldNotCompute())
       MaxBECount = EL1.MaxNotTaken;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122835.426809.patch
Type: text/x-patch
Size: 741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220503/89aaeb8b/attachment.bin>


More information about the llvm-commits mailing list