diff options
-rw-r--r-- | lib/Transforms/Scalar/LoopUnrollPass.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/LoopUnrollPass.cpp b/lib/Transforms/Scalar/LoopUnrollPass.cpp index 22dbfe326c..09a186f7f9 100644 --- a/lib/Transforms/Scalar/LoopUnrollPass.cpp +++ b/lib/Transforms/Scalar/LoopUnrollPass.cpp @@ -197,13 +197,13 @@ bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) { } if (TripCount) { // Reduce unroll count to be modulo of TripCount for partial unrolling - Count = CurrentThreshold / LoopSize; + Count = Threshold / LoopSize; while (Count != 0 && TripCount%Count != 0) Count--; } else if (UnrollRuntime) { // Reduce unroll count to be a lower power-of-two value - while (Count != 0 && Size > CurrentThreshold) { + while (Count != 0 && Size > Threshold) { Count >>= 1; Size = LoopSize*Count; } |