diff options
author | Ilia Mirkin <[email protected]> | 2016-10-10 16:57:50 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-10-12 13:18:14 -0400 |
commit | 300b5ad023962ee95322e890a9ba57396392407e (patch) | |
tree | eeee5cbc12b13a5419a4213f6bf4a41707e8f6e1 /src/gallium/drivers | |
parent | 789119d21212da3891ed57018ec1af197a48977c (diff) |
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 <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index 7e64f7ce92c..d36c8531a27 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -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; } |