[PATCH] D122835: [SCEV] Fix a bug that caused an invalid assertion.

YangguangLi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 14:21:25 PDT 2022


Yangguang added a comment.

In D122835#3423347 <https://reviews.llvm.org/D122835#3423347>, @lebedev.ri wrote:

> This seems correct to me, but any chance for a test?

Whenever `EL0.ExactNotTaken==0`, `getUMinFromMismatchedTypes()` will always return 0 for `BECount`. I don't see a way to generate a test case that fires the assertion. 
But since `ExitCond` in AND/OR form is now also covered by the assertion, do you think it's helpful to have a test case in which `ExitCond` is in AND/OR form and won't fire the assertion when `EL0.ExactNotTaken==0`? (Note: we already have similar test case for `ExitCond` in select form under `llvm\test\Analysis\ScalarEvolution\exit-count-select.ll`.)


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

https://reviews.llvm.org/D122835



More information about the llvm-commits mailing list