[PATCH] D156315: [RFC][GlobalISel] Overhauled MIR Patterns Support for Combiners

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 00:06:28 PDT 2023


Pierre-vh added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/GIMatchTableExecutor.cpp:37
+
+    if (Splat) {
+      if (auto VRegVal = getIConstantSplatVal(MO.getReg(), MRI))
----------------
I'd like to point this out: Now, matching constants will also match Splats. This is a harmless change for ISel (DAGISel pattern import in GISel) I think because all immediates are typed there, so even if `(i32 0)` matches a splat for `<4 x i32>` the typecheck should fail. I didn't notice any test changes doing this so I assume we're good.

If we want to avoid ISel having the same behavior that's possible, I can just create a derived class and only implement this change there for Combiners.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156315



More information about the llvm-commits mailing list