mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234701 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user