[PATCH] D51486: Add check to Latch's terminator in UnrollRuntimeLoopRemainder
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 5 02:30:12 PDT 2018
dmgreen added a comment.
I'm happy with this as is, but if you want the API to be tested and ensure it keeps working, you could add a unittest. Something like unittests/Transforms/Utils/BasicBlockUtilsTest.cpp or the ones is CloningTest.cpp.
================
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
+
----------------
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.
Repository:
rL LLVM
https://reviews.llvm.org/D51486
More information about the llvm-commits
mailing list