Skip to content

Commit b8f6271

Browse files
authored
Merge pull request #569 from Xilinx/liangta.remove_pdll_binary_arith_warning
Remove warning for inexact result in PDLL binary arithmetic operation
2 parents ee40aef + e91b337 commit b8f6271

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)