Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/Dialect/SparseTensor/sparse_fill_zero.mlir
// RUN: mlir-opt %s --linalg-generalize-named-ops --sparsification --sparse-tensor-conversion --canonicalize --cse | FileCheck %s | // RUN: mlir-opt %s --linalg-generalize-named-ops --sparsification --sparse-tensor-conversion --canonicalize --cse | FileCheck %s | ||||
#DCSR = #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed" ] }> | #DCSR = #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed" ] }> | ||||
// CHECK-LABEL: func.func @fill_zero_after_alloc( | // CHECK-LABEL: func.func @fill_zero_after_alloc( | ||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>, | // CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>, | ||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<i8>) -> !llvm.ptr<i8> { | // CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<i8>) -> !llvm.ptr<i8> { | ||||
// CHECK-DAG: %[[VAL_2:.*]] = arith.constant 0.000000e+00 : f64 | // CHECK-DAG: %[[VAL_2:.*]] = arith.constant 0.000000e+00 : f64 | ||||
// CHECK-DAG: %[[VAL_3:.*]] = arith.constant 1 : i32 | // CHECK-DAG: %[[VAL_3:.*]] = arith.constant 1 : i32 | ||||
// CHECK-DAG: %[[VAL_4:.*]] = arith.constant 0 : i32 | // CHECK-DAG: %[[VAL_4:.*]] = arith.constant 0 : i32 | ||||
// CHECK-DAG: %[[VAL_5:.*]] = arith.constant 0 : index | // CHECK-DAG: %[[VAL_5:.*]] = arith.constant 0 : index | ||||
// CHECK-DAG: %[[VAL_6:.*]] = arith.constant 1 : index | // CHECK-DAG: %[[VAL_6:.*]] = arith.constant 1 : index | ||||
// CHECK-DAG: %[[VAL_7:.*]] = arith.constant false | // CHECK-DAG: %[[VAL_7:.*]] = arith.constant false | ||||
// CHECK-DAG: %[[VAL_8:.*]] = arith.constant true | // CHECK-DAG: %[[VAL_8:.*]] = arith.constant true | ||||
// CHECK-DAG: %[[VAL_9:.*]] = arith.constant 100 : index | // CHECK-DAG: %[[VAL_9:.*]] = arith.constant 100 : index | ||||
// CHECK-DAG: %[[VAL_10:.*]] = arith.constant 300 : index | // CHECK-DAG: %[[VAL_10:.*]] = arith.constant 300 : index | ||||
// CHECK-DAG: %[[VAL_11:.*]] = arith.constant 1 : i8 | // CHECK-DAG: %[[VAL_11:.*]] = arith.constant 8 : i8 | ||||
// CHECK: %[[VAL_12:.*]] = memref.alloca() : memref<2xi8> | // CHECK: %[[VAL_12:.*]] = memref.alloca() : memref<2xi8> | ||||
// CHECK: %[[VAL_13:.*]] = memref.cast %[[VAL_12]] : memref<2xi8> to memref<?xi8> | // CHECK: %[[VAL_13:.*]] = memref.cast %[[VAL_12]] : memref<2xi8> to memref<?xi8> | ||||
// CHECK: memref.store %[[VAL_11]], %[[VAL_12]]{{\[}}%[[VAL_5]]] : memref<2xi8> | // CHECK: memref.store %[[VAL_11]], %[[VAL_12]]{{\[}}%[[VAL_5]]] : memref<2xi8> | ||||
// CHECK: memref.store %[[VAL_11]], %[[VAL_12]]{{\[}}%[[VAL_6]]] : memref<2xi8> | // CHECK: memref.store %[[VAL_11]], %[[VAL_12]]{{\[}}%[[VAL_6]]] : memref<2xi8> | ||||
// CHECK: %[[VAL_14:.*]] = memref.alloca() : memref<2xindex> | // CHECK: %[[VAL_14:.*]] = memref.alloca() : memref<2xindex> | ||||
// CHECK: %[[VAL_15:.*]] = memref.cast %[[VAL_14]] : memref<2xindex> to memref<?xindex> | // CHECK: %[[VAL_15:.*]] = memref.cast %[[VAL_14]] : memref<2xindex> to memref<?xindex> | ||||
// CHECK: memref.store %[[VAL_9]], %[[VAL_14]]{{\[}}%[[VAL_5]]] : memref<2xindex> | // CHECK: memref.store %[[VAL_9]], %[[VAL_14]]{{\[}}%[[VAL_5]]] : memref<2xindex> | ||||
// CHECK: memref.store %[[VAL_10]], %[[VAL_14]]{{\[}}%[[VAL_6]]] : memref<2xindex> | // CHECK: memref.store %[[VAL_10]], %[[VAL_14]]{{\[}}%[[VAL_6]]] : memref<2xindex> | ||||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |