@@ -75,9 +75,9 @@ bool isValidSymbolInt(Operation *defOp, bool recur, Region *scope) {
7575 return true ;
7676
7777 if (recur) {
78- if (isa<SelectOp, IndexCastOp, IndexCastUIOp, AddIOp, MulIOp, DivSIOp ,
79- DivUIOp, RemSIOp, RemUIOp, SubIOp, CmpIOp, TruncIOp, ExtUIOp ,
80- ExtSIOp>(defOp))
78+ if (isa<arith:: SelectOp, IndexCastOp, IndexCastUIOp, AddIOp, MulIOp,
79+ DivSIOp, DivUIOp, RemSIOp, RemUIOp, SubIOp, CmpIOp, TruncIOp,
80+ ExtUIOp, ExtSIOp>(defOp))
8181 if (llvm::all_of (defOp->getOperands (), [&](Value v) {
8282 bool b = isValidSymbolInt (v, recur, scope);
8383 // if (!b)
@@ -1109,7 +1109,7 @@ struct SimplfyIntegerCastMath : public OpRewritePattern<IndexCastOp> {
11091109 iadd.getOperand(1)));
11101110 return success();
11111111 }
1112- if (auto iadd = op.getOperand().getDefiningOp<SelectOp>()) {
1112+ if (auto iadd = op.getOperand().getDefiningOp<arith:: SelectOp>()) {
11131113 PatternRewriter b(rewriter);
11141114 setLocationAfter(b, iadd.getTrueValue());
11151115 PatternRewriter b2(rewriter);
@@ -1125,8 +1125,9 @@ struct SimplfyIntegerCastMath : public OpRewritePattern<IndexCastOp> {
11251125 iadd.getTrueValue());
11261126 auto falsev = arith::IndexCastOp::create(b2, op.getLoc(),
11271127op.getType(), iadd.getFalseValue()); cond = b3CmpIOp::create(b2, cmp.getLoc(),
1128- cmp.getPredicate(), truev, falsev); rewriter.replaceOpWithNewOp<SelectOp>(op,
1129- cond, truev, falsev); return success();
1128+ cmp.getPredicate(), truev, falsev);
1129+ rewriter.replaceOpWithNewOp<arith::SelectOp>(op, cond, truev, falsev); return
1130+ success();
11301131 }
11311132 }
11321133 }
@@ -1322,7 +1323,7 @@ bool handleMinMax(Value start, SmallVectorImpl<Value> &out, bool &min,
13221323 if (isValidIndex (cur, scope)) {
13231324 out.push_back (cur);
13241325 continue ;
1325- } else if (auto selOp = cur.getDefiningOp <SelectOp>()) {
1326+ } else if (auto selOp = cur.getDefiningOp <arith:: SelectOp>()) {
13261327 // UB only has min of operands
13271328 if (auto cmp = selOp.getCondition ().getDefiningOp <CmpIOp>()) {
13281329 if (cmp.getLhs () == selOp.getTrueValue () &&
@@ -2574,7 +2575,7 @@ struct ForOpRaising : public OpRewritePattern<scf::ForOp> {
25742575 if (isValidIndex (cur, scope)) {
25752576 lbs.push_back (cur);
25762577 continue ;
2577- } else if (auto selOp = cur.getDefiningOp <SelectOp>()) {
2578+ } else if (auto selOp = cur.getDefiningOp <arith:: SelectOp>()) {
25782579 // LB only has max of operands
25792580 if (auto cmp = selOp.getCondition ().getDefiningOp <CmpIOp>()) {
25802581 if (cmp.getLhs () == selOp.getTrueValue () &&
@@ -2599,7 +2600,7 @@ struct ForOpRaising : public OpRewritePattern<scf::ForOp> {
25992600 if (isValidIndex (cur, scope)) {
26002601 ubs.push_back (cur);
26012602 continue ;
2602- } else if (auto selOp = cur.getDefiningOp <SelectOp>()) {
2603+ } else if (auto selOp = cur.getDefiningOp <arith:: SelectOp>()) {
26032604 // UB only has min of operands
26042605 if (auto cmp = selOp.getCondition ().getDefiningOp <CmpIOp>()) {
26052606 if (cmp.getLhs () == selOp.getTrueValue () &&
0 commit comments