[Mlir-commits] [mlir] [mlir][spirv] Improve type constraints for SPIR-V Tosa CastOp (PR #192227)
Igor Wodiany
llvmlistbot at llvm.org
Wed Apr 15 09:52:50 PDT 2026
================
@@ -124,6 +124,10 @@ class TypeConstraintImplicationOn<string name, Type type, string other, list<Typ
Implies<ElementTypeIsPred<name, type>,
!foreach(allowedType, allowedTypes, ElementTypeIsPred<other, allowedType>)>>;
+class ElementTypeIsNot<string name, Type type> :
----------------
IgWod wrote:
Did you consider creating a new type, e.g., `SPIRV_TosaInt8Or16Or32` and using it as a constraint? So instead excluding I64 we would simply not include it. It will greatly benefits docs, since they list allowed type (e.g., https://mlir.llvm.org/docs/Dialects/SPIR-V/#results-273) and from the comprehension perspective you only have to look at one place to understand what types are allowed.
https://github.com/llvm/llvm-project/pull/192227
More information about the Mlir-commits
mailing list