[mlir][Math] Add constant folder for LogOp.
authorjacquesguan <Jianjian.Guan@streamcomputing.com>
Wed, 20 Jul 2022 06:47:25 +0000 (14:47 +0800)
committerjacquesguan <Jianjian.Guan@streamcomputing.com>
Thu, 21 Jul 2022 02:58:32 +0000 (10:58 +0800)
commit9c22853ec40a8a464dc00e22b78c73bde8c67b2d
tree2655e83594216b7c484cbbe00be4e9505f30b463
parent8c124c908857f7018ed032011046a2a38faf2307
[mlir][Math] Add constant folder for LogOp.

This patch adds constant folder for LogOp which only supports single and double precision floating-point.

Reviewed By: ftynse

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