[PATCH] D134343: [TwoAddrInst] Emit COPYs for undef REG_SEQUENCE operands if used in inst with early-clobber defs

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 06:11:46 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/twoaddr-mad-gfx11.mir:18
+    ; GCN-NEXT: undef %3.sub0:vreg_64 = COPY [[COPY]](s32)
+    ; GCN-NEXT: %3.sub1:vreg_64 = COPY undef [[COPY1]]
+    ; GCN-NEXT: early-clobber %4:vreg_64, %5:sreg_32 = V_MAD_U64_U32_gfx11_e64 [[COPY2]].sub1, [[COPY2]].sub0, %3, 0, implicit $exec
----------------
I also don't understand how this helps. This is just IMPLICIT_DEF


================
Comment at: llvm/test/CodeGen/AMDGPU/twoaddr-mad-gfx11.mir:24
+  %2:sreg_64_xexec = COPY $sgpr0_sgpr1
+  %3:vreg_64 = REG_SEQUENCE %0:vgpr_32(s32), %subreg.sub0, undef %1:vgpr_32, %subreg.sub1
+  early-clobber %4:vreg_64, %5:sreg_32 = V_MAD_U64_U32_gfx11_e64 %2.sub1:sreg_64_xexec, %2.sub0:sreg_64_xexec, %3:vreg_64, 0, implicit $exec
----------------
Can get rid of the (s32)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134343



More information about the llvm-commits mailing list