brintos

brintos / llvm-project-archived public Read only

0
0
Text · 695 B · 1a1c24a Raw
22 lines · plain
1// RUN: mlir-opt --convert-scf-to-spirv %s | FileCheck %s2 3// `scf.parallel` conversion is not supported yet.4// Make sure that we do not accidentally invalidate this function by removing5// `scf.reduce`.6// CHECK-LABEL: func.func @func7// CHECK:         scf.parallel8// CHECK-NEXT:      spirv.Constant9// CHECK-NEXT:      memref.store10// CHECK-NEXT:      scf.reduce11// CHECK:         spirv.Return12func.func @func(%arg0: i64) {13  %0 = arith.index_cast %arg0 : i64 to index14  %alloc = memref.alloc() : memref<16xf32>15  scf.parallel (%arg1) = (%0) to (%0) step (%0) {16    %cst = arith.constant 1.000000e+00 : f3217    memref.store %cst, %alloc[%arg1] : memref<16xf32>18    scf.reduce19  }20  return21}22