[PATCH] D75915: [GlobalISel] combine G_TRUNC with G_MERGE_VALUES

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 08:07:09 PDT 2020


arsenm added a comment.

Needs dedicated test for this specific combine



================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:236
+                 "trunc(merge) should require less inputs than merge");
+          SmallVector<Register, 2> SrcRegs;
+          for (unsigned i = 0; i < NumSrcs; ++i)
----------------
You can initialize this to NumSrc size to avoid the push_back in the loop


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75915





More information about the llvm-commits mailing list