A bitwise and with the bitwise negate of itself is always 0, regardless of the integer type. This patch adds detection of such a pattern in arith.andis fold method.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Paths
| Differential D131860
[mlir][arith] Fold `andi x, not(x)` to zero ClosedPublic Authored by zero9178 on Aug 14 2022, 7:32 AM.
Details Summary A bitwise and with the bitwise negate of itself is always 0, regardless of the integer type. This patch adds detection of such a pattern in arith.andis fold method.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Aug 24 2022, 3:42 AM Closed by commit rGb0e515c9a00c: [mlir][arith] Fold `andi x, not(x)` to zero (authored by zero9178). · Explain WhyAug 24 2022, 4:10 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 455153 mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
mlir/test/Dialect/Arithmetic/canonicalize.mlir
|