Add the following canonicalization
- and(x, 1) -> x
- subi(x, 0) -> x
Paths
| Differential D81534
[mlir][StandardDialect] Add some folding for operations in standard dialect. ClosedPublic Authored by mravishankar on Jun 9 2020, 11:55 PM.
Details Summary Add the following canonicalization
Diff Detail
Event Timelinemravishankar added reviewers: antiagainst, rriddle, nicolasvasilache, hanchung, asaadaldien.Jun 9 2020, 11:56 PM rriddle added inline comments. This revision now requires changes to proceed.Jun 10 2020, 11:07 AM mravishankar added inline comments.
mravishankar added inline comments.
mravishankar marked 3 inline comments as done. Comment ActionsAddress comments
mravishankar added inline comments.
This revision is now accepted and ready to land.Jun 15 2020, 1:35 PM Closed by commit rG462e3ccdd0d0: [mlir][StandardDialect] Add some folding for operations in standard dialect. (authored by mravishankar). · Explain WhyJun 15 2020, 11:04 PM This revision was automatically updated to reflect the committed changes. mravishankar marked an inline comment as done.
Revision Contents
Diff 270232 mlir/include/mlir/IR/Matchers.h
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
mlir/test/Transforms/constant-fold.mlir
|
clang-tidy: warning: invalid case style for class 'constant_int_dynamic_value_matcher' [readability-identifier-naming]
not useful