mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
nir/opt_undef: keep undefs used by partial undef vectors
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32249>
This commit is contained in:
parent
a9d3caf3bf
commit
af974b5fe9
1 changed files with 3 additions and 9 deletions
|
|
@ -181,15 +181,9 @@ visit_undef_use(nir_src *src, struct visit_info *info)
|
|||
*/
|
||||
nir_alu_instr *alu = nir_instr_as_alu(instr);
|
||||
|
||||
/* Follow movs and vecs.
|
||||
*
|
||||
* Note that all vector component uses are followed and swizzles are
|
||||
* ignored.
|
||||
*/
|
||||
if (alu->op == nir_op_mov || nir_op_is_vec(alu->op)) {
|
||||
nir_foreach_use_including_if(next_src, &alu->def) {
|
||||
visit_undef_use(next_src, info);
|
||||
}
|
||||
/* opt_undef_vecN already copy propagated. */
|
||||
if (nir_op_is_vec(alu->op)) {
|
||||
info->must_keep_undef = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue