[Mlir-commits] [mlir] [ mlir][scf] Allow 'ult'/'ugt' in uplift (PR #139911)

Ivan Butygin llvmlistbot at llvm.org
Wed May 14 07:51:47 PDT 2025


================
@@ -91,9 +91,10 @@ FailureOr<scf::ForOp> mlir::scf::upliftWhileToForLoop(RewriterBase &rewriter,
 
   using Pred = arith::CmpIPredicate;
   Pred predicate = cmp.getPredicate();
-  if (predicate != Pred::slt && predicate != Pred::sgt)
+  if (predicate != Pred::slt && predicate != Pred::sgt &&
+      predicate != Pred::ult && predicate != Pred::ugt)
----------------
Hardcode84 wrote:

+1, Maybe better approach will be to try to convert unsigned comparisons to signed first (e.g. using int range analysis).

https://github.com/llvm/llvm-project/pull/139911


More information about the Mlir-commits mailing list