Normalized bounds of chunk of iterations to steal from are inclusive,
so upper bound should not be decremented in expression to check.
Problem was in attempt to steal iterations 0:0, that caused assertion after
wrong decrement. Reported in comment to https://reviews.llvm.org/D103648.
Differential Revision: https://reviews.llvm.org/D104880
} else {
vnew.p.ub -= 1; // steal 1 chunk of 1..7 remaining
}
- KMP_DEBUG_ASSERT((vnew.p.ub - 1) * (UT)chunk <= trip);
+ KMP_DEBUG_ASSERT(vnew.p.ub * (UT)chunk <= trip);
if (KMP_COMPARE_AND_STORE_REL64(
(volatile kmp_int64 *)&v->u.p.count,
*VOLATILE_CAST(kmp_int64 *) & vold.b,