diff options
author | Daniel Schürmann <daniel@schuermann.dev> | 2022-10-17 11:40:40 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-10-17 19:50:32 +0000 |
commit | ebf7f7a1827006394fc6355ee245e45b6cfe2793 (patch) | |
tree | 33ddc7f81f5eaca4176ca80db05d7b6b2c9b195c /src/amd/compiler/aco_spill.cpp | |
parent | 829f769e602a7bbff4a0603076cb74ce9a966e8e (diff) | |
download | mesa-ebf7f7a1827006394fc6355ee245e45b6cfe2793.tar.gz |
aco/spill: Fix spilling of Phi operands
By adding the renamed variable, phi operands got spilled twice at the precessors.
Fixes: dEQP-VK.ray_query.misc.dynamic_indexing
Closes: #7493
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19109>
Diffstat (limited to 'src/amd/compiler/aco_spill.cpp')
-rw-r--r-- | src/amd/compiler/aco_spill.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_spill.cpp b/src/amd/compiler/aco_spill.cpp index e712920f53e..38a5cf8d475 100644 --- a/src/amd/compiler/aco_spill.cpp +++ b/src/amd/compiler/aco_spill.cpp @@ -920,8 +920,10 @@ add_coupling_code(spill_ctx& ctx, Block* block, unsigned block_idx) pred.instructions[idx]->opcode != aco_opcode::p_logical_end); std::vector<aco_ptr<Instruction>>::iterator it = std::next(pred.instructions.begin(), idx); pred.instructions.insert(it, std::move(spill)); + + /* Add the original name to predecessor's spilled variables */ if (spill_op.isTemp()) - ctx.spills_exit[pred_idx][spill_op.getTemp()] = spill_id; + ctx.spills_exit[pred_idx][phi->operands[i].getTemp()] = spill_id; } /* remove phi from instructions */ |