[PATCH] D51486: Add check to Latch's terminator in UnrollRuntimeLoopRemainder

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 12:39:24 PDT 2018


anna added inline comments.


================
Comment at: test/Transforms/LoopUnroll/runtime-loop-non-exiting-latch.ll:1
+; RUN: opt < %s -S -loop-unroll -unroll-runtime=true -unroll-allow-remainder=true -unroll-count=4
+
----------------
rcorcs wrote:
> dmgreen wrote:
> > I see that this is testing against a crash, but it's best to add a FileCheck, with some CHECK lines that the loop was not unrolled. I think the classic way to do this would be that it has one store.
> I can add this check.
> But it is not a problem if this loop is actually unrolled. For example, it could be runtime unrolled with a remainder.
> The idea is more of having a test like the full-unroll-crashers.ll that only provides some challenging examples for the pass to deal with.
> 
Didn't we get an assertion failure in LLVM without the patch? Then you can add a `; REQUIRES assert` at the top of the file so that it shows we're testing for an assertion failure. Some similar examples exist in other test files.


Repository:
  rL LLVM

https://reviews.llvm.org/D51486





More information about the llvm-commits mailing list