[all-commits] [llvm/llvm-project] fded6f: [LoopUnroll] Add multi-exit test which does not ex...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Mon May 17 09:09:22 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fded6f77c357447b06b952f56c83d2a5487c5adf
https://github.com/llvm/llvm-project/commit/fded6f77c357447b06b952f56c83d2a5487c5adf
Author: Florian Hahn <flo at fhahn.com>
Date: 2021-05-17 (Mon, 17 May 2021)
Changed paths:
A llvm/test/Transforms/LoopUnroll/unroll-header-exiting-with-phis-multiple-exiting-blocks.ll
Log Message:
-----------
[LoopUnroll] Add multi-exit test which does not exit through latch.
This patch adds a new test for loop-unrolling with multiple exiting
blocks, where the latch does not exit, but the header does. This can
happen when the loop has not been rotated, e.g. due to minsize.
Inspired by the following end-to-end test, using -Oz
https://godbolt.org/z/fP6sna8qK
bool foo(int *ptr, int limit) {
#pragma clang loop unroll(full)
for (unsigned int i = 0; i < 4; i++) {
if (ptr[i] > limit)
return false;
ptr[i]++;
}
return true;
}
More information about the All-commits
mailing list