[PATCH] D88060: [GISel]: Few InsertVecElt combines
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 14:25:59 PDT 2020
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:2425-2426
+ CurrInst->getOperand(0).getReg(), MRI,
+ m_GInsertVecElt(m_MInstr(TmpInst), m_Reg(TmpReg), m_ICst(IntImm)))) {
+ Inserts.push_back(std::make_pair(TmpReg, IntImm));
+ CurrInst = TmpInst;
----------------
Should guard against UB out of bounds accesses
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:2433
+ return false;
+ SmallVector<bool, 4> SeenIndex(NumElts, false);
+ std::sort(Inserts.begin(), Inserts.end(),
----------------
BitVector?
================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/combine-insert-vec-elt.mir:43
+ $q0 = COPY %4
+...
----------------
Should add test with out of bounds constant index
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