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

YangguangLi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 10:37:10 PDT 2022


Yangguang added a comment.

In D122835#3423481 <https://reviews.llvm.org/D122835#3423481>, @Yangguang wrote:

> 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`.)

@lebedev.ri What do you think of the idea of adding test case for AND/OR form that is also covered by the assertion after change?


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

https://reviews.llvm.org/D122835



More information about the llvm-commits mailing list