mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-02 05:17:15 +00:00
Fix a bug indicated by -fsanitize=shift-exponent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233881 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
// This constraint lets us deal with an overflowing trip count easily; see the
|
||||||
// comment on ModVal below. This check is equivalent to `Log2(Count) <
|
// comment on ModVal below. This check is equivalent to `Log2(Count) <
|
||||||
// BEWidth`.
|
// BEWidth`.
|
||||||
if (static_cast<uint64_t>(Count) > (1ULL << BEWidth))
|
if (BEWidth < 64 && static_cast<uint64_t>(Count) > (1ULL << BEWidth))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// If this loop is nested, then the loop unroller changes the code in
|
// If this loop is nested, then the loop unroller changes the code in
|
||||||
|
Reference in New Issue
Block a user