Skip to content
Commit 4203d05c authored by Caio Oliveira's avatar Caio Oliveira Committed by Juan A. Suarez Romero
Browse files

nir: properly clear the entry sources in copy_prop_vars



When updating a copy entry source value from a "non-SSA" (the data
come from a copy instruction) to a "SSA" (the data or parts of it come
from SSA values), it was possible to hold invalid data in ssa[0]
depending on the writemask.  Because the union, ssa[0] could contain a
pointer to a nir_deref_instr left-over from previous non-SSA usage.

Change code to clean up the array before use to avoid invalid data
around.

Fixes: 62332d13 "nir: Add a local variable-based copy propagation pass"
Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 0ddc911f)
parent a1b25102
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment