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

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 15:30:48 PDT 2017


rampitec 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) &&
----------------
arsenm wrote:
> 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).
It doesn't matter we do not produce it right now. Until it is marked as move imm I cannot use it, that is a time bomb. In fact I could remove flag from S_CMOV_B*. Objections?


https://reviews.llvm.org/D37389





More information about the llvm-commits mailing list