[PATCH] D114999: [AMDGPU] Kill def when folding immediate in two-addr pass

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 3 08:41:09 PST 2021


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:3184
+      // We cannot just remove the DefMI here, calling pass will crash.
+      DefMI->setDesc(get(AMDGPU::IMPLICIT_DEF));
+      for (unsigned I = DefMI->getNumOperands() - 1; I != 0; --I)
----------------
foad wrote:
> It's a shame that this IMPLICIT_DEF survives to the end of compilation and clutters the assembly output with "implicit-def:" comments.
Yes. Although the only way around it I see is to run MDCE one more time which seems to be an overkill to solve a cosmetic problem.


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

https://reviews.llvm.org/D114999



More information about the llvm-commits mailing list