[Mlir-commits] [mlir] [mlir][Vector] Improve vector.transferx store-to-load-forwarding (PR #171840)
Jakub Kuderski
llvmlistbot at llvm.org
Thu Dec 11 07:26:52 PST 2025
================
@@ -5118,6 +5118,23 @@ Speculation::Speculatability TransferReadOp::getSpeculatability() {
return Speculation::NotSpeculatable;
}
+/// Given a projected permutation, inverse an affine map, making the unused dims
+/// 0 in the result.
+static AffineMap inverseWithUnusedDims(AffineMap map) {
+ assert(map.isProjectedPermutation() &&
+ "expected a projected permutation map");
+ SmallVector<AffineExpr> results(map.getNumInputs(),
+ getAffineConstantExpr(0, map.getContext()));
+ for (auto [idx, result] : llvm::enumerate(map.getResults())) {
+ assert(isa<AffineDimExpr>(result) &&
+ "expected only dim exprs in a projected permutation map");
----------------
kuhar wrote:
nit: I'd turn this into a comment -- cast already asserts internally
https://github.com/llvm/llvm-project/pull/171840
More information about the Mlir-commits
mailing list