diff --git a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp --- a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp +++ b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp @@ -761,15 +761,10 @@ //===----------------------------------------------------------------------===// OpFoldResult arith::MulFOp::fold(ArrayRef operands) { - APFloat floatValue(0.0f), inverseValue(0.0f); // mulf(x, 1) -> x if (matchPattern(getRhs(), m_OneFloat())) return getLhs(); - // mulf(1, x) -> x - if (matchPattern(getLhs(), m_OneFloat())) - return getRhs(); - return constFoldBinaryOp( operands, [](const APFloat &a, const APFloat &b) { return a * b; }); } @@ -779,7 +774,6 @@ //===----------------------------------------------------------------------===// OpFoldResult arith::DivFOp::fold(ArrayRef operands) { - APFloat floatValue(0.0f), inverseValue(0.0f); // divf(x, 1) -> x if (matchPattern(getRhs(), m_OneFloat())) return getLhs();