summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp')
-rw-r--r--mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
index 9208ce8ab6d..3f613c6bfb5 100644
--- a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
+++ b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
@@ -94,7 +94,7 @@ public:
auto rhs = visit(expr.getRHS());
assert(lhs && rhs && "unexpected affine expr lowering failure");
- Value *remainder = builder.create<RemISOp>(loc, lhs, rhs);
+ Value *remainder = builder.create<SignedRemIOp>(loc, lhs, rhs);
Value *zeroCst = builder.create<ConstantIndexOp>(loc, 0);
Value *isRemainderNegative =
builder.create<CmpIOp>(loc, CmpIPredicate::slt, remainder, zeroCst);
@@ -138,7 +138,7 @@ public:
Value *negatedDecremented = builder.create<SubIOp>(loc, noneCst, lhs);
Value *dividend =
builder.create<SelectOp>(loc, negative, negatedDecremented, lhs);
- Value *quotient = builder.create<DivISOp>(loc, dividend, rhs);
+ Value *quotient = builder.create<SignedDivIOp>(loc, dividend, rhs);
Value *correctedQuotient = builder.create<SubIOp>(loc, noneCst, quotient);
Value *result =
builder.create<SelectOp>(loc, negative, correctedQuotient, quotient);
@@ -178,7 +178,7 @@ public:
Value *decremented = builder.create<SubIOp>(loc, lhs, oneCst);
Value *dividend =
builder.create<SelectOp>(loc, nonPositive, negated, decremented);
- Value *quotient = builder.create<DivISOp>(loc, dividend, rhs);
+ Value *quotient = builder.create<SignedDivIOp>(loc, dividend, rhs);
Value *negatedQuotient = builder.create<SubIOp>(loc, zeroCst, quotient);
Value *incrementedQuotient = builder.create<AddIOp>(loc, quotient, oneCst);
Value *result = builder.create<SelectOp>(loc, nonPositive, negatedQuotient,
OpenPOWER on IntegriCloud