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

    <tr>
        <th>Summary</th>
        <td>
            [WinEH] Model catch object write in MIR
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            llvm:codegen,
            platform:windows
      </td>
    </tr>

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

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

<pre>
    To capture the idea from https://github.com/llvm/llvm-project/pull/66988#discussion_r1333561055:

Currently, the potential write to the WinEH catch object at the point of the invoke is not properly modeled in MIR. We could fix this by adding a reference to all possible catch object frame indices to the corresponding call instructions. This would make stack coloring correct out of the box.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkjFv2zAQhX8NtRwqyKQoS4OGNK7RDlmKABkLijxZV9M8gaTi-N8XkpMWGbuQAA_vvju-Z1KiU0Dshf4q9KEwS5449oHOZIuB3a1_ZrBmzktEyBMCOTQwRr7AlPOchHoQ8ijk8UR5WobS8kXIo_evH9eXOfJvtFnI47x4L-Sxabq2FVI5SnZJiTj8ijullG52ldZrw-ogqvfzcYkRQ_Y3IR83_swZQybj4RopI2Tenl8ofPsO1mQ7AQ8rEEx-F1DIwON9-vDKZwRKEDjDHHnG6G9wYYceHVCApx8_S3hBsLx4ByO9QZ4owXAD4xyFExiIOGLEYDe48R5mTokGj5_5YzSXlejIYvqY03KMmGYOWy-7qimkHBebiUMq4XmlXTf4xZwRUjb2DJY9x02x6m0GXv7uNPBbWbheuU51psB-13Ra7Rutm2LqBze0cqxqW-NQ27a1DscR96rdyw6xrgvqZSVV1UlZdVrrpnT7um4HhdVYyZ3qalFXeDHky9XNkuOpoJQW7Jv9blcV3gzo05YeKTfb1YNlhycMQkohH4WUszd55LiWrhQcX9Na0oci9ltChuWURF15Sjn9o2TKfovlZq3QB3haXfr8x_cM3G0rluj7_w7ltkxaY7nu8ycAAP__mVoF_Q">