[Mlir-commits] [mlir] [TOSA] Add pass to sanitize gather/scatter indices (PR #221200)
Luke Hutton
llvmlistbot at llvm.org
Mon Sep 7 03:47:54 PDT 2026
================
@@ -199,6 +199,24 @@ def TosaDowngrade1p1To1p0Pass
}];
}
+def TosaGatherScatterHardeningPass
+ : Pass<"tosa-gather-scatter-hardening", "func::FuncOp"> {
+ let summary = "Clamp TOSA gather and scatter indices to valid bounds";
+ let description = [{
+ Bounds the indices used by each gather and scatter with TOSA minimum and
+ maximum operations so that all accesses are in bounds. When the same
+ indices value is used by several gather or scatter operations that require
+ identical bounds, one bounding sequence is shared by all of them. Other
----------------
lhutton1 wrote:
I suspect this is something that can be tidied up with common sub expression elimination. To keep the pass simple, we can avoid doing this here
https://github.com/llvm/llvm-project/pull/221200
More information about the Mlir-commits
mailing list