diff --git a/src/compiler/nir/nir_loop_analyze.c b/src/compiler/nir/nir_loop_analyze.c index 4c39de9d949..f468d2316e5 100644 --- a/src/compiler/nir/nir_loop_analyze.c +++ b/src/compiler/nir/nir_loop_analyze.c @@ -1050,6 +1050,10 @@ calculate_iterations(nir_def *basis, nir_def *limit_basis, induction_base_type); } + if (cond.def->num_components != 1 || basis->num_components != 1 || + limit_basis->num_components != 1) + return -1; + /* do-while loops can increment the starting value before the condition is * checked. e.g. *