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

    <tr>
        <th>Summary</th>
        <td>
            [DAG] Nodes should be consistently processed in topological order
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            llvm:SelectionDAG
      </td>
    </tr>

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

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

<pre>
    @deadalnix has done a lot of work on this, but there is still a great deal to do, and really the work needs to be split between a lot more people.

The WIP draft PR is currently at https://github.com/llvm/llvm-project/pull/77475 - but the individual regressions need to be raised as their own issues/PRs to be addressed. So far #77475 only covers X86 but once more of those regressions have been addressed we can begin to add in the diffs from other targets as well.

A common problem is that existing fold patterns are too rigid - often they could be replaced with a value tracking test instead of matching a specific node.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU8GO6zYM_Br5QmxgK068OfiQdpGiKFAsdgu0V9qibfXJoiHSycvfF3JeWuyxF1uARhzOcIgifoxErTn8ZA5vBa46cWo_fvv0M8eiY3dvTV06Qoch-u8woYDjSIAQWIEHuHH6BhxBJy_G_gzdqqATJQIvIOpDAIQxESo4wgDK4DgDMTpIhCHcM_5RJxI5yZCOQJbgFTrSG1H8wTdzIliIl0A7U76Z8vz4_jER_PnrO7iEg8L7R-bu15QoargDKkyqi5j92diLsZfR67R2u55nYy8hXJ-_lyXx39SrsZdlDcHYS9PUzQFenqrAR-ev3q0YINGYSMRzlK3vH20n9EIOUDLeJ-BbBC-ykhh7ef94qkPn8mtyO_hkGDCBsfsHG8dwh56vlAT-ej1u3Bx7eqjnAXRioS_8E14Jus2nZ124EfQYoaPRx0yKzkE-TQTOD4PAkHgGzrMCxTSSSu76RiF88fYMPc8zR1gSd4Hm7K1OqEDfvaiPIwwcHCyoSikKYCJQZkh-9A5egAeljTaLWoPbTKIlYJ-b9DoBwhXDSqAJ-2-5oJIo-ChK6LLgGbWf8gWCLNT7wfcQ2dGucO3enfYnLKitmvJkq6qqy2Jqj4jWVdhUg22OnW267lgOZVUh1d3R0anwrS1tXVp7quzBVqcd7cuyO70eX4_7Bitbm7qkGX3Y5WDsOI3FNsX2dV9bWwTsKMi2NtZuCdqfPylQr57j2_kXY23ep9RuserWUUxdBi8q_9VTr2HbvIw_vMHv7EhApqdJPUfxoo8ML4n7x1y3aS4cePQ9BuDkKBVrCu3_zvi_sdw0_RMAAP__5k5fgQ">