[mlir][Math] Add constant folder for RoundEvenOp.
authorjacquesguan <Jianjian.Guan@streamcomputing.com>
Tue, 6 Sep 2022 09:11:20 +0000 (17:11 +0800)
committerjacquesguan <Jianjian.Guan@streamcomputing.com>
Wed, 7 Sep 2022 03:13:00 +0000 (11:13 +0800)
commitac66d87c4b964af9edff3667dd17776f7206cc6b
tree5789eed1745c40b66191957a22956ca4419156d6
parent73593145cb5b6bbb474e2c53153aabdb362731d5
[mlir][Math] Add constant folder for RoundEvenOp.

This patch uses roundeven/roundevenf of libm to fold RoundEvenOp of constant.

Differential Revision: https://reviews.llvm.org/D133344
mlir/include/mlir/Dialect/Math/IR/MathOps.td
mlir/lib/Dialect/Math/IR/MathOps.cpp
mlir/test/Dialect/Math/canonicalize.mlir