[PATCH] D74688: AMDGPU/GlobalISel: Support llvm.trap and llvm.debugtrap intrinsics

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 06:43:24 PST 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:3375-3376
+      return false;
+    Register DstReg(AMDGPU::SGPR0_SGPR1);
+    if (!loadInputValue(DstReg, B, Arg))
+      return false;
----------------
arsenm wrote:
> This is directly copying the physical register into another physical register. We don't want that. This needs to go through an intermediate virtual register copy
Can you add another assert in loadInputValue? It already asserts   assert(Arg->getRegister().isPhysical()), but should also assert the result is virtual


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74688





More information about the llvm-commits mailing list