gpu-compute: set exec_mask for permute,bpermute instructions
authorKyle Roarty <kyleroarty1716@gmail.com>
Thu, 24 Sep 2020 03:25:02 +0000 (22:25 -0500)
committerKyle Roarty <kyleroarty1716@gmail.com>
Thu, 24 Sep 2020 17:56:04 +0000 (17:56 +0000)
This change sets gpuDynInst->exec_mask for permute and bpermute
instructions, fixing a bug where they would never write their data.

permute and bpermute instructions are load instructions that write
to a VGPR. Because of that, they use gpuDynInst->exec_mask when
checking what lanes should write to the VGPR.

gpuDynInst->exec_mask gets set to wf->execMask() as that is what other
load instructions that write to VGPRs do.

Change-Id: Ie443283488cbd2ab9c17fc255e7cc44418353419
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35036
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/gcn3/insts/instructions.cc

index 296dbadf1beb8109811d1a59ca3950db07a1b181..b5011675e2fdba7f2eb79bf4e877b03e3215f1a7 100644 (file)
@@ -32522,6 +32522,7 @@ namespace Gcn3ISA
     {
         Wavefront *wf = gpuDynInst->wavefront();
         gpuDynInst->execUnitId = wf->execUnitId;
+        gpuDynInst->exec_mask = wf->execMask();
         gpuDynInst->latency.init(gpuDynInst->computeUnit());
         gpuDynInst->latency.set(gpuDynInst->computeUnit()
                                 ->cyclesToTicks(Cycles(24)));
@@ -32593,6 +32594,7 @@ namespace Gcn3ISA
     {
         Wavefront *wf = gpuDynInst->wavefront();
         gpuDynInst->execUnitId = wf->execUnitId;
+        gpuDynInst->exec_mask = wf->execMask();
         gpuDynInst->latency.init(gpuDynInst->computeUnit());
         gpuDynInst->latency.set(gpuDynInst->computeUnit()
                                 ->cyclesToTicks(Cycles(24)));