[PATCH] D71386: [AMDGPU] Remove unnecessary v_mov from a register to itself in WQM lowering.

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 05:21:56 PST 2019


nhaehnle added a comment.

This basically LGTM



================
Comment at: llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp:877-878
+  for (MachineInstr *MI : LowerToCopyInstrs) {
+    for (unsigned i = MI->getNumExplicitOperands() - 1; i > 1; i--)
+      MI->RemoveOperand(i);
+
----------------
arsenm wrote:
> These should only ever have been moves to begin with? Just remove the one exec operand?
They were move-like: WQM, SOFT_WQM, V_SET_INACTIVE_xx. I think it makes sense though to just remove that one operand and maybe assert there are no other implicit uses.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71386





More information about the llvm-commits mailing list