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

    <tr>
        <th>Summary</th>
        <td>
            HWASAN: No DW_OP_LLVM_tag_offset with opt above -O0
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            compiler-rt:hwasan,
            llvm:transforms
      </td>
    </tr>

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

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

<pre>
    DW_OP_LLVM_tag_offset is present in -O0, but not -O1 https://godbolt.org/z/3dj6bzz4z

Reasons is `AssignmentTrackingPass` and `-instcombine-lower-dbg-declare` replace `@llvm.dbg.declare` with `@llvm.dbg.assign` but we don't attach DW_OP_LLVM_tag_offset to `@llvm.dbg.assign`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0UsFO3DAQ_ZrJxUrktZPs7iGHFBT1QAG1VTmuxsmQGBx7ZU9YsV9fZUGiQuViS37PM_PePEzJjp6ogeobKPViGd2rWZ4RlILqOsOFpxCbj_fMhOG1uX443N0fbm7-_Dgwjofw-JiIhU3iGCmRZ2G9yO8kqCthFhY-sMjvNmJiPibQLagOVDeGwQTHRYgjqO4MqtPDU23O5_IM8hpk-3b-JEzBp7U61LK9DDyT598R-2frx3tMCWop0A8rIbc-cR9mYz3lLpwo5oMZ84F6h5FWYqSjw55WMpTSuZe5GMxY_MM4WZ4-w29Oreiq6ERiCB7UlgUyYz-J_1vC4cs6RTY0etjrPWbUbLZS7-Su3FfZ1GhT6hJNVVOleqxxJ0lXA_ZY7ZGGapvZRkmlN0rtpZS7TVmQIlJSb6isd1uDGyglzWhdcWkb4pjZlBZqtnVVVplDQy69r7wP89E6inlk0O10woR-Xb66AqXW76BbjujTY4hzeo9FbFYkN8uYVm02cfpoxZYdNd8f2l_tLehW3IYvzLnYHI4s0IQXWgOTLdE1n1JieVpM0YcZVHeZ5-3KjzE8Uc-guou2BKq7yPsbAAD__9_j6O8">