Lines Matching defs:forOp
238 static bool vectorizeSubscripts(PatternRewriter &rewriter, scf::ForOp forOp,
243 Block *block = &forOp.getRegion().front();
298 Location loc = forOp.getLoc();
332 rewriter.create<arith::AddIOp>(forOp.getLoc(), inv, idx));
371 static bool vectorizeExpr(PatternRewriter &rewriter, scf::ForOp forOp, VL vl,
373 Location loc = forOp.getLoc();
379 if (arg == forOp.getInductionVar()) {
399 Block *block = &forOp.getRegion().front();
414 if (vectorizeSubscripts(rewriter, forOp, vl, subs, codegen, vmask, idxs)) {
430 if (vectorizeExpr(rewriter, forOp, vl, def->getOperand(0), codegen, vmask,
457 if (vectorizeExpr(rewriter, forOp, vl, def->getOperand(0), codegen, vmask,
459 vectorizeExpr(rewriter, forOp, vl, def->getOperand(1), codegen, vmask,
501 static bool vectorizeStmt(PatternRewriter &rewriter, scf::ForOp forOp, VL vl,
503 Block &block = forOp.getRegion().front();
511 Location loc = forOp.getLoc();
533 Value init = forOp.getInitArgs()[0];
536 forOp.getRegionIterArg(0), init, vtp);
538 loc, forOp.getLowerBound(), forOp.getUpperBound(), step, vinit);
541 forOp->getAttr(LoopEmitter::getLoopEmitterLoopAttrName()));
544 rewriter.modifyOpInPlace(forOp, [&]() { forOp.setStep(step); });
547 vmask = genVectorMask(rewriter, loc, vl, forOp.getInductionVar(),
548 forOp.getLowerBound(), forOp.getUpperBound(), step);
558 Value iter = forOp.getRegionIterArg(0);
562 vectorizeExpr(rewriter, forOp, vl, red, codegen, vmask, vrhs)) {
573 rewriter.replaceAllUsesWith(forOp.getResult(0), vres);
574 rewriter.replaceAllUsesWith(forOp.getInductionVar(),
576 rewriter.replaceAllUsesWith(forOp.getRegionIterArg(0),
578 rewriter.eraseOp(forOp);
588 if (vectorizeSubscripts(rewriter, forOp, vl, subs, codegen, vmask, idxs) &&
589 vectorizeExpr(rewriter, forOp, vl, rhs, codegen, vmask, vrhs)) {
645 if (auto forOp = redOp.getVector().getDefiningOp<scf::ForOp>()) {
646 if (forOp->hasAttr(LoopEmitter::getLoopEmitterLoopAttrName())) {