[PATCH] D88060: [GISel]: Few InsertVecElt combines

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 17:11:49 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;
----------------
aditya_nandakumar wrote:
> arsenm wrote:
> > arsenm wrote:
> > > Should guard against UB out of bounds accesses
> > Not actually UB, but undef
> Just to confirm, you mean wrt index(IntImm here)?
Yes, index >= NumElts


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