Introduce several canonicalizations of standard operations:
- Canonicalizatinos for sub/add of a constant and another sub/add of a constant
- Sign Extend folds
- Not of icmp becomes a signle icmp
- Branch propagation
- Index cast of sign extend
Paths
| Differential D101705
Several canonicalizations of standard ops (add, sub, cast). ClosedPublic Authored by wsmoses on May 1 2021, 7:58 PM.
Details Summary Introduce several canonicalizations of standard operations:
Diff Detail
Event TimelineHerald added subscribers: dcaballe, cota, teijeong and 16 others. · View Herald TranscriptMay 1 2021, 7:59 PM
This revision now requires changes to proceed.May 1 2021, 8:16 PM Comment Actions I wonder if there is some way of writing these without so much repetition...
Closed by commit rG039bdcc0a8a2: [MLIR] Canonicalize sub/add of a constant and another sub/add of a constant (authored by wsmoses). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 342411 mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
mlir/test/Dialect/Standard/canonicalize.mlir
|
Note: addi is commutative and commutative operations have their constant operand canonicalized to RHS. So does this need to check for constants both sides?