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

    <tr>
        <th>Summary</th>
        <td>
            [IR] IRBuilderBase::CreateBinaryIntrinsic - attempt constant folding
        </td>
    </tr>

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

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

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

<pre>
    c411965820eb803dd7eac39f80357cad663b7ba0 has to handle constant folding of many common intrinsics because IRBuilderBase doesn't currently handle it:

Intrinsic::smax
Intrinsic::smin
Intrinsic::umax
Intrinsic::umin
Intrinsic::maxnum
Intrinsic::minnum

Can we add a suitable IRBuilderFolder::FoldBinaryIntrinsics function?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0Us1u4yAYfBp8QY0w2MY--NA0shTtLfsEH_A5ZoUh4mfbvP3KSbvdn-YyIEYzMHwDKdmzRxxJuyftoYKSlxDH07fvdg2-UsFcR93U9dC1PWeoeiaMkQhaDHPPRCs1mK4TSipgdIFEc6ALeOOQ6uBTBp_pHJyx_kzDTFfwV6rDugZPrc_R-mR1ogo1lIT0eNoX6wzGPSSkJmDyhMtMdYkRfXbXD2-biXgm7EDYOx4_zLZz8ZxWeHtAWP8lUR4pyiPFCm--rF9T1v-m7vgCnr4iBWMo0FRsBuX-yDuFDe_ibb-3HuL1-PlDc_E62-CJmCozCjOIASoc60729dAx2VbLaLiZYWh7qYTota5NY9AMWs9ScylbqOzIGRdMMFkL0Yh2J5VRfdPwrm05mk6ThuEK1u2c-7nuQjxXNqWCY1fzhlUOFLp0awrnHl_pjSScb8WJ46Z5UuWcSMOcTTl9umSb3a1ixxNpD3-P-R76JSJk_Cc2faKQM66X_F-ZqhLduOR8SZueT4RPZ5uXonY6rIRP29Xvy9Mlhh-oM-HT7cGJ8OkW6FcAAAD__09T94k">