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

    <tr>
        <th>Summary</th>
        <td>
            [mlir][spirv] `ConvertChainedBitcast` canonicalization can produce wrong code
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    ```
func.func @convert_bitcast(%arg0 : f64) -> f64 {
  %1 = spirv.Bitcast %arg0 : f64 to i64
  %2 = spirv.Bitcast %1 : i64 to f64
  spirv.ReturnValue %2 : f64
}
```
```
error: result type must be different from operand type
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtkkuPpCAUhX8Nbm7aIIqPBYuqrun0ehaznaBelQmC4VGd7l8_aFWnMpVJiB7gfod70N6On4LU9D7ohdDTFM2Q7w8gFR2suaILv3sVBukDYS1hXLqZAilPMNUVYR28kPLHroE055sHQCorUs0F_KbcNT_feHiiIVhQyeQBsf9DxUGoGzE9iFvhTwzRmV9SR_z2OD2qSHO5i3-DPk3ROet20KGPOkD43BDWmM7vEUY1TejQBJicXcFu6KQZj5onswxFUdcNL5q249koyrErO5kFFTQKws-rVo7wS1JH70lCol5v9_y6SGVwvAdP6zBIY40apFZfMihr9gXYnB3jgPDhrJlhsCNm0WmxhLD5lICwtzRmFZbY54Nd00Tr6_frJdF_cEjf8k15H9EnwduWFtkiqrJr-qbq-NBjWbas5Q02_dhNtKE1m4pMyx6133MQxgx-wGGRdMqRKcEoY0VBS1ayivO8pXVZ8UImi6lFydIPhatUOt_7yK2bMyeOlvo4-7SplQ_-sSm9V7PB49p2fxnDYp14l27cM7dVdpwuju7_AtVu1KQ">