Replacement in try_eval_const_alu() doesn't work because the replacements
are always scalar. The callers also always give a scalar dest.
This is encountered when compiling a Redout shader under ASan.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Fixes:
bc170e895f38 ("nir/loop_analyze: Use try_eval_const_alu and induction variable basis info")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26225>
(cherry picked from commit
796058841378c4d5e04ff8b5cbe5adef5aae326a)
"description": "nir/loop_analyze: skip if basis/limit/comparison is vector",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "bc170e895f384acf24c849798fcff092db440135",
"notes": null
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.
*