[Mlir-commits] [mlir] [mlir][spirv] Add common SPIRV Extended Ops for Vectors (PR #122322)

Jakub Kuderski llvmlistbot at llvm.org
Fri Jan 17 09:32:36 PST 2025


================
@@ -1031,7 +1031,13 @@ def SPIRV_GLFMixOp :
 
 // -----
 
-def SPIRV_GLDistanceOp : SPIRV_GLOp<"Distance", 67, [Pure]> {
+def SPIRV_GLDistanceOp : SPIRV_GLOp<"Distance", 67, [
+    Pure,
+    AllElementTypesMatch<["p0", "p1"]>,
----------------
kuhar wrote:

Shouldn't this be `AllTypesMatch<["p0", "p1"]>`, not just the element types? Previously we had this condition:
`p0Vec.getShape() != llvm::dyn_cast<VectorType>(p1Type).getShape())`

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


More information about the Mlir-commits mailing list