mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Avoid a confusing assert for silly options: -unroll-runtime -unroll-count=1.
No need for an explicit test case for an unsupported combination of options. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146721 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -176,6 +176,11 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, unsigned TripCount,
|
|||||||
if (TripCount != 0 && Count > TripCount)
|
if (TripCount != 0 && Count > TripCount)
|
||||||
Count = TripCount;
|
Count = TripCount;
|
||||||
|
|
||||||
|
// Don't enter the unroll code if there is nothing to do. This way we don't
|
||||||
|
// need to support "partial unrolling by 1".
|
||||||
|
if (TripCount == 0 && Count < 2)
|
||||||
|
return false;
|
||||||
|
|
||||||
assert(Count > 0);
|
assert(Count > 0);
|
||||||
assert(TripMultiple > 0);
|
assert(TripMultiple > 0);
|
||||||
assert(TripCount == 0 || TripCount % TripMultiple == 0);
|
assert(TripCount == 0 || TripCount % TripMultiple == 0);
|
||||||
|
Reference in New Issue
Block a user