diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp index 612f699..650f055 100644 --- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp @@ -776,7 +776,7 @@ bool llvm::UnrollRuntimeLoopRemainder( !isGuaranteedNotToBeUndefOrPoison(TripCount, AC, PreHeaderBR, DT)) { TripCount = B.CreateFreeze(TripCount); BECount = - B.CreateAdd(TripCount, ConstantInt::get(TripCount->getType(), -1)); + B.CreateAdd(TripCount, Constant::getAllOnesValue(TripCount->getType())); } else { // If we don't need to freeze, use SCEVExpander for BECount as well, to // allow slightly better value reuse. |