[PATCH] D104410: GlobalISel/Utils: Refactor constant splat match functions

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 6 09:13:34 PDT 2021


Petar.Avramovic added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:934
+      if (AllowUndef &&
+          MRI.getVRegDef(Element)->getOpcode() == TargetOpcode::G_IMPLICIT_DEF)
+        continue;
----------------
arsenm wrote:
> Use mi_match?
There is nothing to match for G_IMPLICIT_DEF only opcode, but there is this new GenericMachineInstr wrapper around MachineInstr which does opcode checks.


================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:944
+    // Different contant then the one already recorded, not a constant splat.
+    if (SplatValAndReg->Value != ElementValAndReg->Value)
+      return None;
----------------
arsenm wrote:
> * instead of ->Value?
I dind't get this. What should be the change again?


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

https://reviews.llvm.org/D104410



More information about the llvm-commits mailing list