Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/arith/const_fold.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ inline PrimExpr TryConstFold<tir::Add>(PrimExpr a, PrimExpr b) {
template <>
inline PrimExpr TryConstFold<tir::Sub>(PrimExpr a, PrimExpr b) {
TVM_ARITH_CONST_PROPAGATION({
ICHECK(!(pa && pa->dtype.is_uint() && pa->value == 0U && b.dtype().is_uint()))
ICHECK(!((pa && pa->dtype.is_uint() && pa->value == 0U) &&
(pb && pb->dtype.is_uint() && pb->value > 0U)))
<< "Checked failed. Minuend 's value is 0U and it's dtype is uint "
<< "while Subtrahend's dtype is uint; which will cause a negative uint";
const DataType& rtype = a.dtype();
Expand Down