[Mlir-commits] [mlir] 42431b8 - [tests] Make testsuite more resilient to "order of constant" changes. NFC.
Chris Lattner
llvmlistbot at llvm.org
Wed Sep 8 10:24:17 PDT 2021
Author: Chris Lattner
Date: 2021-09-08T10:10:10-07:00
New Revision: 42431b8207a50e2810c9fe2051226e71adb8fc9a
URL: https://github.com/llvm/llvm-project/commit/42431b8207a50e2810c9fe2051226e71adb8fc9a
DIFF: https://github.com/llvm/llvm-project/commit/42431b8207a50e2810c9fe2051226e71adb8fc9a.diff
LOG: [tests] Make testsuite more resilient to "order of constant" changes. NFC.
Added:
Modified:
mlir/test/Dialect/GPU/all-reduce-max.mlir
mlir/test/Dialect/GPU/all-reduce.mlir
mlir/test/Dialect/Linalg/bufferize.mlir
mlir/test/Dialect/Linalg/generalize-pad-tensor.mlir
mlir/test/Dialect/Linalg/loops.mlir
mlir/test/Dialect/Math/polynomial-approximation.mlir
mlir/test/Dialect/SPIRV/Transforms/canonicalize.mlir
mlir/test/Dialect/Shape/canonicalize.mlir
mlir/test/Dialect/SparseTensor/sparse_1d.mlir
mlir/test/Dialect/SparseTensor/sparse_2d.mlir
mlir/test/Dialect/SparseTensor/sparse_3d.mlir
mlir/test/Dialect/SparseTensor/sparse_fp_ops.mlir
mlir/test/Dialect/SparseTensor/sparse_int_ops.mlir
mlir/test/Dialect/SparseTensor/sparse_lower.mlir
mlir/test/Dialect/SparseTensor/sparse_lower_col.mlir
mlir/test/Dialect/SparseTensor/sparse_lower_inplace.mlir
mlir/test/Dialect/SparseTensor/sparse_out.mlir
mlir/test/Dialect/SparseTensor/sparse_perm.mlir
mlir/test/Dialect/Vector/vector-contract-transforms.mlir
Removed:
################################################################################
diff --git a/mlir/test/Dialect/GPU/all-reduce-max.mlir b/mlir/test/Dialect/GPU/all-reduce-max.mlir
index 5995a9209a885..9ae30cd844e05 100644
--- a/mlir/test/Dialect/GPU/all-reduce-max.mlir
+++ b/mlir/test/Dialect/GPU/all-reduce-max.mlir
@@ -7,15 +7,15 @@ gpu.module @kernels {
// CHECK-LABEL: gpu.func @kernel(
// CHECK-SAME: [[VAL_0:%.*]]: f32) workgroup([[VAL_1:%.*]] : memref<32xf32, 3>) kernel {
gpu.func @kernel(%arg0 : f32) kernel {
- // CHECK: [[VAL_2:%.*]] = constant 31 : i32
- // CHECK: [[VAL_3:%.*]] = constant 0 : i32
- // CHECK: [[VAL_4:%.*]] = constant 0 : index
- // CHECK: [[VAL_5:%.*]] = constant 32 : i32
- // CHECK: [[VAL_6:%.*]] = constant 1 : i32
- // CHECK: [[VAL_7:%.*]] = constant 2 : i32
- // CHECK: [[VAL_8:%.*]] = constant 4 : i32
- // CHECK: [[VAL_9:%.*]] = constant 8 : i32
- // CHECK: [[VAL_10:%.*]] = constant 16 : i32
+ // CHECK-DAG: [[VAL_2:%.*]] = constant 31 : i32
+ // CHECK-DAG: [[VAL_3:%.*]] = constant 0 : i32
+ // CHECK-DAG: [[VAL_4:%.*]] = constant 0 : index
+ // CHECK-DAG: [[VAL_5:%.*]] = constant 32 : i32
+ // CHECK-DAG: [[VAL_6:%.*]] = constant 1 : i32
+ // CHECK-DAG: [[VAL_7:%.*]] = constant 2 : i32
+ // CHECK-DAG: [[VAL_8:%.*]] = constant 4 : i32
+ // CHECK-DAG: [[VAL_9:%.*]] = constant 8 : i32
+ // CHECK-DAG: [[VAL_10:%.*]] = constant 16 : i32
// CHECK: [[VAL_11:%.*]] = "gpu.block_dim"() {dimension = "x"} : () -> index
// CHECK: [[VAL_12:%.*]] = index_cast [[VAL_11]] : index to i32
// CHECK: [[VAL_13:%.*]] = "gpu.block_dim"() {dimension = "y"} : () -> index
diff --git a/mlir/test/Dialect/GPU/all-reduce.mlir b/mlir/test/Dialect/GPU/all-reduce.mlir
index 22e91a6bb6c7a..12aefc9751e0a 100644
--- a/mlir/test/Dialect/GPU/all-reduce.mlir
+++ b/mlir/test/Dialect/GPU/all-reduce.mlir
@@ -7,15 +7,15 @@ gpu.module @kernels {
// CHECK-LABEL: gpu.func @kernel(
// CHECK-SAME: [[VAL_0:%.*]]: f32) workgroup([[VAL_1:%.*]] : memref<32xf32, 3>) kernel {
gpu.func @kernel(%arg0 : f32) kernel {
- // CHECK: [[VAL_2:%.*]] = constant 31 : i32
- // CHECK: [[VAL_3:%.*]] = constant 0 : i32
- // CHECK: [[VAL_4:%.*]] = constant 0 : index
- // CHECK: [[VAL_5:%.*]] = constant 32 : i32
- // CHECK: [[VAL_6:%.*]] = constant 1 : i32
- // CHECK: [[VAL_7:%.*]] = constant 2 : i32
- // CHECK: [[VAL_8:%.*]] = constant 4 : i32
- // CHECK: [[VAL_9:%.*]] = constant 8 : i32
- // CHECK: [[VAL_10:%.*]] = constant 16 : i32
+ // CHECK-DAG: [[VAL_2:%.*]] = constant 31 : i32
+ // CHECK-DAG: [[VAL_3:%.*]] = constant 0 : i32
+ // CHECK-DAG: [[VAL_4:%.*]] = constant 0 : index
+ // CHECK-DAG: [[VAL_5:%.*]] = constant 32 : i32
+ // CHECK-DAG: [[VAL_6:%.*]] = constant 1 : i32
+ // CHECK-DAG: [[VAL_7:%.*]] = constant 2 : i32
+ // CHECK-DAG: [[VAL_8:%.*]] = constant 4 : i32
+ // CHECK-DAG: [[VAL_9:%.*]] = constant 8 : i32
+ // CHECK-DAG: [[VAL_10:%.*]] = constant 16 : i32
// CHECK: [[VAL_11:%.*]] = "gpu.block_dim"() {dimension = "x"} : () -> index
// CHECK: [[VAL_12:%.*]] = index_cast [[VAL_11]] : index to i32
// CHECK: [[VAL_13:%.*]] = "gpu.block_dim"() {dimension = "y"} : () -> index
diff --git a/mlir/test/Dialect/Linalg/bufferize.mlir b/mlir/test/Dialect/Linalg/bufferize.mlir
index 93dbf4a563675..86a3f2cbc5cc8 100644
--- a/mlir/test/Dialect/Linalg/bufferize.mlir
+++ b/mlir/test/Dialect/Linalg/bufferize.mlir
@@ -281,10 +281,10 @@ func @pad_tensor_dynamic_shape(%arg0: tensor<4x?x2x?xf32>, %arg1: index) -> tens
return %out : tensor<4x?x?x?xf32>
}
-// CHECK: %[[C3:.*]] = constant 3 : index
-// CHECK: %[[C2:.*]] = constant 2 : index
-// CHECK: %[[C1:.*]] = constant 1 : index
-// CHECK: %[[CST:.*]] = constant 0.000000e+00 : f32
+// CHECK-DAG: %[[C3:.*]] = constant 3 : index
+// CHECK-DAG: %[[C2:.*]] = constant 2 : index
+// CHECK-DAG: %[[C1:.*]] = constant 1 : index
+// CHECK-DAG: %[[CST:.*]] = constant 0.000000e+00 : f32
// CHECK: %[[DIM1:.*]] = tensor.dim %[[IN]], %[[C1]] : tensor<4x?x2x?xf32>
// CHECK: %[[OUT_DIM2:.*]] = addi %[[OFFSET]], %[[C2]] : index
// CHECK: %[[DIM3:.*]] = tensor.dim %[[IN]], %[[C3]] : tensor<4x?x2x?xf32>
diff --git a/mlir/test/Dialect/Linalg/generalize-pad-tensor.mlir b/mlir/test/Dialect/Linalg/generalize-pad-tensor.mlir
index 9572ee6d1b356..53c8a3836f147 100644
--- a/mlir/test/Dialect/Linalg/generalize-pad-tensor.mlir
+++ b/mlir/test/Dialect/Linalg/generalize-pad-tensor.mlir
@@ -19,11 +19,11 @@ func @generalize_pad_tensor_static_shape(%arg0: tensor<1x28x28x1xf32>) -> tensor
// CHECK-LABEL: func @generalize_pad_tensor_dynamic_shape(
// CHECK-SAME: %[[IN:.*]]: tensor<4x?x2x?xf32>,
// CHECK-SAME: %[[OFFSET:.*]]: index) -> tensor<4x?x?x?xf32> {
-// CHECK: %[[C0:.*]] = constant 0 : index
-// CHECK: %[[CST:.*]] = constant 0.000000e+00 : f32
-// CHECK: %[[C2:.*]] = constant 2 : index
-// CHECK: %[[C1:.*]] = constant 1 : index
-// CHECK: %[[C3:.*]] = constant 3 : index
+// CHECK-DAG: %[[C0:.*]] = constant 0 : index
+// CHECK-DAG: %[[CST:.*]] = constant 0.000000e+00 : f32
+// CHECK-DAG: %[[C2:.*]] = constant 2 : index
+// CHECK-DAG: %[[C1:.*]] = constant 1 : index
+// CHECK-DAG: %[[C3:.*]] = constant 3 : index
// CHECK: %[[DIM1:.*]] = tensor.dim %[[IN]], %[[C1]] : tensor<4x?x2x?xf32>
// CHECK: %[[OUT_DIM2:.*]] = addi %[[OFFSET]], %[[C2]] : index
// CHECK: %[[DIM3:.*]] = tensor.dim %[[IN]], %[[C3]] : tensor<4x?x2x?xf32>
diff --git a/mlir/test/Dialect/Linalg/loops.mlir b/mlir/test/Dialect/Linalg/loops.mlir
index 15e3669388a46..718dd2f9a789f 100644
--- a/mlir/test/Dialect/Linalg/loops.mlir
+++ b/mlir/test/Dialect/Linalg/loops.mlir
@@ -1365,9 +1365,9 @@ func @conv3d_no_symbols(%in : memref<?x?x?xf32>, %filter : memref<?x?x?xf32>, %o
// CHECK-SAME: %[[arg0:[a-zA-Z0-9]+]]: memref<?x?x?xf32>
// CHECK-SAME: %[[arg1:[a-zA-Z0-9]+]]: memref<?x?x?xf32>
// CHECK-SAME: %[[arg2:[a-zA-Z0-9]+]]: memref<?x?x?xf32>
-// CHECK: %[[c2:.*]] = constant 2 : index
-// CHECK: %[[c0:.*]] = constant 0 : index
-// CHECK: %[[c1:.*]] = constant 1 : index
+// CHECK-DAG: %[[c2:.*]] = constant 2 : index
+// CHECK-DAG: %[[c0:.*]] = constant 0 : index
+// CHECK-DAG: %[[c1:.*]] = constant 1 : index
// CHECK: %[[dim0:.*]] = memref.dim %[[arg1]], %[[c0]] : memref<?x?x?xf32>
// CHECK: %[[dim1:.*]] = memref.dim %[[arg1]], %[[c1]] : memref<?x?x?xf32>
// CHECK: %[[dim2:.*]] = memref.dim %[[arg1]], %[[c2]] : memref<?x?x?xf32>
@@ -1396,9 +1396,9 @@ func @conv3d_no_symbols(%in : memref<?x?x?xf32>, %filter : memref<?x?x?xf32>, %o
// CHECKPARALLEL-SAME: %[[arg0:[a-zA-Z0-9]+]]: memref<?x?x?xf32>
// CHECKPARALLEL-SAME: %[[arg1:[a-zA-Z0-9]+]]: memref<?x?x?xf32>
// CHECKPARALLEL-SAME: %[[arg2:[a-zA-Z0-9]+]]: memref<?x?x?xf32>
-// CHECKPARALLEL: %[[c2:.*]] = constant 2 : index
-// CHECKPARALLEL: %[[c0:.*]] = constant 0 : index
-// CHECKPARALLEL: %[[c1:.*]] = constant 1 : index
+// CHECKPARALLEL-DAG: %[[c2:.*]] = constant 2 : index
+// CHECKPARALLEL-DAG: %[[c0:.*]] = constant 0 : index
+// CHECKPARALLEL-DAG: %[[c1:.*]] = constant 1 : index
// CHECKPARALLEL: %[[dim0:.*]] = memref.dim %[[arg1]], %[[c0]] : memref<?x?x?xf32>
// CHECKPARALLEL: %[[dim1:.*]] = memref.dim %[[arg1]], %[[c1]] : memref<?x?x?xf32>
// CHECKPARALLEL: %[[dim2:.*]] = memref.dim %[[arg1]], %[[c2]] : memref<?x?x?xf32>
diff --git a/mlir/test/Dialect/Math/polynomial-approximation.mlir b/mlir/test/Dialect/Math/polynomial-approximation.mlir
index a3092bfeb2954..1ba20584acbe7 100644
--- a/mlir/test/Dialect/Math/polynomial-approximation.mlir
+++ b/mlir/test/Dialect/Math/polynomial-approximation.mlir
@@ -5,20 +5,20 @@
// CHECK-LABEL: func @exp_scalar(
// CHECK-SAME: %[[VAL_0:.*]]: f32) -> f32 {
-// CHECK: %[[VAL_1:.*]] = constant 0.693147182 : f32
-// CHECK: %[[VAL_2:.*]] = constant 1.44269502 : f32
-// CHECK: %[[VAL_3:.*]] = constant 1.000000e+00 : f32
-// CHECK: %[[VAL_4:.*]] = constant 0.499705136 : f32
-// CHECK: %[[VAL_5:.*]] = constant 0.168738902 : f32
-// CHECK: %[[VAL_6:.*]] = constant 0.0366896503 : f32
-// CHECK: %[[VAL_7:.*]] = constant 1.314350e-02 : f32
-// CHECK: %[[VAL_8:.*]] = constant 23 : i32
-// CHECK: %[[VAL_9:.*]] = constant 0.000000e+00 : f32
-// CHECK: %[[VAL_10:.*]] = constant 0x7F800000 : f32
-// CHECK: %[[VAL_11:.*]] = constant 0xFF800000 : f32
-// CHECK: %[[VAL_12:.*]] = constant 1.17549435E-38 : f32
-// CHECK: %[[VAL_13:.*]] = constant 127 : i32
-// CHECK: %[[VAL_14:.*]] = constant -127 : i32
+// CHECK-DAG: %[[VAL_1:.*]] = constant 0.693147182 : f32
+// CHECK-DAG: %[[VAL_2:.*]] = constant 1.44269502 : f32
+// CHECK-DAG: %[[VAL_3:.*]] = constant 1.000000e+00 : f32
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0.499705136 : f32
+// CHECK-DAG: %[[VAL_5:.*]] = constant 0.168738902 : f32
+// CHECK-DAG: %[[VAL_6:.*]] = constant 0.0366896503 : f32
+// CHECK-DAG: %[[VAL_7:.*]] = constant 1.314350e-02 : f32
+// CHECK-DAG: %[[VAL_8:.*]] = constant 23 : i32
+// CHECK-DAG: %[[VAL_9:.*]] = constant 0.000000e+00 : f32
+// CHECK-DAG: %[[VAL_10:.*]] = constant 0x7F800000 : f32
+// CHECK-DAG: %[[VAL_11:.*]] = constant 0xFF800000 : f32
+// CHECK-DAG: %[[VAL_12:.*]] = constant 1.17549435E-38 : f32
+// CHECK-DAG: %[[VAL_13:.*]] = constant 127 : i32
+// CHECK-DAG: %[[VAL_14:.*]] = constant -127 : i32
// CHECK: %[[VAL_15:.*]] = mulf %[[VAL_0]], %[[VAL_2]] : f32
// CHECK: %[[VAL_16:.*]] = floorf %[[VAL_15]] : f32
// CHECK: %[[VAL_17:.*]] = mulf %[[VAL_16]], %[[VAL_1]] : f32
@@ -65,9 +65,9 @@ func @exp_vector(%arg0: vector<8xf32>) -> vector<8xf32> {
// CHECK-LABEL: func @expm1_scalar(
// CHECK-SAME: %[[X:.*]]: f32) -> f32 {
-// CHECK: %[[CST_MINUSONE:.*]] = constant -1.000000e+00 : f32
-// CHECK: %[[CST_LOG2E:.*]] = constant 1.44269502 : f32
-// CHECK: %[[CST_ONE:.*]] = constant 1.000000e+00 : f32
+// CHECK-DAG: %[[CST_MINUSONE:.*]] = constant -1.000000e+00 : f32
+// CHECK-DAG: %[[CST_LOG2E:.*]] = constant 1.44269502 : f32
+// CHECK-DAG: %[[CST_ONE:.*]] = constant 1.000000e+00 : f32
// CHECK: %[[BEGIN_EXP_X:.*]] = mulf %[[X]], %[[CST_LOG2E]] : f32
// CHECK-NOT: exp
// CHECK-COUNT-2: select
diff --git a/mlir/test/Dialect/SPIRV/Transforms/canonicalize.mlir b/mlir/test/Dialect/SPIRV/Transforms/canonicalize.mlir
index 99748294c0635..37553fd4f23a0 100644
--- a/mlir/test/Dialect/SPIRV/Transforms/canonicalize.mlir
+++ b/mlir/test/Dialect/SPIRV/Transforms/canonicalize.mlir
@@ -339,9 +339,9 @@ func @const_fold_scalar_isub_flow() -> (i32, i32, i32, i32) {
// 0xffff ffff - 0x7fff ffff -> 0xffff ffff + 0x8000 0001 = 0x1 8000 0000
// CHECK-DAG: spv.Constant -2147483648
// 0x0000 0001 - 0xffff ffff -> 0x0000 0001 + 0x0000 0001 = 0x0000 0002
- // CHECK-DAG: spv.Constant 2
+ // CHECK-DAG: spv.Constant 2 :
// 0x0000 0000 - 0xffff ffff -> 0x0000 0000 + 0x0000 0001 = 0x0000 0001
- // CHECK-DAG: spv.Constant 1
+ // CHECK-DAG: spv.Constant 1 :
// 0xffff fffe - 0x7fff ffff -> 0xffff fffe + 0x8000 0001 = 0x1 7fff ffff
// CHECK-DAG: spv.Constant 2147483647
%0 = spv.ISub %c1, %c3 : i32
diff --git a/mlir/test/Dialect/Shape/canonicalize.mlir b/mlir/test/Dialect/Shape/canonicalize.mlir
index a929e4d0d3e1a..b32b7ac9052cb 100644
--- a/mlir/test/Dialect/Shape/canonicalize.mlir
+++ b/mlir/test/Dialect/Shape/canonicalize.mlir
@@ -12,8 +12,8 @@ func @f(%arg0: tensor<2x3x4xf32>) -> tensor<?xindex> {
// Basic case.
// CHECK-LABEL: func @f
func @f() -> (!shape.shape, !shape.shape) {
- // CHECK: shape.const_shape [2, 3] : !shape.shape
- // CHECK: shape.const_shape [4, 5] : !shape.shape
+ // CHECK-DAG: shape.const_shape [2, 3] : !shape.shape
+ // CHECK-DAG: shape.const_shape [4, 5] : !shape.shape
%c2 = constant 2 : index
%0 = shape.const_shape [2, 3, 4, 5] : !shape.shape
%head, %tail = "shape.split_at"(%0, %c2) : (!shape.shape, index) -> (!shape.shape, !shape.shape)
@@ -26,8 +26,8 @@ func @f() -> (!shape.shape, !shape.shape) {
// Negative split point.
// CHECK-LABEL: func @f
func @f() -> (!shape.shape, !shape.shape) {
- // CHECK: shape.const_shape [2, 3, 4] : !shape.shape
- // CHECK: shape.const_shape [5] : !shape.shape
+ // CHECK-DAG: shape.const_shape [2, 3, 4] : !shape.shape
+ // CHECK-DAG: shape.const_shape [5] : !shape.shape
%c-1 = constant -1 : index
%0 = shape.const_shape [2, 3, 4, 5] : !shape.shape
%head, %tail = "shape.split_at"(%0, %c-1) : (!shape.shape, index) -> (!shape.shape, !shape.shape)
diff --git a/mlir/test/Dialect/SparseTensor/sparse_1d.mlir b/mlir/test/Dialect/SparseTensor/sparse_1d.mlir
index 26bfe409c6e67..47ee7005881d7 100644
--- a/mlir/test/Dialect/SparseTensor/sparse_1d.mlir
+++ b/mlir/test/Dialect/SparseTensor/sparse_1d.mlir
@@ -77,10 +77,10 @@ func @mul_d(%arga: tensor<32xf32, #DV>, %argb: f32, %argx: tensor<32xf32>) -> te
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: f32,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32xf32>) -> tensor<32xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant true
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant true
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -281,10 +281,10 @@ func @mul_dd(%arga: tensor<32xf32, #DV>, %argb: tensor<32xf32>, %argx: tensor<32
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xf32>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32xf32>) -> tensor<32xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant true
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant true
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = memref.buffer_cast %[[VAL_0]] : memref<32xf32>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.pointers %[[VAL_1]], %[[VAL_4]] : tensor<32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.indices %[[VAL_1]], %[[VAL_4]] : tensor<32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
@@ -377,10 +377,10 @@ func @mul_ds(%arga: tensor<32xf32>, %argb: tensor<32xf32, #SV>, %argx: tensor<32
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32xf32>) -> tensor<32xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant true
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant true
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -1085,9 +1085,9 @@ func @sum_reduction_inv(%arga: tensor<16xf32, #SV>,
// CHECK-SAME: %[[VAL_2:.*2]]: tensor<?xf64>,
// CHECK-SAME: %[[VAL_3:.*3]]: tensor<?xf64, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_4:.*]]: tensor<?xf64>) -> tensor<?xf64> {
-// CHECK: %[[VAL_5:.*]] = constant 0 : index
-// CHECK: %[[VAL_6:.*]] = constant true
-// CHECK: %[[VAL_7:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant true
+// CHECK-DAG: %[[VAL_7:.*]] = constant 1 : index
// CHECK: %[[VAL_8:.*]] = memref.buffer_cast %[[VAL_0]] : memref<?xf64>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.pointers %[[VAL_1]], %[[VAL_5]] : tensor<?xf64, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_10:.*]] = sparse_tensor.indices %[[VAL_1]], %[[VAL_5]] : tensor<?xf64, #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
diff --git a/mlir/test/Dialect/SparseTensor/sparse_2d.mlir b/mlir/test/Dialect/SparseTensor/sparse_2d.mlir
index ffc6e8de3a9ad..4aee9bbd29d2b 100644
--- a/mlir/test/Dialect/SparseTensor/sparse_2d.mlir
+++ b/mlir/test/Dialect/SparseTensor/sparse_2d.mlir
@@ -94,11 +94,11 @@ func @mul_dd(%arga: tensor<32x16xf32, #Tdd>, %argb: tensor<32x16xf32>, %argx: te
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16xf32>) -> tensor<32x16xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 16 : index
-// CHECK: %[[VAL_5:.*]] = constant 0 : index
-// CHECK: %[[VAL_6:.*]] = constant true
-// CHECK: %[[VAL_7:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant true
+// CHECK-DAG: %[[VAL_7:.*]] = constant 1 : index
// CHECK: %[[VAL_8:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_7]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_7]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_10:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -158,9 +158,9 @@ func @add_ds(%arga: tensor<32x16xf32, #Tds>, %argb: tensor<32x16xf32>, %argx: te
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16xf32>) -> tensor<32x16xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK: %[[VAL_6:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_5]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_5]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -198,11 +198,11 @@ func @mul_ds(%arga: tensor<32x16xf32, #Tds>, %argb: tensor<32x16xf32>, %argx: te
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16xf32>) -> tensor<32x16xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 16 : index
-// CHECK: %[[VAL_5:.*]] = constant true
-// CHECK: %[[VAL_6:.*]] = constant 0 : index
-// CHECK: %[[VAL_7:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant true
+// CHECK-DAG: %[[VAL_6:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_7:.*]] = constant 1 : index
// CHECK: %[[VAL_8:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_6]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_6]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_10:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -267,9 +267,9 @@ func @add_sd(%arga: tensor<32x16xf32, #Tsd>, %argb: tensor<32x16xf32>, %argx: te
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16xf32>) -> tensor<32x16xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 16 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK: %[[VAL_6:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -308,11 +308,11 @@ func @mul_sd(%arga: tensor<32x16xf32, #Tsd>, %argb: tensor<32x16xf32>, %argx: te
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16xf32>) -> tensor<32x16xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 16 : index
-// CHECK: %[[VAL_5:.*]] = constant true
-// CHECK: %[[VAL_6:.*]] = constant 0 : index
-// CHECK: %[[VAL_7:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant true
+// CHECK-DAG: %[[VAL_6:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_7:.*]] = constant 1 : index
// CHECK: %[[VAL_8:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_6]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_6]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_10:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_7]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
@@ -709,11 +709,11 @@ func @mul_ss_ss(%arga: tensor<32x16xf32, #Tss>, %argb: tensor<32x16xf32, #Tss>,
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16xf32>) -> tensor<32x16xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 16 : index
-// CHECK: %[[VAL_5:.*]] = constant 0 : index
-// CHECK: %[[VAL_6:.*]] = constant true
-// CHECK: %[[VAL_7:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant true
+// CHECK-DAG: %[[VAL_7:.*]] = constant 1 : index
// CHECK: %[[VAL_8:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_5]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_5]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_10:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -816,9 +816,9 @@ func @add_sd_ds(%arga: tensor<32x16xf32, #Tsd>, %argb: tensor<32x16xf32, #Tds>,
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16xf32>) -> tensor<32x16xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 16 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK: %[[VAL_6:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -873,9 +873,9 @@ func @mul_sd_ds(%arga: tensor<32x16xf32, #Tsd>, %argb: tensor<32x16xf32, #Tds>,
// CHECK-SAME: %[[VAL_0:.*]]: tensor<16x32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<16xf32>) -> tensor<16xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 16 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK: %[[VAL_6:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_5]] : tensor<16x32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_5]] : tensor<16x32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<16x32xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -925,9 +925,9 @@ func @matvec(%argA: tensor<16x32xf32, #Tds>, %argb: tensor<32xf32>, %argx: tenso
// CHECK-LABEL: func @sum_reduction(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<10x20xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<f32>) -> tensor<f32> {
-// CHECK: %[[VAL_2:.*]] = constant 10 : index
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_2:.*]] = constant 10 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<10x20xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<10x20xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
// CHECK: %[[VAL_7:.*]] = memref.buffer_cast %[[VAL_1]] : memref<f32>
@@ -971,9 +971,9 @@ func @sum_reduction(%arga: tensor<10x20xf32, #Tds>, %argx: tensor<f32>) -> tenso
// CHECK-LABEL: func @scale(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<?x?xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<?x?xf64>) -> tensor<?x?xf64> {
-// CHECK: %[[VAL_2:.*]] = constant 2.000000e+00 : f64
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_2:.*]] = constant 2.000000e+00 : f64
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<?x?xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<?x?xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<?x?xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf64>
@@ -1100,9 +1100,9 @@ func @sampled_dense_dense(%args: tensor<?x?xf32, #Tss>,
// CHECK-SAME: %[[VAL_3:.*3]]: tensor<?xf32>,
// CHECK-SAME: %[[VAL_4:.*4]]: tensor<f32>,
// CHECK-SAME: %[[VAL_5:.*5]]: tensor<?xf32>) -> tensor<?xf32> {
-// CHECK: %[[VAL_6:.*]] = constant 0 : index
-// CHECK: %[[VAL_7:.*]] = constant true
-// CHECK: %[[VAL_8:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_7:.*]] = constant true
+// CHECK-DAG: %[[VAL_8:.*]] = constant 1 : index
// CHECK: %[[VAL_9:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_6]] : tensor<?x?xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_10:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_6]] : tensor<?x?xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_11:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_8]] : tensor<?x?xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
diff --git a/mlir/test/Dialect/SparseTensor/sparse_3d.mlir b/mlir/test/Dialect/SparseTensor/sparse_3d.mlir
index 9e076c11b8117..3b06d8207878e 100644
--- a/mlir/test/Dialect/SparseTensor/sparse_3d.mlir
+++ b/mlir/test/Dialect/SparseTensor/sparse_3d.mlir
@@ -26,11 +26,11 @@
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "dense", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 16 : index
-// CHECK: %[[VAL_5:.*]] = constant 8 : index
-// CHECK: %[[VAL_6:.*]] = constant 0 : index
-// CHECK: %[[VAL_7:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 8 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_7:.*]] = constant 1 : index
// CHECK: %[[VAL_8:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "dense", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
// CHECK: %[[VAL_9:.*]] = memref.buffer_cast %[[VAL_1]] : memref<32x16x8xf32>
// CHECK: %[[VAL_10:.*]] = memref.buffer_cast %[[VAL_2]] : memref<32x16x8xf32>
@@ -68,11 +68,11 @@ func @add_ddd(%arga: tensor<32x16x8xf32, #Tddd>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "dense", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 16 : index
-// CHECK: %[[VAL_5:.*]] = constant 8 : index
-// CHECK: %[[VAL_6:.*]] = constant 0 : index
-// CHECK: %[[VAL_7:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 8 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_7:.*]] = constant 1 : index
// CHECK: %[[VAL_8:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "dense", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
// CHECK: %[[VAL_9:.*]] = memref.buffer_cast %[[VAL_1]] : memref<32x16x8xf32>
// CHECK: %[[VAL_10:.*]] = memref.buffer_cast %[[VAL_2]] : memref<32x16x8xf32>
@@ -110,13 +110,13 @@ func @mul_ddd(%arga: tensor<32x16x8xf32, #Tddd>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 2 : index
-// CHECK: %[[VAL_4:.*]] = constant 32 : index
-// CHECK: %[[VAL_5:.*]] = constant 16 : index
-// CHECK: %[[VAL_6:.*]] = constant 8 : index
-// CHECK: %[[VAL_7:.*]] = constant 0 : index
-// CHECK: %[[VAL_8:.*]] = constant true
-// CHECK: %[[VAL_9:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 2 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 8 : index
+// CHECK-DAG: %[[VAL_7:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_8:.*]] = constant true
+// CHECK-DAG: %[[VAL_9:.*]] = constant 1 : index
// CHECK: %[[VAL_10:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_11:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_3]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_12:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -226,12 +226,12 @@ func @mul_dds(%arga: tensor<32x16x8xf32, #Tdds>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 16 : index
-// CHECK: %[[VAL_5:.*]] = constant 8 : index
-// CHECK: %[[VAL_6:.*]] = constant true
-// CHECK: %[[VAL_7:.*]] = constant 0 : index
-// CHECK: %[[VAL_8:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 8 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant true
+// CHECK-DAG: %[[VAL_7:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_8:.*]] = constant 1 : index
// CHECK: %[[VAL_9:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_8]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_10:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_8]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_11:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -299,10 +299,10 @@ func @add_dsd(%arga: tensor<32x16x8xf32, #Tdsd>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 8 : index
-// CHECK: %[[VAL_5:.*]] = constant 0 : index
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 8 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_6]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_6]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -344,13 +344,13 @@ func @mul_dsd(%arga: tensor<32x16x8xf32, #Tdsd>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 2 : index
-// CHECK: %[[VAL_4:.*]] = constant 32 : index
-// CHECK: %[[VAL_5:.*]] = constant 16 : index
-// CHECK: %[[VAL_6:.*]] = constant 8 : index
-// CHECK: %[[VAL_7:.*]] = constant true
-// CHECK: %[[VAL_8:.*]] = constant 0 : index
-// CHECK: %[[VAL_9:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 2 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 8 : index
+// CHECK-DAG: %[[VAL_7:.*]] = constant true
+// CHECK-DAG: %[[VAL_8:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_9:.*]] = constant 1 : index
// CHECK: %[[VAL_10:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_9]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_11:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_9]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_12:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
@@ -444,10 +444,10 @@ func @add_dss(%arga: tensor<32x16x8xf32, #Tdss>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 2 : index
-// CHECK: %[[VAL_4:.*]] = constant 32 : index
-// CHECK: %[[VAL_5:.*]] = constant 0 : index
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 2 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_6]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_6]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
@@ -493,12 +493,12 @@ func @mul_dss(%arga: tensor<32x16x8xf32, #Tdss>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 16 : index
-// CHECK: %[[VAL_5:.*]] = constant 8 : index
-// CHECK: %[[VAL_6:.*]] = constant true
-// CHECK: %[[VAL_7:.*]] = constant 0 : index
-// CHECK: %[[VAL_8:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 8 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant true
+// CHECK-DAG: %[[VAL_7:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_8:.*]] = constant 1 : index
// CHECK: %[[VAL_9:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_7]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_10:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_7]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_11:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -571,10 +571,10 @@ func @add_sdd(%arga: tensor<32x16x8xf32, #Tsdd>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 16 : index
-// CHECK: %[[VAL_4:.*]] = constant 8 : index
-// CHECK: %[[VAL_5:.*]] = constant 0 : index
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 8 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_5]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_5]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -617,13 +617,13 @@ func @mul_sdd(%arga: tensor<32x16x8xf32, #Tsdd>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 2 : index
-// CHECK: %[[VAL_4:.*]] = constant 32 : index
-// CHECK: %[[VAL_5:.*]] = constant 16 : index
-// CHECK: %[[VAL_6:.*]] = constant 8 : index
-// CHECK: %[[VAL_7:.*]] = constant true
-// CHECK: %[[VAL_8:.*]] = constant 0 : index
-// CHECK: %[[VAL_9:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 2 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 8 : index
+// CHECK-DAG: %[[VAL_7:.*]] = constant true
+// CHECK-DAG: %[[VAL_8:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_9:.*]] = constant 1 : index
// CHECK: %[[VAL_10:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_8]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_11:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_8]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_12:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
@@ -722,10 +722,10 @@ func @add_sds(%arga: tensor<32x16x8xf32, #Tsds>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 2 : index
-// CHECK: %[[VAL_4:.*]] = constant 16 : index
-// CHECK: %[[VAL_5:.*]] = constant 0 : index
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 2 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_5]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_5]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
@@ -772,12 +772,12 @@ func @mul_sds(%arga: tensor<32x16x8xf32, #Tsds>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 16 : index
-// CHECK: %[[VAL_5:.*]] = constant 8 : index
-// CHECK: %[[VAL_6:.*]] = constant true
-// CHECK: %[[VAL_7:.*]] = constant 0 : index
-// CHECK: %[[VAL_8:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 8 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant true
+// CHECK-DAG: %[[VAL_7:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_8:.*]] = constant 1 : index
// CHECK: %[[VAL_9:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_7]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_10:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_7]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_11:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_8]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
@@ -880,9 +880,9 @@ func @add_ssd(%arga: tensor<32x16x8xf32, #Tssd>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 8 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 8 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK: %[[VAL_6:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_5]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
@@ -929,13 +929,13 @@ func @mul_ssd(%arga: tensor<32x16x8xf32, #Tssd>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 2 : index
-// CHECK: %[[VAL_4:.*]] = constant 32 : index
-// CHECK: %[[VAL_5:.*]] = constant 16 : index
-// CHECK: %[[VAL_6:.*]] = constant 8 : index
-// CHECK: %[[VAL_7:.*]] = constant true
-// CHECK: %[[VAL_8:.*]] = constant 0 : index
-// CHECK: %[[VAL_9:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 2 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 16 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 8 : index
+// CHECK-DAG: %[[VAL_7:.*]] = constant true
+// CHECK-DAG: %[[VAL_8:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_9:.*]] = constant 1 : index
// CHECK: %[[VAL_10:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_8]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_11:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_8]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_12:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_9]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
@@ -1064,9 +1064,9 @@ func @add_sss(%arga: tensor<32x16x8xf32, #Tsss>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16x8xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32x16x8xf32>) -> tensor<32x16x8xf32> {
-// CHECK: %[[VAL_3:.*]] = constant 2 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 2 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK: %[[VAL_6:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_5]] : tensor<32x16x8xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
@@ -1129,9 +1129,9 @@ func @mul_sss(%arga: tensor<32x16x8xf32, #Tsss>, %argb: tensor<32x16x8xf32>, %ar
// CHECK-SAME: %[[VAL_1:.*1]]: tensor<?x?x?xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_2:.*2]]: tensor<?x?xf32>,
// CHECK-SAME: %[[VAL_3:.*3]]: tensor<?x?xf32>) -> tensor<?x?xf32> {
-// CHECK: %[[VAL_4:.*]] = constant 2 : index
-// CHECK: %[[VAL_5:.*]] = constant 0 : index
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 2 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_1]], %[[VAL_4]] : tensor<?x?x?xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.indices %[[VAL_1]], %[[VAL_4]] : tensor<?x?x?xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.values %[[VAL_1]] : tensor<?x?x?xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
@@ -1196,9 +1196,9 @@ func @kernel_3d(%arga: tensor<?x?xf32>,
// CHECK-LABEL: func @sum_reduction(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<10x20x30xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<f32>) -> tensor<f32> {
-// CHECK: %[[VAL_2:.*]] = constant 2 : index
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_2:.*]] = constant 2 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<10x20x30xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<10x20x30xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_2]] : tensor<10x20x30xf32, #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
@@ -1253,9 +1253,9 @@ func @sum_reduction(%arga: tensor<10x20x30xf32, #Tsss>, %argx: tensor<f32>) -> t
// CHECK-SAME: %[[VAL_0:.*]]: tensor<?x?x?xf32>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<?xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<f32>) -> tensor<f32> {
-// CHECK: %[[VAL_3:.*]] = constant 2 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 2 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK: %[[VAL_6:.*]] = tensor.dim %[[VAL_0]], %[[VAL_5]] : tensor<?x?x?xf32>
// CHECK: %[[VAL_7:.*]] = tensor.dim %[[VAL_0]], %[[VAL_3]] : tensor<?x?x?xf32>
// CHECK: %[[VAL_8:.*]] = memref.buffer_cast %[[VAL_0]] : memref<?x?x?xf32>
@@ -1310,11 +1310,11 @@ func @sum_reduction_inv(%arga: tensor<?x?x?xf32>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<20xf32>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<30xf32>,
// CHECK-SAME: %[[VAL_3:.*]]: tensor<10x20x30xf32>) -> tensor<10x20x30xf32> {
-// CHECK: %[[VAL_4:.*]] = constant 10 : index
-// CHECK: %[[VAL_5:.*]] = constant 20 : index
-// CHECK: %[[VAL_6:.*]] = constant 30 : index
-// CHECK: %[[VAL_7:.*]] = constant 0 : index
-// CHECK: %[[VAL_8:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 10 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant 20 : index
+// CHECK-DAG: %[[VAL_6:.*]] = constant 30 : index
+// CHECK-DAG: %[[VAL_7:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_8:.*]] = constant 1 : index
// CHECK: %[[VAL_9:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<10xf32, #sparse_tensor.encoding<{ dimLevelType = [ "dense" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf32>
// CHECK: %[[VAL_10:.*]] = memref.buffer_cast %[[VAL_1]] : memref<20xf32>
// CHECK: %[[VAL_11:.*]] = memref.buffer_cast %[[VAL_2]] : memref<30xf32>
diff --git a/mlir/test/Dialect/SparseTensor/sparse_fp_ops.mlir b/mlir/test/Dialect/SparseTensor/sparse_fp_ops.mlir
index c7c6507517c1a..aea36a95d5e58 100644
--- a/mlir/test/Dialect/SparseTensor/sparse_fp_ops.mlir
+++ b/mlir/test/Dialect/SparseTensor/sparse_fp_ops.mlir
@@ -162,10 +162,10 @@ func @neg(%arga: tensor<32xf64, #SV>,
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xf64>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32xf64> {linalg.inplaceable = true}) -> tensor<32xf64> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant true
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant true
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>
@@ -222,10 +222,10 @@ func @add(%arga: tensor<32xf64, #SV>,
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xf64>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32xf64> {linalg.inplaceable = true}) -> tensor<32xf64> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant true
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant true
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xf64>
@@ -284,8 +284,8 @@ func @sub(%arga: tensor<32xf64, #SV>,
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xf64>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32xf64> {linalg.inplaceable = true}) -> tensor<32xf64> {
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_3]] : tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>
@@ -319,9 +319,9 @@ func @mul(%arga: tensor<32xf64, #SV>,
// CHECK-LABEL: func @divbyc(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xf64> {linalg.inplaceable = true}) -> tensor<32xf64> {
-// CHECK: %[[VAL_2:.*]] = constant 2.000000e+00 : f64
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_2:.*]] = constant 2.000000e+00 : f64
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_3]] : tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xf64, #sparse_tensor.encoding<{{{.*}}}>>
diff --git a/mlir/test/Dialect/SparseTensor/sparse_int_ops.mlir b/mlir/test/Dialect/SparseTensor/sparse_int_ops.mlir
index 8b5396252ed77..9a639838d6410 100644
--- a/mlir/test/Dialect/SparseTensor/sparse_int_ops.mlir
+++ b/mlir/test/Dialect/SparseTensor/sparse_int_ops.mlir
@@ -26,10 +26,10 @@
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi64>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32xi64> {linalg.inplaceable = true}) -> tensor<32xi64> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant true
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant true
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
@@ -86,11 +86,11 @@ func @add(%arga: tensor<32xi64, #SV>,
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi64>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32xi64> {linalg.inplaceable = true}) -> tensor<32xi64> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant true
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
-// CHECK: %[[VAL_7:.*]] = constant 0 : i64
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant true
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_7:.*]] = constant 0 : i64
// CHECK: %[[VAL_8:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_10:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
@@ -149,8 +149,8 @@ func @sub(%arga: tensor<32xi64, #SV>,
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi64>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32xi64> {linalg.inplaceable = true}) -> tensor<32xi64> {
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
@@ -184,9 +184,9 @@ func @mul(%arga: tensor<32xi64, #SV>,
// CHECK-LABEL: func @divsbyc(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi64> {linalg.inplaceable = true}) -> tensor<32xi64> {
-// CHECK: %[[VAL_2:.*]] = constant 2 : i64
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_2:.*]] = constant 2 : i64
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
@@ -218,9 +218,9 @@ func @divsbyc(%arga: tensor<32xi64, #SV>,
// CHECK-LABEL: func @divubyc(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi64> {linalg.inplaceable = true}) -> tensor<32xi64> {
-// CHECK: %[[VAL_2:.*]] = constant 2 : i64
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_2:.*]] = constant 2 : i64
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{.*}}}>>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>
@@ -253,8 +253,8 @@ func @divubyc(%arga: tensor<32xi64, #SV>,
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi64>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32xi64> {linalg.inplaceable = true}) -> tensor<32xi64> {
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xi64>
@@ -289,10 +289,10 @@ func @and(%arga: tensor<32xi64, #SV>,
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi64>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32xi64> {linalg.inplaceable = true}) -> tensor<32xi64> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant true
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant true
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xi64>
@@ -349,10 +349,10 @@ func @or(%arga: tensor<32xi64, #SV>,
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi64>,
// CHECK-SAME: %[[VAL_2:.*]]: tensor<32xi64> {linalg.inplaceable = true}) -> tensor<32xi64> {
-// CHECK: %[[VAL_3:.*]] = constant 32 : index
-// CHECK: %[[VAL_4:.*]] = constant 0 : index
-// CHECK: %[[VAL_5:.*]] = constant true
-// CHECK: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_5:.*]] = constant true
+// CHECK-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK: %[[VAL_7:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_4]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_8:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_4]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_9:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xi64>
@@ -408,9 +408,9 @@ func @xor(%arga: tensor<32xi64, #SV>,
// CHECK-LABEL: func @ashrbyc(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi64> {linalg.inplaceable = true}) -> tensor<32xi64> {
-// CHECK: %[[VAL_2:.*]] = constant 2 : i64
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_2:.*]] = constant 2 : i64
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xi64>
@@ -442,9 +442,9 @@ func @ashrbyc(%arga: tensor<32xi64, #SV>,
// CHECK-LABEL: func @lsrbyc(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi64> {linalg.inplaceable = true}) -> tensor<32xi64> {
-// CHECK: %[[VAL_2:.*]] = constant 2 : i64
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_2:.*]] = constant 2 : i64
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xi64>
@@ -476,9 +476,9 @@ func @lsrbyc(%arga: tensor<32xi64, #SV>,
// CHECK-LABEL: func @lslbyc(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi64> {linalg.inplaceable = true}) -> tensor<32xi64> {
-// CHECK: %[[VAL_2:.*]] = constant 2 : i64
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_2:.*]] = constant 2 : i64
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_3]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xindex>
// CHECK: %[[VAL_7:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32xi64, #sparse_tensor.encoding<{{{.*}}}>> to memref<?xi64>
diff --git a/mlir/test/Dialect/SparseTensor/sparse_lower.mlir b/mlir/test/Dialect/SparseTensor/sparse_lower.mlir
index b08503c2e865e..0668094073ad0 100644
--- a/mlir/test/Dialect/SparseTensor/sparse_lower.mlir
+++ b/mlir/test/Dialect/SparseTensor/sparse_lower.mlir
@@ -24,9 +24,9 @@
// CHECK-HIR-SAME: %[[VAL_0:.*]]: tensor<32x64xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-HIR-SAME: %[[VAL_1:.*]]: tensor<64xf64>,
// CHECK-HIR-SAME: %[[VAL_2:.*]]: tensor<32xf64>) -> tensor<32xf64> {
-// CHECK-HIR: %[[VAL_3:.*]] = constant 32 : index
-// CHECK-HIR: %[[VAL_4:.*]] = constant 0 : index
-// CHECK-HIR: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-HIR-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-HIR-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-HIR-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK-HIR: %[[VAL_6:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_5]] : tensor<32x64xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK-HIR: %[[VAL_7:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_5]] : tensor<32x64xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK-HIR: %[[VAL_8:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x64xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf64>
@@ -57,9 +57,9 @@
// CHECK-MIR-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
// CHECK-MIR-SAME: %[[VAL_1:.*]]: tensor<64xf64>,
// CHECK-MIR-SAME: %[[VAL_2:.*]]: tensor<32xf64>) -> tensor<32xf64> {
-// CHECK-MIR: %[[VAL_3:.*]] = constant 32 : index
-// CHECK-MIR: %[[VAL_4:.*]] = constant 0 : index
-// CHECK-MIR: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-MIR-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-MIR-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-MIR-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK-MIR: %[[VAL_6:.*]] = call @sparsePointers(%[[VAL_0]], %[[VAL_5]]) : (!llvm.ptr<i8>, index) -> memref<?xindex>
// CHECK-MIR: %[[VAL_7:.*]] = call @sparseIndices(%[[VAL_0]], %[[VAL_5]]) : (!llvm.ptr<i8>, index) -> memref<?xindex>
// CHECK-MIR: %[[VAL_8:.*]] = call @sparseValuesF64(%[[VAL_0]]) : (!llvm.ptr<i8>) -> memref<?xf64>
@@ -90,9 +90,9 @@
// CHECK-LIR-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
// CHECK-LIR-SAME: %[[VAL_1:.*]]: memref<64xf64>,
// CHECK-LIR-SAME: %[[VAL_2:.*]]: memref<32xf64>) -> memref<32xf64> {
-// CHECK-LIR: %[[VAL_3:.*]] = constant 32 : index
-// CHECK-LIR: %[[VAL_4:.*]] = constant 0 : index
-// CHECK-LIR: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-LIR-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-LIR-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-LIR-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK-LIR: %[[VAL_6:.*]] = call @sparsePointers(%[[VAL_0]], %[[VAL_5]]) : (!llvm.ptr<i8>, index) -> memref<?xindex>
// CHECK-LIR: %[[VAL_7:.*]] = call @sparseIndices(%[[VAL_0]], %[[VAL_5]]) : (!llvm.ptr<i8>, index) -> memref<?xindex>
// CHECK-LIR: %[[VAL_8:.*]] = call @sparseValuesF64(%[[VAL_0]]) : (!llvm.ptr<i8>) -> memref<?xf64>
diff --git a/mlir/test/Dialect/SparseTensor/sparse_lower_col.mlir b/mlir/test/Dialect/SparseTensor/sparse_lower_col.mlir
index 9c04adc64352b..88018f4a87c2c 100644
--- a/mlir/test/Dialect/SparseTensor/sparse_lower_col.mlir
+++ b/mlir/test/Dialect/SparseTensor/sparse_lower_col.mlir
@@ -27,9 +27,9 @@
// CHECK-HIR-SAME: %[[VAL_0:.*]]: tensor<32x64xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], dimOrdering = affine_map<(d0, d1) -> (d1, d0)>, pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-HIR-SAME: %[[VAL_1:.*]]: tensor<64xf64>,
// CHECK-HIR-SAME: %[[VAL_2:.*]]: tensor<32xf64>) -> tensor<32xf64> {
-// CHECK-HIR: %[[VAL_3:.*]] = constant 64 : index
-// CHECK-HIR: %[[VAL_4:.*]] = constant 0 : index
-// CHECK-HIR: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-HIR-DAG: %[[VAL_3:.*]] = constant 64 : index
+// CHECK-HIR-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-HIR-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK-HIR: %[[VAL_6:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_5]] : tensor<32x64xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], dimOrdering = affine_map<(d0, d1) -> (d1, d0)>, pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK-HIR: %[[VAL_7:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_5]] : tensor<32x64xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], dimOrdering = affine_map<(d0, d1) -> (d1, d0)>, pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK-HIR: %[[VAL_8:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x64xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], dimOrdering = affine_map<(d0, d1) -> (d1, d0)>, pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf64>
@@ -59,9 +59,9 @@
// CHECK-MIR-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
// CHECK-MIR-SAME: %[[VAL_1:.*]]: tensor<64xf64>,
// CHECK-MIR-SAME: %[[VAL_2:.*]]: tensor<32xf64>) -> tensor<32xf64> {
-// CHECK-MIR: %[[VAL_3:.*]] = constant 64 : index
-// CHECK-MIR: %[[VAL_5:.*]] = constant 0 : index
-// CHECK-MIR: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-MIR-DAG: %[[VAL_3:.*]] = constant 64 : index
+// CHECK-MIR-DAG: %[[VAL_5:.*]] = constant 0 : index
+// CHECK-MIR-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK-MIR: %[[VAL_7:.*]] = call @sparsePointers(%[[VAL_0]], %[[VAL_6]]) : (!llvm.ptr<i8>, index) -> memref<?xindex>
// CHECK-MIR: %[[VAL_8:.*]] = call @sparseIndices(%[[VAL_0]], %[[VAL_6]]) : (!llvm.ptr<i8>, index) -> memref<?xindex>
// CHECK-MIR: %[[VAL_9:.*]] = call @sparseValuesF64(%[[VAL_0]]) : (!llvm.ptr<i8>) -> memref<?xf64>
@@ -91,9 +91,9 @@
// CHECK-LIR-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
// CHECK-LIR-SAME: %[[VAL_1:.*]]: memref<64xf64>,
// CHECK-LIR-SAME: %[[VAL_2:.*]]: memref<32xf64>) -> memref<32xf64> {
-// CHECK-LIR: %[[VAL_3:.*]] = constant 64 : index
-// CHECK-LIR: %[[VAL_5:.*]] = constant 0 : index
-// CHECK-LIR: %[[VAL_6:.*]] = constant 1 : index
+// CHECK-LIR-DAG: %[[VAL_3:.*]] = constant 64 : index
+// CHECK-LIR-DAG: %[[VAL_5:.*]] = constant 0 : index
+// CHECK-LIR-DAG: %[[VAL_6:.*]] = constant 1 : index
// CHECK-LIR: %[[VAL_7:.*]] = call @sparsePointers(%[[VAL_0]], %[[VAL_6]]) : (!llvm.ptr<i8>, index) -> memref<?xindex>
// CHECK-LIR: %[[VAL_8:.*]] = call @sparseIndices(%[[VAL_0]], %[[VAL_6]]) : (!llvm.ptr<i8>, index) -> memref<?xindex>
// CHECK-LIR: %[[VAL_9:.*]] = call @sparseValuesF64(%[[VAL_0]]) : (!llvm.ptr<i8>) -> memref<?xf64>
diff --git a/mlir/test/Dialect/SparseTensor/sparse_lower_inplace.mlir b/mlir/test/Dialect/SparseTensor/sparse_lower_inplace.mlir
index 1bca43758f28f..4b4d446b52a84 100644
--- a/mlir/test/Dialect/SparseTensor/sparse_lower_inplace.mlir
+++ b/mlir/test/Dialect/SparseTensor/sparse_lower_inplace.mlir
@@ -24,9 +24,9 @@
// CHECK-HIR-SAME: %[[VAL_0:.*]]: tensor<32x64xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>>,
// CHECK-HIR-SAME: %[[VAL_1:.*]]: tensor<64xf64>,
// CHECK-HIR-SAME: %[[VAL_2:.*]]: tensor<32xf64> {linalg.inplaceable = true}) -> tensor<32xf64> {
-// CHECK-HIR: %[[VAL_3:.*]] = constant 32 : index
-// CHECK-HIR: %[[VAL_4:.*]] = constant 0 : index
-// CHECK-HIR: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-HIR-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-HIR-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-HIR-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK-HIR: %[[VAL_6:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_5]] : tensor<32x64xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK-HIR: %[[VAL_7:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_5]] : tensor<32x64xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xindex>
// CHECK-HIR: %[[VAL_8:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x64xf64, #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ], pointerBitWidth = 0, indexBitWidth = 0 }>> to memref<?xf64>
@@ -55,9 +55,9 @@
// CHECK-MIR-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
// CHECK-MIR-SAME: %[[VAL_1:.*]]: tensor<64xf64>,
// CHECK-MIR-SAME: %[[VAL_2:.*]]: tensor<32xf64> {linalg.inplaceable = true}) -> tensor<32xf64> {
-// CHECK-MIR: %[[VAL_3:.*]] = constant 32 : index
-// CHECK-MIR: %[[VAL_4:.*]] = constant 0 : index
-// CHECK-MIR: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-MIR-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-MIR-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-MIR-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK-MIR: %[[VAL_6:.*]] = call @sparsePointers(%[[VAL_0]], %[[VAL_5]]) : (!llvm.ptr<i8>, index) -> memref<?xindex>
// CHECK-MIR: %[[VAL_7:.*]] = call @sparseIndices(%[[VAL_0]], %[[VAL_5]]) : (!llvm.ptr<i8>, index) -> memref<?xindex>
// CHECK-MIR: %[[VAL_8:.*]] = call @sparseValuesF64(%[[VAL_0]]) : (!llvm.ptr<i8>) -> memref<?xf64>
@@ -86,9 +86,9 @@
// CHECK-LIR-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
// CHECK-LIR-SAME: %[[VAL_1:.*]]: memref<64xf64>,
// CHECK-LIR-SAME: %[[VAL_2:.*]]: memref<32xf64> {linalg.inplaceable = true}) -> memref<32xf64> {
-// CHECK-LIR: %[[VAL_3:.*]] = constant 32 : index
-// CHECK-LIR: %[[VAL_4:.*]] = constant 0 : index
-// CHECK-LIR: %[[VAL_5:.*]] = constant 1 : index
+// CHECK-LIR-DAG: %[[VAL_3:.*]] = constant 32 : index
+// CHECK-LIR-DAG: %[[VAL_4:.*]] = constant 0 : index
+// CHECK-LIR-DAG: %[[VAL_5:.*]] = constant 1 : index
// CHECK-LIR: %[[VAL_6:.*]] = call @sparsePointers(%[[VAL_0]], %[[VAL_5]]) : (!llvm.ptr<i8>, index) -> memref<?xindex>
// CHECK-LIR: %[[VAL_7:.*]] = call @sparseIndices(%[[VAL_0]], %[[VAL_5]]) : (!llvm.ptr<i8>, index) -> memref<?xindex>
// CHECK-LIR: %[[VAL_8:.*]] = call @sparseValuesF64(%[[VAL_0]]) : (!llvm.ptr<i8>) -> memref<?xf64>
diff --git a/mlir/test/Dialect/SparseTensor/sparse_out.mlir b/mlir/test/Dialect/SparseTensor/sparse_out.mlir
index aa37991a8b538..95f964cab9a11 100644
--- a/mlir/test/Dialect/SparseTensor/sparse_out.mlir
+++ b/mlir/test/Dialect/SparseTensor/sparse_out.mlir
@@ -21,9 +21,9 @@
// CHECK-LABEL: func @sparse_simply_dynamic1(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16xf32, #sparse_tensor.encoding<{{.*}}>> {
-// CHECK: %[[VAL_1:.*]] = constant 2.000000e+00 : f32
-// CHECK: %[[VAL_2:.*]] = constant 0 : index
-// CHECK: %[[VAL_3:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_1:.*]] = constant 2.000000e+00 : f32
+// CHECK-DAG: %[[VAL_2:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 1 : index
// CHECK: %[[VAL_4:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_2]] : tensor<32x16xf32, #sparse_tensor.encoding<{{.*}}>> to memref<?xindex>
// CHECK: %[[VAL_5:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_2]] : tensor<32x16xf32, #sparse_tensor.encoding<{{.*}}>> to memref<?xindex>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32x16xf32, #sparse_tensor.encoding<{{.*}}>> to memref<?xindex>
@@ -67,8 +67,8 @@ func @sparse_simply_dynamic1(%argx: tensor<32x16xf32, #DCSR> {linalg.inplaceable
// CHECK-LABEL: func @sparse_simply_dynamic2(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<32x16xf32, #sparse_tensor.encoding<{{.*}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<32x16xf32, #sparse_tensor.encoding<{{.*}}>> {
-// CHECK: %[[VAL_2:.*]] = constant 0 : index
-// CHECK: %[[VAL_3:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_2:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 1 : index
// CHECK: %[[VAL_4:.*]] = sparse_tensor.pointers %[[VAL_0]], %[[VAL_3]] : tensor<32x16xf32, #sparse_tensor.encoding<{{.*}}>> to memref<?xindex>
// CHECK: %[[VAL_5:.*]] = sparse_tensor.indices %[[VAL_0]], %[[VAL_3]] : tensor<32x16xf32, #sparse_tensor.encoding<{{.*}}>> to memref<?xindex>
// CHECK: %[[VAL_6:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<32x16xf32, #sparse_tensor.encoding<{{.*}}>> to memref<?xf32>
diff --git a/mlir/test/Dialect/SparseTensor/sparse_perm.mlir b/mlir/test/Dialect/SparseTensor/sparse_perm.mlir
index b3a6f386c4f32..77d07d6a02248 100644
--- a/mlir/test/Dialect/SparseTensor/sparse_perm.mlir
+++ b/mlir/test/Dialect/SparseTensor/sparse_perm.mlir
@@ -55,9 +55,9 @@ func @sparse_static_dims(%arga: tensor<10x20x30xf32, #X>,
// CHECK-LABEL: func @sparse_dynamic_dims(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<?x?x?xf32, #sparse_tensor.encoding<{{{.*}}}>>,
// CHECK-SAME: %[[VAL_1:.*]]: tensor<?x?x?xf32>) -> tensor<?x?x?xf32> {
-// CHECK: %[[VAL_2:.*]] = constant 2 : index
-// CHECK: %[[VAL_3:.*]] = constant 0 : index
-// CHECK: %[[VAL_4:.*]] = constant 1 : index
+// CHECK-DAG: %[[VAL_2:.*]] = constant 2 : index
+// CHECK-DAG: %[[VAL_3:.*]] = constant 0 : index
+// CHECK-DAG: %[[VAL_4:.*]] = constant 1 : index
// CHECK: %[[VAL_5:.*]] = sparse_tensor.values %[[VAL_0]] : tensor<?x?x?xf32, #sparse_tensor.encoding<{{{.*}}}>>
// CHECK: %[[VAL_6:.*]] = tensor.dim %[[VAL_1]], %[[VAL_3]] : tensor<?x?x?xf32>
// CHECK: %[[VAL_7:.*]] = tensor.dim %[[VAL_1]], %[[VAL_4]] : tensor<?x?x?xf32>
diff --git a/mlir/test/Dialect/Vector/vector-contract-transforms.mlir b/mlir/test/Dialect/Vector/vector-contract-transforms.mlir
index bf13b273d328e..f9c2c09b73393 100644
--- a/mlir/test/Dialect/Vector/vector-contract-transforms.mlir
+++ b/mlir/test/Dialect/Vector/vector-contract-transforms.mlir
@@ -864,11 +864,11 @@ func @genbool_var_2d(%arg0: index, %arg1: index) -> vector<2x3xi1> {
// CHECK-SAME: %[[A:.*0]]: index,
// CHECK-SAME: %[[B:.*1]]: index,
// CHECK-SAME: %[[C:.*2]]: index)
-// CHECK: %[[C1:.*]] = constant dense<false> : vector<7xi1>
-// CHECK: %[[C2:.*]] = constant dense<false> : vector<1x7xi1>
-// CHECK: %[[C3:.*]] = constant dense<false> : vector<2x1x7xi1>
-// CHECK: %[[c0:.*]] = constant 0 : index
-// CHECK: %[[c1:.*]] = constant 1 : index
+// CHECK-DAG: %[[C1:.*]] = constant dense<false> : vector<7xi1>
+// CHECK-DAG: %[[C2:.*]] = constant dense<false> : vector<1x7xi1>
+// CHECK-DAG: %[[C3:.*]] = constant dense<false> : vector<2x1x7xi1>
+// CHECK-DAG: %[[c0:.*]] = constant 0 : index
+// CHECK-DAG: %[[c1:.*]] = constant 1 : index
// CHECK: %[[T0:.*]] = vector.create_mask %[[C]] : vector<7xi1>
// CHECK: %[[T1:.*]] = cmpi slt, %[[c0]], %[[B]] : index
// CHECK: %[[T2:.*]] = select %[[T1]], %[[T0]], %[[C1]] : vector<7xi1>
More information about the Mlir-commits
mailing list