[llvm] [mlir][vector] Enable transfer op hoisting with dynamic indices (PR #68500)

Matthias Springer via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 15 16:30:12 PDT 2023


================
@@ -187,20 +187,26 @@ static LogicalResult testEquality(func::FuncOp funcOp) {
         op->emitOpError("invalid op");
         return WalkResult::skip();
       }
-      FailureOr<bool> equal = failure();
       if (op->hasAttr("compose")) {
-        equal = affine::fullyComposeAndCheckIfEqual(op->getOperand(0),
-                                                    op->getOperand(1));
-      } else {
-        equal = ValueBoundsConstraintSet::areEqual(op->getOperand(0),
-                                                   op->getOperand(1));
-      }
-      if (failed(equal)) {
-        op->emitError("could not determine equality");
-      } else if (*equal) {
-        op->emitRemark("equal");
+        FailureOr<int64_t> equal = affine::fullyComposeAndComputeConstantDelta(
----------------
matthias-springer wrote:

nit: variable could be renamed to `delta` here and below

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


More information about the llvm-commits mailing list