[Mlir-commits] [mlir] [mlir] [arith] Remove buggy illegal operation in --arith-unsigned-when-equivalent (PR #87298)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Apr 1 17:48:48 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
@llvm/pr-subscribers-mlir-arith
Author: Fehr Mathieu (math-fehr)
<details>
<summary>Changes</summary>
`CeilDivUIOp` seemed to have been added by mistake to the list of dynamically
illegal operations in `arith-unsigned-when-equivalent`. The only illegal operations
should be the signed operations that can be converted to their unsigned counterpart.
---
Full diff: https://github.com/llvm/llvm-project/pull/87298.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/Arith/Transforms/UnsignedWhenEquivalent.cpp (+5-6)
``````````diff
diff --git a/mlir/lib/Dialect/Arith/Transforms/UnsignedWhenEquivalent.cpp b/mlir/lib/Dialect/Arith/Transforms/UnsignedWhenEquivalent.cpp
index 53f2008324f054..4edce84bafd416 100644
--- a/mlir/lib/Dialect/Arith/Transforms/UnsignedWhenEquivalent.cpp
+++ b/mlir/lib/Dialect/Arith/Transforms/UnsignedWhenEquivalent.cpp
@@ -125,12 +125,11 @@ struct ArithUnsignedWhenEquivalentPass
ConversionTarget target(*ctx);
target.addLegalDialect<ArithDialect>();
- target
- .addDynamicallyLegalOp<DivSIOp, CeilDivSIOp, CeilDivUIOp, FloorDivSIOp,
- RemSIOp, MinSIOp, MaxSIOp, ExtSIOp>(
- [&solver](Operation *op) -> std::optional<bool> {
- return failed(staticallyNonNegative(solver, op));
- });
+ target.addDynamicallyLegalOp<DivSIOp, CeilDivSIOp, FloorDivSIOp, RemSIOp,
+ MinSIOp, MaxSIOp, ExtSIOp>(
+ [&solver](Operation *op) -> std::optional<bool> {
+ return failed(staticallyNonNegative(solver, op));
+ });
target.addDynamicallyLegalOp<CmpIOp>(
[&solver](CmpIOp op) -> std::optional<bool> {
return failed(isCmpIConvertable(solver, op));
``````````
</details>
https://github.com/llvm/llvm-project/pull/87298
More information about the Mlir-commits
mailing list