diff --git a/src/amd/compiler/README.md b/src/amd/compiler/README.md index 822ecd79cbc..7c7e68f458e 100644 --- a/src/amd/compiler/README.md +++ b/src/amd/compiler/README.md @@ -154,7 +154,6 @@ A VALU instruction or an `s_waitcnt vmcnt(0)` between the two instructions. Triggered by: An SMEM instruction reads an SGPR. Then, a VALU instruction writes that same SGPR. -Despite LLVM Mitigated by: Any non-SOPP SALU instruction (except `s_setvskip`, `s_version`, and any non-lgkmcnt `s_waitcnt`). diff --git a/src/amd/compiler/aco_insert_NOPs.cpp b/src/amd/compiler/aco_insert_NOPs.cpp index b9eaaed96db..689d5e25acc 100644 --- a/src/amd/compiler/aco_insert_NOPs.cpp +++ b/src/amd/compiler/aco_insert_NOPs.cpp @@ -491,9 +491,9 @@ void handle_instruction_gfx10(Program *program, NOP_ctx_gfx10 &ctx, aco_ptr depctr{create_instruction(aco_opcode::s_waitcnt_depctr, Format::SOPP, 0, 1)}; + aco_ptr depctr{create_instruction(aco_opcode::s_waitcnt_depctr, Format::SOPP, 0, 0)}; depctr->imm = 0xfffe; - depctr->definitions[0] = Definition(sgpr_null, s1); + depctr->block = -1; new_instructions.emplace_back(std::move(depctr)); } else if (instr_writes_sgpr(instr)) { /* Any VALU instruction that writes an SGPR mitigates the problem */