<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/107870>107870</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[mlir] remove-dead-values pass throws error when module has a name
</td>
</tr>
<tr>
<th>Labels</th>
<td>
mlir
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mrakitaTT
</td>
</tr>
</table>
<pre>
When the input mlir module has a name, like this for example:
```
module @test_opt attributes {} {
func.func public @test_opt(%arg0: tensor<128x10xf32>) -> tensor<128x10xf32> {
%0 = tensor.empty() : tensor<64x96xbf16>
// CHECK-NOT: %[[C:.*]] = tensor.empty[[C:.*]]
return %arg0 : tensor<128x10xf32>
}
}
```
then `remove-dead-values` pass throws this error:
```
error: cannot optimize an IR with non-function symbol ops, non-call symbol user ops or branch ops
```
After removing module name (`@test_opt`) everything works. Seems to be a bug.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U11vpDgQ_DXNS2uQx3w_8DCZyehOJ91Jt5H2cWVDM3hjMLLNfOyvX5kQZaIkKyEb6GoXRVUL59RpJKohe4DsEInZ98bWgxXPyounp0ia9lZ_72lE3xOqcZo9DlpZHEw7a8JeOBQ4ioGA71GrZ0LfK4edsUhXMUyaINkBOwDbQc7Wa3lcT4CUeXL-h5k8Cu-tkrMnh1A8QHFYtgWN2M1jE4cFp1lq1dx3Ai-BZ8KeGCQ79DQ6YyHZb3l53bJrl3BIHoFXuIHk8YvyPRUi8IwhJIcVHNMw-dvCUuE7ijy9VvlVdts8UNz1H4Efcf_X4_6fzb__PYUe4Nnymx_2kOxi4DvIDpAdPtJ8AlpPtuRnO-KqFf8gdv0SKNbWt5v3LrysPjgMObM0mDNtWhLt5iz0TA5yhpNwDn1vzcW9uEvWBsrPfX0tYiPG0Xg0k1eD-kUoRvz7f7wo3-Noxk2w0iszorsN0mg0kwsZCqVGaP36enZkQw2NRWnF2PQL8mstu86TxUWJGk-vQQ0RxWBgzu5zk7PgKJ3J3nwf4Bdjn12M34gGh96gJBQo51MctXXSVkklIqq3Bc_KKt2WVdTXaVqVOeNJ1_Cq6_JKZLKUuSzKTjaZlEWkas54yipWbTOWsCwmnvGkKmTbctFyKSFlNAilY63PQ2zsKVLOzVRvWVEWLNJCknbLiHIehg84D8Nq64DfyPnkIGVaOe_eTvDK62Wsl4bsgB-tfefr4hpeQg4-jHY0W1333k8ueL4k-6R8P8u4MQPwYyBdt81kzU9qPPDjosEBP64yzjX_HQAA__8eGVdR">