This patch creates folds for cmpi( ext(%x : i1, iN) != 0) -> %x
In essence this matches patterns matching an extension of a boolean, that != 0, which is equivalent to the original condition.
Paths
| Differential D116504
[MLIR] Create fold for cmp of ext ClosedPublic Authored by wsmoses on Jan 2 2022, 3:28 PM.
Details
Summary This patch creates folds for cmpi( ext(%x : i1, iN) != 0) -> %x In essence this matches patterns matching an extension of a boolean, that != 0, which is equivalent to the original condition.
Diff Detail
Event TimelineHerald added subscribers: sdasgup3, wenzhicui, wrengr and 18 others. · View Herald TranscriptJan 2 2022, 3:28 PM This revision is now accepted and ready to land.Jan 2 2022, 4:41 PM Closed by commit rG1a0a177965e8: [MLIR] Create fold for cmp of ext (authored by wsmoses). · Explain WhyJan 2 2022, 4:49 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 396967 mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
mlir/test/Dialect/Arithmetic/canonicalize.mlir
|