diff --git a/src/amd/compiler/aco_lower_to_hw_instr.cpp b/src/amd/compiler/aco_lower_to_hw_instr.cpp index 57c201b4867..09a8a6ee02e 100644 --- a/src/amd/compiler/aco_lower_to_hw_instr.cpp +++ b/src/amd/compiler/aco_lower_to_hw_instr.cpp @@ -2746,7 +2746,7 @@ lower_to_hw_instr(Program* program) } case aco_opcode::p_init_scratch: { assert(program->gfx_level >= GFX8 && program->gfx_level <= GFX10_3); - if (!program->config->scratch_bytes_per_wave) + if (!program->config->scratch_bytes_per_wave && !program->has_call) break; Operand scratch_addr = instr->operands[0];