This enables us to use the common fold helpers on elementwise ops that
produce different result type than operand types, e.g., arith.cmpi or
arith.addui_extended.
Use the updated helper to teach arith.cmpi to fold constant vectors.
Paths
| Differential D143779
[mlir][arith] Allow to specify `constFoldBinaryOp` result type ClosedPublic Authored by kuhar on Feb 10 2023, 2:11 PM.
Details Summary This enables us to use the common fold helpers on elementwise ops that Use the updated helper to teach arith.cmpi to fold constant vectors.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Feb 13 2023, 8:54 AM
kuhar added inline comments.
Closed by commit rG892bf09606b6: [mlir][arith] Allow to specify `constFoldBinaryOp` result type (authored by kuhar). · Explain WhyFeb 13 2023, 11:20 AM This revision was automatically updated to reflect the committed changes. kuhar marked an inline comment as done.
Revision Contents
Diff 497054 mlir/include/mlir/Dialect/CommonFolders.h
mlir/lib/Dialect/Arith/IR/ArithOps.cpp
mlir/test/Dialect/Arith/canonicalize.mlir
mlir/test/Dialect/SCF/canonicalize.mlir
|
please make this change everywhere else too