[PATCH] D88060: [GISel]: Few InsertVecElt combines
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 05:48:27 PDT 2020
arsenm added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h:419
+ bool matchConsecutiveInsertVecElts(MachineInstr &MI,
+ SmallVector<Register, 4> &MatchInfo);
+
----------------
SmallVectorImpl for all of these?
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:2428
+ return false;
+ Inserts.push_back(std::make_pair(TmpReg, IntImm));
+ CurrInst = TmpInst;
----------------
emplace_back?
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:2432
+
+ // Make sure we have correct no of elements.
+ if (Inserts.size() != NumElts)
----------------
s/no/number. Couldn't this add undefs for the missing elements?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88060/new/
https://reviews.llvm.org/D88060
More information about the llvm-commits
mailing list