<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/155022>155022</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [MLIR] Attribute caching logic during parsing causes issues for custom assembly formats
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          knalbant
      </td>
    </tr>
</table>

<pre>
    [(#151267) Fix duplicated attribute nodes in MLIR bytecode deserialization](https://github.com/llvm/llvm-project/pull/151267) has caused issues with parsing of typed attributes in one of our internal dialects at Modular. 

We have IR with TypedAttrs that looks like: 

```
example.param.load : !example.data<0> = <#example.value>
example.param.load : !example.data<1> = <#example.value>
```

And this logic ([LINK](https://github.com/llvm/llvm-project/pull/151267/files#diff-0f3317b9ff0146b695d3109a55839a7199a6ee442841fcb911b5e88dd00fafeaR252)) to check if an attribute is a TypedAttr based on whether the value is followed by a colon is proving to be problematic.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysU8GK5DYU_Br15bGN9GR12wcfvDvbMGQ3hyGQ85P13FZGtowkz2zn64M925m5hYWAwUglFaVXVZSzv87MrTCfhXk40FrGmNrnmYKluRxsdLcdw1qgVkbh6SywgYv_AW5dgu-psAMqJXm7FoY5Os7gZ_j-7fEJ7K1wHx2D48zJU_B_U_FxFuZBYD2WsmShO4EXgZerL-Nqj32cBF5CeLn_Pi0p_sV9EXhZ1hAEXt5ljJShpzWzA5_zyhlefRlhoZT9fIU4QLktH_Xt0uLMGxTXBH4unGYK4DwF7ksGKvA9ujVQOoKQnZDdnwwjvTA8Pr2x_7FRdqWkDGWkAiHG5wzBP7PQ3c874iR_frLjHzQtgY8LJZqOIZKD_SCqO-KokNBfpNBfQegHEPqLQH1HXyisLPTXX6FS_0n1UaGQXTc7KKPPEOLV97D5bT5_e_z9t__HqsvgA2eB2vlh-CQHrdXZNsMgVXWyp8Y4rWRDxtS6obNqGjoxVxXWlRp62yhlDde1c1IONDA9oUGBzZaAEqEfuX8GPwDNH4LoM9C7VWBpC0mc4XXkMnKCMjLs49hODjGE-MoO7A0I-hjivG0vKb5sOSoRLG8rG3ii4vvjwbXaNbqhA7fqbEzdqBPqw9hqjTQogwrP6PBUD-7Mp8rWRpGRioaDb1GikTWiaiqJ-lg3Z101rMihsro2opI8kQ_HbaLHmK6HPdqtMkYiHgJZDvmtkzgFnwTi1tzU7g7Y9ZpFJYPPJb8zFF_C3vGtlcI8QPfvnHrqx-2Nb767NW2Le4H2buV7t4aYoF9ziRNQzjzZcNv2Jir5sKbQ_nJI3nj3mOxve2nxnwAAAP__6Rd2Vw">