diff --git a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp --- a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp @@ -808,7 +808,7 @@ 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