@@ -129,6 +129,7 @@ func @move_shape_of_into_assuming(%arg0 : !shape.witness,
129129 shape.assuming_yield %arg1 , %1 : tensor <?x32 xf32 >, tensor <?x32 xf32 >
130130 }
131131 %2 = shape.shape_of %0#1 : tensor <?x32 xf32 > -> tensor <3 xindex >
132+ " use" (%0#0 , %0#1 ) : (tensor <?x32 xf32 >, tensor <?x32 xf32 >) -> ()
132133 return %2 : tensor <3 xindex >
133134}
134135
@@ -150,6 +151,7 @@ func @move_cstr_broadcastable_into_assuming(%arg0 : !shape.witness,
150151 shape.assuming_yield %arg1 , %1 : tensor <2 xindex >, tensor <3 xindex >
151152 }
152153 %1 = shape.cstr_broadcastable %arg1 , %0#1 : tensor <2 xindex >, tensor <3 xindex >
154+ " use" (%0#0 , %0#1 ) : (tensor <2 xindex >, tensor <3 xindex >) -> ()
153155 return %1 : !shape.witness
154156}
155157
@@ -223,6 +225,7 @@ func @move_shape_of_out_of_assuming(%arg0 : !shape.witness,
223225 %2 = shape.shape_of %arg1 : tensor <2 x?xf32 > -> tensor <2 xindex >
224226 shape.assuming_yield %1 , %2 : tensor <2 x?xf32 >, tensor <2 xindex >
225227 }
228+ " use" (%0#0 , %0#1 ) : (tensor <2 x?xf32 >, tensor <2 xindex >) -> ()
226229 return %0#1 : tensor <2 xindex >
227230}
228231
@@ -283,6 +286,7 @@ func @merge_assuming_ops(%arg0: tensor<?x32xf16>, %arg1 : tensor<?x32xf16>,
283286 %8 = " another.producer" () : () -> tensor <?x?x32 xf16 >
284287 shape.assuming_yield %8 : tensor <?x?x32 xf16 >
285288 }
289+ " use" (%5 , %7 ) : (tensor <?x32 xf16 >, tensor <?x?x32 xf16 >) -> ()
286290 return %7 : tensor <?x?x32 xf16 >
287291}
288292
@@ -297,7 +301,7 @@ func @sub_sub(%arg0: tensor<?x32xf16>, %arg1 : tensor<?x32xf16>,
297301 // CHECK: %[[SHAPE1:.*]] = shape.shape_of %[[ARG1]]
298302 // CHECK: %[[SHAPE2:.*]] = shape.shape_of %[[ARG2]]
299303 // CHECK: %[[WITNESS:.*]] = shape.cstr_broadcastable %[[SHAPE2]], %[[SHAPE0]], %[[SHAPE1]], %[[SHAPE0]], %[[SHAPE1]]
300- // CHECK: %[[ASSUMING_RESULTS :.*]]:4 = shape.assuming %[[WITNESS]]
304+ // CHECK: %[[ASSUMING_RESULT :.*]] = shape.assuming %[[WITNESS]]
301305 // CHECK-SAME: {
302306 // CHECK: %[[BCASTED_SHAPE01:.*]] = shape.broadcast %[[SHAPE0]], %[[SHAPE1]]
303307 // CHECK: %[[BCASTED_SHAPE012:.*]] = shape.broadcast %[[SHAPE2]], %[[BCASTED_SHAPE01]]
@@ -306,9 +310,9 @@ func @sub_sub(%arg0: tensor<?x32xf16>, %arg1 : tensor<?x32xf16>,
306310 // CHECK: %[[BCASTED_ARG1:.*]] = "mhlo.dynamic_broadcast_in_dim"(%[[ARG1]], %[[BCASTED_SHAPE012]]) {broadcast_dimensions = dense<[1, 2]> : tensor<2xi64>}
307311 // CHECK: %[[TMP:.*]] = mhlo.subtract %[[BCASTED_ARG0]], %[[BCASTED_ARG1]]
308312 // CHECK: %[[RESULT:.*]] = mhlo.subtract %[[BCASTED_ARG2]], %[[TMP]]
309- // CHECK: shape.assuming_yield %{{.*}}, %{{.*}}, %{{.*}}, % [[RESULT]]
313+ // CHECK: shape.assuming_yield %[[RESULT]]
310314 // CHECK: }
311- // CHECK: return %[[ASSUMING_RESULTS]]#3
315+ // CHECK: return %[[ASSUMING_RESULT]]
312316 %0 = shape.shape_of %arg0 : tensor <?x32 xf16 > -> tensor <2 xindex >
313317 %1 = shape.shape_of %arg1 : tensor <?x32 xf16 > -> tensor <2 xindex >
314318 %2 = shape.cstr_broadcastable %0 , %1 : tensor <2 xindex >, tensor <2 xindex >
0 commit comments