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

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 3 01:29:16 PST 2021


foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.

LGTM, I can't think of a better way of doing this.



================
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)
----------------
It's a shame that this IMPLICIT_DEF survives to the end of compilation and clutters the assembly output with "implicit-def:" comments.


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

https://reviews.llvm.org/D114999



More information about the llvm-commits mailing list