[PATCH] D101448: AMDGPU/GlobalISel: Fix selection of image intrinsics with unused return

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 28 06:01:51 PDT 2021


arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.

LGTM. Letting the case where we do need the copy rely on the user constraining it is a bit iffy though



================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:1651-1652
+      if (!MRI->use_empty(VDataOut)) {
+        BuildMI(*MBB, &MI, DL, TII.get(AMDGPU::COPY), VDataOut)
+            .addReg(TmpReg, RegState::Kill, SubReg);
+      }
----------------
In principle this would need the result register to be constrained anyway


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101448/new/

https://reviews.llvm.org/D101448



More information about the llvm-commits mailing list