[PATCH] D37389: [AMDGPU] Produce madak and madmk from the two-address pass

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 15:26:04 PDT 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/SIInstrInfo.cpp:2088
+  auto Def = MRI.getUniqueVRegDef(MO->getReg());
+  if (Def && (Def->isFullCopy() || Def->getOpcode() == AMDGPU::S_MOV_B32 ||
+              Def->getOpcode() == AMDGPU::V_MOV_B32_e32) &&
----------------
rampitec wrote:
> arsenm wrote:
> > You don't need the isFullCopy check. COPY can't be used to materialize an immediate. Def->isMoveImm() instead of the separate opcode checks
> isMoveImm() will catch cmov, so will not work. isFullCopy removed.
It won't catch cmov (I assume you mean s_cmov_b32, which we also don't emit).


https://reviews.llvm.org/D37389





More information about the llvm-commits mailing list