Skip to content

Commit e91b337

Browse files
author
Liang-Ta Wei
committed
chore: remove warning for inexact result
1 parent 5f55822 commit e91b337

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

mlir/lib/Dialect/PDL/IR/Builtins.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,11 @@ LogicalResult static binaryOp(PatternRewriter &rewriter, PDLResultList &results,
274274
"encounter an unsupported binary operator.");
275275
}
276276

277-
if (operationStatus != APFloat::opOK) {
278-
if (operationStatus != APFloat::opInexact)
279-
return failure();
280-
281-
emitWarning(rewriter.getUnknownLoc())
282-
<< "Binary arithmetic operation between " << lhsVal.convertToFloat()
283-
<< " and " << rhsVal.convertToFloat()
284-
<< " produced an inexact result";
277+
if (operationStatus != APFloat::opOK &&
278+
operationStatus != APFloat::opInexact) {
279+
return failure();
285280
}
281+
286282
results.push_back(rewriter.getFloatAttr(floatType, resultVal));
287283
return success();
288284
}

0 commit comments

Comments
 (0)