[Mlir-commits] [mlir] [mlir][spirv] Add pattern matching for arith.index_cast index to i1 for ArithToSPIRV (PR #156031)

Jakub Kuderski llvmlistbot at llvm.org
Tue Sep 2 10:15:55 PDT 2025


================
@@ -734,6 +734,14 @@ func.func @index_castui4(%arg0: index) {
   return
 }
 
+// CHECK-LABEL: index_castindexi1
+func.func @index_castindexi1(%arg0 : index) {
+  // CHECK: %[[ZERO:.+]] = spirv.Constant 0 : i32
+  // CHECK: spirv.INotEqual %[[ZERO]], %{{.+}} : i32
+  %0 = arith.index_cast %arg0 : index to i1
----------------
kuhar wrote:

Does this works with `arith.index_cast %arg0: vector<3xindex> to vector<3xi1>`?

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


More information about the Mlir-commits mailing list