diff --git a/csrc/id_model/utils.h b/csrc/id_model/utils.h index 6926ea6e779..c0f73d0f8c3 100644 --- a/csrc/id_model/utils.h +++ b/csrc/id_model/utils.h @@ -159,6 +159,12 @@ inline bool shouldUseZeroIndex( // Trivial loop auto promotion_id = getLoopPromotion(loop_group->front()->as(), id_model); + + // ExprSimplify should be disabled here as it would fail to + // recognize size-one IterDomain. + DisableOptionsGuard options_guard; + DisableOptionsGuard::getCurOptions().unset(DisableOption::ExprSimplify); + if (promotion_id->isBroadcast() || simplifyExpr(promotion_id->extent())->isOneInt()) { return true;