fhahn marked an inline comment as done. fhahn added inline comments.
================ Comment at: llvm/include/llvm/IR/MatrixBuilder.h:242 + auto *Cmp = B.CreateICmpULT(Idx, NumElts); + if (!isa<llvm::ConstantInt>(Cmp)) { + Function *TheFn = ---------------- rjmccall wrote: > xbolva00 wrote: > > Prefer early exit? > Should this do something special if the index is statically out of bounds? I think this cause should never happen and if it does it means earlier checks have been missed. I added an assert. ================ Comment at: llvm/include/llvm/IR/MatrixBuilder.h:245 + Intrinsic::getDeclaration(getModule(), Intrinsic::assume); + B.CreateCall(TheFn->getFunctionType(), TheFn, {Cmp}, Name); + } ---------------- xbolva00 wrote: > B.CreateAssumption(Cmp) may work well as well? and shorter. Updated, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102478/new/ https://reviews.llvm.org/D102478 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits