aco: don't constant propagate to DPP instructions
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 27 Aug 2021 16:50:11 +0000 (17:50 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 31 Aug 2021 16:58:20 +0000 (16:58 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12601>

src/amd/compiler/aco_optimizer.cpp

index 4a95ef8..634c093 100644 (file)
@@ -1058,7 +1058,7 @@ label_instruction(opt_ctx& ctx, aco_ptr<Instruction>& instr)
 
          unsigned bits = get_operand_size(instr, i);
          if (info.is_constant(bits) && alu_can_accept_constant(instr->opcode, i) &&
-             (!instr->isSDWA() || ctx.program->chip_class >= GFX9)) {
+             (!instr->isSDWA() || ctx.program->chip_class >= GFX9) && !instr->isDPP()) {
             Operand op = get_constant_op(ctx, info, bits);
             perfwarn(ctx.program, instr->opcode == aco_opcode::v_cndmask_b32 && i == 2,
                      "v_cndmask_b32 with a constant selector", instr.get());