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@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10346>
This commit is contained in:
Timur Kristóf 2021-04-20 13:55:23 +02:00 committed by Marge Bot
parent 59bbf885e9
commit 74c467d988

View file

@ -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;