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

    <tr>
        <th>Summary</th>
        <td>
            [X86] Poison-unsafe shl(x,1) -> add(x,x) isel patterns
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:X86
      </td>
    </tr>

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

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

<pre>
    Branched from Issue #49812

https://github.com/llvm/llvm-project/blob/6f7f5b54c81be59ec7876649d1f9aa6b104658ec/llvm/lib/Target/X86/X86InstrCompiler.td#L1761-L1770

The comment admits to the fold being unsafe, and just hopes it'll be OK - but now that we have better poison detection/handling in DAG we should be able to adjust these patterns to make them safer.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVkk1v3CAQhn-NfRntymBj4ODDJttWUSq1anPoFcx4TYJhZXCS_vuC049cK1mDmfHM-7xgHczP4WZVfpzRwLSGBe5i3BAq2nZSEFo156o5vcU5pWus2lNFP-bnYtO86eMYlrxx7vnPcriu4RHHlLfaBZ2XfuIT06wbBdHIJI5c8L7vpCGTVKrXpOl6JnB8N8eWvge1XrDM-SH6t3jnY1pvw3K1DtdjMpnyM-E9OeTIm_esDzNCRlvQJ1BmsSlCCpBydgrOgEbrL7D5qCas6C0ob-BxiwnmcMUINqty5_Jn8OUeDqC3BD685H6V4AVhVs-YiynhCtdgY_BgMGXTNvhMOudxrghYD-fTp9IR57DtuqC0w8KizC6YkSLCVZVZfodc1BOW9AKFbj3WOJC-bxgXTIraDK2RrVR1ssnhULGbcjrsDF93jsObp6znKipeszdSUQmHqv2QFc3v3GvJ2Yjur3C9rW747wu25V-J-YVxwmQ9DyMhRkyso63mLZVcdNxMwjDeNkQ2TNdOaXSxYFeUajU-oTdZcb9hmm3UdqANpY0gjLBOMn4cldGd6DottO7l1Fddg4uy7lhYjmG91OuwY-ntEnPR2Zjiv6KK0V487idV5qstzWEdvt1_t0vw9e5g2PF_AZZy9kI">