diff options
author | Georg Lehmann <dadschoorse@gmail.com> | 2022-08-15 13:26:23 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-08-15 13:25:38 +0000 |
commit | 9e5f311efec13a13f27641df3b153f3fcfad741c (patch) | |
tree | 1a0ec17c80a484c0b820c86a0e01f6b06dc43d26 /src/amd/compiler/aco_ssa_elimination.cpp | |
parent | baf314e2c078f4b1a565348717cd0a4d5aa5a3c9 (diff) | |
download | mesa-9e5f311efec13a13f27641df3b153f3fcfad741c.tar.gz |
aco: Check that we don't override exec_val operands during branching sequence optimization.
Fixes: baab6f18c91 ("aco: Optimize branching sequence during SSA elimination.")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18049>
Diffstat (limited to 'src/amd/compiler/aco_ssa_elimination.cpp')
-rw-r--r-- | src/amd/compiler/aco_ssa_elimination.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/amd/compiler/aco_ssa_elimination.cpp b/src/amd/compiler/aco_ssa_elimination.cpp index ff74585cc67..f82058a6c44 100644 --- a/src/amd/compiler/aco_ssa_elimination.cpp +++ b/src/amd/compiler/aco_ssa_elimination.cpp @@ -417,6 +417,13 @@ try_optimize_branching_sequence(ssa_elimination_ctx& ctx, Block& block, const in } } + if (save_original_exec) { + /* We insert the exec copy before exec_val, so exec_val can't use those registers. */ + for (const Operand& op : exec_val->operands) + if (regs_intersect(exec_copy_def, op)) + return; + } + /* Reassign the instruction to write exec directly. */ exec_val->definitions[0] = Definition(exec, ctx.program->lane_mask); |