[Mlir-commits] [mlir] e03f16f - [mlir] [arith] Remove buggy illegal operation in --arith-unsigned-when-equivalent (#87298)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Apr 2 06:47:32 PDT 2024


Author: Fehr Mathieu
Date: 2024-04-02T14:47:27+01:00
New Revision: e03f16f9fdfcb36ed05842f43f542107a0d46288

URL: https://github.com/llvm/llvm-project/commit/e03f16f9fdfcb36ed05842f43f542107a0d46288
DIFF: https://github.com/llvm/llvm-project/commit/e03f16f9fdfcb36ed05842f43f542107a0d46288.diff

LOG: [mlir] [arith] Remove buggy illegal operation in --arith-unsigned-when-equivalent (#87298)

`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.

Added: 
    

Modified: 
    mlir/lib/Dialect/Arith/Transforms/UnsignedWhenEquivalent.cpp

Removed: 
    


################################################################################
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));


        


More information about the Mlir-commits mailing list