[PATCH] D51486: Add check to Latch's terminator in UnrollRuntimeLoopRemainder
Rodrigo Caetano Rocha via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 5 05:40:55 PDT 2018
rcorcs added a comment.
Thanks for the suggestion and the unit-test code. I'll add it to the patch.
About the check in the test file, I don't want to prevent the pass to unroll this loop.
================
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
+
----------------
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.
Repository:
rL LLVM
https://reviews.llvm.org/D51486
More information about the llvm-commits
mailing list