Mesa (master): aco: Mark VCC clobbered for iadd8 and iadd16 reductions on GFX6-7.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 22 11:42:45 UTC 2021
Module: Mesa
Branch: master
Commit: 74c467d9886cbb588d9e8f0ac23775d4b9d780bd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=74c467d9886cbb588d9e8f0ac23775d4b9d780bd
Author: Timur Kristóf <timur.kristof at gmail.com>
Date: Tue Apr 20 13:55:23 2021 +0200
aco: Mark VCC clobbered for iadd8 and iadd16 reductions on GFX6-7.
On GFX6-7, the 8 and 16-bit integer add reductions use the 32-bit v_add
instruction, which clobbers the VCC register.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10346>
---
src/amd/compiler/aco_instruction_selection.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index d2ded4d858a..c30795f79fd 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -7506,6 +7506,8 @@ Temp emit_reduction_instr(isel_context *ctx, aco_opcode aco_op, ReduceOp op,
bool clobber_vcc = false;
if ((op == iadd32 || op == imul64) && ctx->program->chip_class < GFX9)
clobber_vcc = true;
+ if ((op == iadd8 || op == iadd16) && ctx->program->chip_class < GFX8)
+ clobber_vcc = true;
if (op == iadd64 || op == umin64 || op == umax64 || op == imin64 || op == imax64)
clobber_vcc = true;
More information about the mesa-commit
mailing list