aco: don't consider a phi trivial if same's register doesn't match the def
For example:
s2: %688:s[32-33] = p_linear_phi %3:s[10-11], %688:s[32-33]
would have been considered trivial.
This might happen due to parallelcopies when assigning phi registers.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 69b6069dd2
("aco: refactor try_remove_trivial_phi() in RA")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8645>
This commit is contained in:
parent
9eab6ca20c
commit
824eba2148
|
@ -1778,7 +1778,7 @@ void try_remove_trivial_phi(ra_ctx& ctx, Temp temp)
|
|||
assert(t == same || op.physReg() == def.physReg());
|
||||
continue;
|
||||
}
|
||||
if (same != Temp())
|
||||
if (same != Temp() || op.physReg() != def.physReg())
|
||||
return;
|
||||
|
||||
same = t;
|
||||
|
|
Loading…
Reference in New Issue