[llvm] 54e21df - [unroll] Fix a functional change in an NFC patch
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 1 17:28:26 PST 2021
Author: Daniel Sanders
Date: 2021-12-01T17:28:12-08:00
New Revision: 54e21df973e154052e74a4516bbe28a81e75a922
URL: https://github.com/llvm/llvm-project/commit/54e21df973e154052e74a4516bbe28a81e75a922
DIFF: https://github.com/llvm/llvm-project/commit/54e21df973e154052e74a4516bbe28a81e75a922.diff
LOG: [unroll] Fix a functional change in an NFC patch
5c77aa2b917c [unroll] Use early return in shouldFullUnroll [nfc]
wasn't quite NFC since !(x <= y) is x > y rather than x >= y
Credit to Justin Bogner for spotting the bug
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D114894
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
index 17e8ce820216a..39c8b65968aa8 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
@@ -808,7 +808,7 @@ static Optional<unsigned> shouldFullUnroll(
const TargetTransformInfo::UnrollingPreferences &UP) {
assert(FullUnrollTripCount && "should be non-zero!");
- if (FullUnrollTripCount >= UP.FullUnrollMaxCount)
+ if (FullUnrollTripCount > UP.FullUnrollMaxCount)
return None;
// When computing the unrolled size, note that BEInsns are not replicated
More information about the llvm-commits
mailing list