[PATCH] D89599: [AMDGPU] Fixed v_swap_b32 match

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 09:08:51 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp:442-447
+  for (const MachineOperand &Op : MI.implicit_operands()) {
+    if (!Op.isDef() || Op.getReg() == AMDGPU::EXEC)
+      continue;
+    BuildMI(*MI.getParent(), MI.getIterator(), MI.getDebugLoc(),
+            TII->get(AMDGPU::IMPLICIT_DEF), Op.getReg());
+  }
----------------
Rather than special casing exec, this should check if the number of operands matches the number in the MCInstrDesc


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

https://reviews.llvm.org/D89599



More information about the llvm-commits mailing list