diff --git a/src/gpu-compute/scalar_register_file.cc b/src/gpu-compute/scalar_register_file.cc index 52e0a2f0d5..3a00093793 100644 --- a/src/gpu-compute/scalar_register_file.cc +++ b/src/gpu-compute/scalar_register_file.cc @@ -64,6 +64,17 @@ ScalarRegisterFile::operandsReady(Wavefront *w, GPUDynInstPtr ii) const } } + for (const auto& dstScalarOp : ii->dstScalarRegOperands()) { + for (const auto& physIdx : dstScalarOp.physIndices()) { + if (regBusy(physIdx)) { + DPRINTF(GPUSRF, "WAX stall: WV[%d]: %s: physReg[%d]\n", + w->wfDynId, ii->disassemble(), physIdx); + w->stats.numTimesBlockedDueWAXDependencies++; + return false; + } + } + } + return true; } diff --git a/src/gpu-compute/vector_register_file.cc b/src/gpu-compute/vector_register_file.cc index dc5434d84f..2355643774 100644 --- a/src/gpu-compute/vector_register_file.cc +++ b/src/gpu-compute/vector_register_file.cc @@ -71,6 +71,17 @@ VectorRegisterFile::operandsReady(Wavefront *w, GPUDynInstPtr ii) const } } + for (const auto& dstVecOp : ii->dstVecRegOperands()) { + for (const auto& physIdx : dstVecOp.physIndices()) { + if (regBusy(physIdx)) { + DPRINTF(GPUVRF, "WAX stall: WV[%d]: %s: physReg[%d]\n", + w->wfDynId, ii->disassemble(), physIdx); + w->stats.numTimesBlockedDueWAXDependencies++; + return false; + } + } + } + return true; }