[Mlir-commits] [mlir] [mlir][LinAlg] Vectorize reverse-like ops using vector.gather ops. (PR #83205)

Han-Chung Wang llvmlistbot at llvm.org
Tue Feb 27 16:34:09 PST 2024


================
@@ -891,8 +891,7 @@ static bool isContiguousLoadIdx(LinalgOp &linalgOp, Value &val,
 
   // Conservatively reject Ops that could lead to indices with stride other
   // than 1.
-  if (!isa<arith::AddIOp, arith::SubIOp, arith::ConstantOp, linalg::IndexOp>(
-          ancestor))
+  if (!isa<arith::AddIOp, arith::ConstantOp, linalg::IndexOp>(ancestor))
----------------
hanhanW wrote:

yeah, totally agree with what you said. Checking that the sub is of `the form index - loop_invariant` is also the thing in my mind, but I think @banach-space should weigh in, while he's OOO this week. I have few questions too:

1. Why do we add `sub` op to the list while there are no other tests about it.
2. I'm also wondering why the condition below be a `&=`.

Can we land this as what it is for now to unblock correctness issue, and follow-up on this after Andrzej is back?

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


More information about the Mlir-commits mailing list