mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
nv50/ir: copy over value's register id when resolving merge of a phi
The offset needs to be properly copied over to the phi value, otherwise it will get assigned to the base of the merge instead of the proper location. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: mesa-stable@lists.freedesktop.org
This commit is contained in:
parent
789119d212
commit
300b5ad023
1 changed files with 3 additions and 1 deletions
|
|
@ -1905,8 +1905,10 @@ GCRA::resolveSplitsAndMerges()
|
|||
// their registers should be identical.
|
||||
if (v->getInsn()->op == OP_PHI || v->getInsn()->op == OP_UNION) {
|
||||
Instruction *phi = v->getInsn();
|
||||
for (int phis = 0; phi->srcExists(phis); ++phis)
|
||||
for (int phis = 0; phi->srcExists(phis); ++phis) {
|
||||
phi->getSrc(phis)->join = v;
|
||||
phi->getSrc(phis)->reg.data.id = v->reg.data.id;
|
||||
}
|
||||
}
|
||||
reg += v->reg.size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue