[PATCH] D95521: [SCEV] Apply loop guards to zero modulo conditions

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 02:45:28 PST 2021


fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

LGTM with the additional tests, thanks!

I did some testing and it appears this exposes a crash in `matchURem`. I'm taking a look at that now, I think it would be good to wait with landing the change until this is resolved.



================
Comment at: llvm/test/Transforms/LoopUnroll/runtime-unroll-assume-no-remainder.ll:7
+
+define dso_local void @assumeDivisibleTC(i8* noalias nocapture %a, i8* noalias nocapture readonly %b, i32 %p, i32 %q) local_unnamed_addr {
+; CHECK-LABEL: @assumeDivisibleTC(
----------------
could you add a similar negative test, e.g. where the `and` does not strip the lowest bit?


================
Comment at: llvm/test/Transforms/LoopVectorize/dont-fold-tail-for-divisible-TC.ll:67
 
-define dso_local void @assumeAlignedTC(i32* noalias nocapture %A, i32* %p) optsize {
 ; CHECK-LABEL: @assumeAlignedTC(
----------------
could you add a similar negative test, e.g. where the `and` does not strip the lowest bit?

Perhaps also add a test using `urem`?


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

https://reviews.llvm.org/D95521



More information about the llvm-commits mailing list