@@ -89,29 +89,29 @@ func @get_extent_from_extent_tensor(%extents : tensor<?xindex>, %idx : index)
89
89
90
90
// Lower `const_shape` to `tensor.from_elements`.
91
91
// CHECK-LABEL: @const_shape
92
- // CHECK-SAME: () -> tensor<?xindex >
93
- func @const_shape () -> tensor <?x index > {
92
+ // CHECK-SAME: () -> tensor<3xindex >
93
+ func @const_shape () -> tensor <3 x index > {
94
94
// CHECK: %[[C1:.*]] = constant 1 : index
95
95
// CHECK: %[[C2:.*]] = constant 2 : index
96
96
// CHECK: %[[C3:.*]] = constant 3 : index
97
97
// CHECK: %[[TENSOR3:.*]] = tensor.from_elements %[[C1]], %[[C2]], %[[C3]]
98
- // CHECK: %[[RESULT:.*]] = tensor.cast %[[TENSOR3]] : tensor<3xindex> to tensor<?xindex >
99
- // CHECK: return %[[RESULT]] : tensor<?xindex >
100
- %shape = shape.const_shape [1 , 2 , 3 ] : tensor <?x index >
101
- return %shape : tensor <?x index >
98
+ // CHECK: %[[RESULT:.*]] = tensor.cast %[[TENSOR3]] : tensor<3xindex> to tensor<3xindex >
99
+ // CHECK: return %[[RESULT]] : tensor<3xindex >
100
+ %shape = shape.const_shape [1 , 2 , 3 ] : tensor <3 x index >
101
+ return %shape : tensor <3 x index >
102
102
}
103
103
104
104
// -----
105
105
106
106
// Lower `const_shape` in the case of rank 0.
107
107
// CHECK-LABEL: func @const_shape_zero_elements
108
- // CHECK-SAME: () -> tensor<?xindex >
109
- func @const_shape_zero_elements () -> tensor <?x index > {
108
+ // CHECK-SAME: () -> tensor<0xindex >
109
+ func @const_shape_zero_elements () -> tensor <0 x index > {
110
110
// CHECK: %[[TENSOR:.*]] = tensor.from_elements : tensor<0xindex>
111
- // CHECK: %[[RESULT:.*]] = tensor.cast %[[TENSOR]] : tensor<0xindex> to tensor<?xindex >
112
- // CHECK: return %[[RESULT]] : tensor<?xindex >
113
- %shape = shape.const_shape [] : tensor <?x index >
114
- return %shape : tensor <?x index >
111
+ // CHECK: %[[RESULT:.*]] = tensor.cast %[[TENSOR]] : tensor<0xindex> to tensor<0xindex >
112
+ // CHECK: return %[[RESULT]] : tensor<0xindex >
113
+ %shape = shape.const_shape [] : tensor <0 x index >
114
+ return %shape : tensor <0 x index >
115
115
}
116
116
117
117
// -----
0 commit comments