[mlir][Math] Add more constant folder for Math ops.
authorjacquesguan <Jianjian.Guan@streamcomputing.com>
Mon, 21 Mar 2022 07:43:40 +0000 (15:43 +0800)
committerjacquesguan <Jianjian.Guan@streamcomputing.com>
Tue, 22 Mar 2022 02:23:15 +0000 (10:23 +0800)
commite609417cdc934c6101ca512b00edcf47d9aa4211
tree1595a45eba517921843b55e108522a1bfbcc406a
parent8e64d84995ddb317f8c79825069a3d2b0005551a
[mlir][Math] Add more constant folder for Math ops.

This revision add constant folder for abs, copysign, ctlz, cttz and
ctpop.

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