diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-04-12 01:24:01 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-04-12 01:24:01 +0000 |
commit | 71190feca50b096cba31dcbbfd15aec40da901ea (patch) | |
tree | 8171f7e4e85d11d9e5a44e41e88a403719d507bc /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | |
parent | 1c565c31b161898d8ea32bd71c5ab55b5d6d2b83 (diff) | |
download | bcm5719-llvm-71190feca50b096cba31dcbbfd15aec40da901ea.tar.gz bcm5719-llvm-71190feca50b096cba31dcbbfd15aec40da901ea.zip |
[LoopUnrollRuntime] Clean up a predicate.
Clean up a predicate I added in r229731, fix the relevant comment and
add a test case. The earlier version is confusing to read and was also
buggy (probably not a coincidence) till Alexey fixed it in r233881.
llvm-svn: 234701
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp index 46570a11a4f..c8d47828eba 100644 --- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp @@ -318,9 +318,8 @@ bool llvm::UnrollRuntimeLoopProlog(Loop *L, unsigned Count, LoopInfo *LI, return false; // 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 (BEWidth < 64 && static_cast<uint64_t>(Count) > (1ULL << BEWidth)) + // comment on ModVal below. + if (Log2_32(Count) > BEWidth) return false; // If this loop is nested, then the loop unroller changes the code in |