Implement constant folding for DivFOp
authorJackson Fellows <jtfellows@icloud.com>
Tue, 19 Jan 2021 22:41:45 +0000 (22:41 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Tue, 19 Jan 2021 23:08:06 +0000 (23:08 +0000)
commit1bf2b1665b43e1a5090177486c8fa6374a4596a2
tree77eff72a5c571252e6bdf3b99e6224adff2b00cb
parent96ef4f307df27f4e0946eb344bac2703017ad073
Implement constant folding for DivFOp

Add a constant folder for DivFOp. Analogous to existing folders for
AddFOp, SubFOp, and MulFOp. Matches the behavior of existing LLVM
constant folding (https://github.com/llvm/llvm-project/blob/999f5da6b3088fa4c0bb9d05b358d015ca74c71f/llvm/lib/IR/ConstantFold.cpp#L1432).

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D94939
mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
mlir/lib/Dialect/StandardOps/IR/Ops.cpp