summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-04-02 01:30:10 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-04-02 01:30:10 +0000
commitf96cde9f687026321fddd790b10cdd1cd8891fe2 (patch)
tree7f6bbd7d64460bcec35955582cccd372eacdb59b /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parenta9b549f924e7f437cd7696530b96f6db5eacf37c (diff)
downloadbcm5719-llvm-f96cde9f687026321fddd790b10cdd1cd8891fe2.tar.gz
bcm5719-llvm-f96cde9f687026321fddd790b10cdd1cd8891fe2.zip
Fix a bug indicated by -fsanitize=shift-exponent.
llvm-svn: 233881
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
index 381d8fc33ea..46570a11a4f 100644
--- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
@@ -320,7 +320,7 @@ bool llvm::UnrollRuntimeLoopProlog(Loop *L, unsigned Count, LoopInfo *LI,
// This constraint lets us deal with an overflowing trip count easily; see the
// comment on ModVal below. This check is equivalent to `Log2(Count) <
// BEWidth`.
- if (static_cast<uint64_t>(Count) > (1ULL << BEWidth))
+ if (BEWidth < 64 && static_cast<uint64_t>(Count) > (1ULL << BEWidth))
return false;
// If this loop is nested, then the loop unroller changes the code in
OpenPOWER on IntegriCloud