Note that the fact that the operand type of the WhileOp is different from the argument type of the cond and body regions is lost in the prettyprinted version. As a result, the prettyprinted version will fail to parse:
~/example.mlir:27:17: error: use of value '%iterArg' expects different type than prior uses: 'tensor<?xf32>' vs 'tensor<5xf32>'
mhlo.return %iterArg, %3 : tensor<?xf32>, tensor<i64>
^
~/example.mlir:19:21: note: prior use here
%1:2 = mhlo.while(%iterArg = %arg0, %iterArg_0 = %0) : tensor<5xf32>, tensor<i64>
^
Unassigning in favor of higher-priority work. This issue made developing --stablehlo-shape-refinement somewhat inconvenient, but it no longer represents an acute problem.
is incorrectly prettyprinted as:
Note that the fact that the operand type of the WhileOp is different from the argument type of the cond and body regions is lost in the prettyprinted version. As a result, the prettyprinted version will fail to parse: