aco: add missing scc clobber to nir_op_unpack_32_2x16_split_y
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 14 Apr 2020 15:40:46 +0000 (16:40 +0100)
committerRhys Perry <pendingchaos02@gmail.com>
Thu, 16 Apr 2020 16:04:53 +0000 (17:04 +0100)
The ISA doc is inconsistent whether this instruction writes SCC. It does.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4552>

src/amd/compiler/aco_instruction_selection.cpp

index d1b9f92..8552b06 100644 (file)
@@ -2700,7 +2700,7 @@ void visit_alu_instr(isel_context *ctx, nir_alu_instr *instr)
       if (dst.type() == RegType::vgpr) {
          bld.pseudo(aco_opcode::p_split_vector, bld.def(dst.regClass()), Definition(dst), get_alu_src(ctx, instr->src[0]));
       } else {
-         bld.sop2(aco_opcode::s_bfe_u32, Definition(dst), get_alu_src(ctx, instr->src[0]), Operand(uint32_t(16 << 16 | 16)));
+         bld.sop2(aco_opcode::s_bfe_u32, Definition(dst), bld.def(s1, scc), get_alu_src(ctx, instr->src[0]), Operand(uint32_t(16 << 16 | 16)));
       }
       break;
    case nir_op_pack_32_2x16_split: {