From f96cde9f687026321fddd790b10cdd1cd8891fe2 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Thu, 2 Apr 2015 01:30:10 +0000 Subject: Fix a bug indicated by -fsanitize=shift-exponent. llvm-svn: 233881 --- llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp') diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp index 381d8fc..46570a1 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(Count) > (1ULL << BEWidth)) + if (BEWidth < 64 && static_cast(Count) > (1ULL << BEWidth)) return false; // If this loop is nested, then the loop unroller changes the code in -- cgit v1.1