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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 6 06:15:58 PDT 2021


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:934
+      if (AllowUndef &&
+          MRI.getVRegDef(Element)->getOpcode() == TargetOpcode::G_IMPLICIT_DEF)
+        continue;
----------------
Use mi_match?


================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:943
+
+    // Different contant then the one already recorded, not a constant splat.
+    if (SplatValAndReg->Value != ElementValAndReg->Value)
----------------
Typo contant


================
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;
----------------
* instead of ->Value?


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

https://reviews.llvm.org/D104410



More information about the llvm-commits mailing list