[Mlir-commits] [mlir] [mlir][tosa] Add integer type conversion pass (PR #232853)

Luke Hutton llvmlistbot at llvm.org
Fri Oct 23 04:13:06 PDT 2026


================
@@ -217,6 +217,40 @@ def TosaGatherScatterHardeningPass
   }];
 }
 
+def TosaConvertIntegerTypesPass : Pass<"tosa-convert-integer-types", "ModuleOp"> {
+  let summary = "Convert selected TOSA integer types";
+  let description = [{
+    Converts integer types using `bitwidth-mappings`, a required list of
+    `<source>:<destination>` bitwidth pairs.
+    A typical use case is `bitwidth-mappings=4:8,48:64` which maps i4 and i48 to
+    i8 and i64 respectively.
+    Source bitwidths 1, 32 and 64 are not supported because some attributes
+    require these fixed widths.
+
+    Mappings apply once to the original width, preserving signedness and
----------------
lhutton1 wrote:

My expectation is that this pass is only expected to be run on signless values, since it needs to run after tosa-validation. Given this, can the conversion logic be simplified?

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


More information about the Mlir-commits mailing list