[PATCH] D69071: [GISel][CombinerHelper] Add concat_vectors(build_vector, build_vector) => build_vector

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 15:36:13 PDT 2019


qcolombet marked an inline comment as done.
qcolombet added inline comments.


================
Comment at: lib/CodeGen/GlobalISel/CombinerHelper.cpp:104-105
+                                               SmallVectorImpl<Register> &Ops) {
+  if (MI.getOpcode() != TargetOpcode::G_CONCAT_VECTORS)
+    return false;
+  IsUndef = true;
----------------
arsenm wrote:
> qcolombet wrote:
> > arsenm wrote:
> > > I would expect this to be an assert
> > I would have expected this too, but decided against it to match the style of the other match functions.
> > Given the (arguably strange) use of the try methods in tryCombine, an assert does not seem desirable.
> > 
> > Happy to change it though :).
> I replaced similar checks  in the LegalizationArtifactCombiner in r367376
Love it!
I'll fix that one in that PR and the other in another commit.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D69071





More information about the llvm-commits mailing list