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

    <tr>
        <th>Summary</th>
        <td>
            [VectorCombine] foldInsExtFNeg -support mismatching extract/insert indices
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            missed-optimization,
            llvm:transforms
      </td>
    </tr>

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

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

<pre>
    foldInsExtFNeg is currently limited to `insert(dst, fneg(extract(src,idx)), idx)` patterns with the same extract/insert index.

We should be able to handle cases where the (legal) indices are different with suitable shuffle masks + costs.

CC @ParkHanbum who's handled similar cases in the past
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsUk2L2zwQ_jXyZUhQ5K_44EPW-4a3FEppoT3L1tierj6MRt7N9tcXO2EPpSAQ0jDPxzyjmWnyiK0on0T5nOk1zSG23z5_Jxd81gfz3o7Bmk-e_7ul6xecgBiGNUb0yb6DJUcJDaQAopLkGWMS6mw4CdXB6HES6oy3FPWw_XMchOrI3IRq9tPB41FJWHRKGD3DG6UZ0ozA2iF8dF_v8EDe4O0o5EXIy08EnsNqDfQIure4KZm1NxZh0IwMbzNG3NGEOluctBWq2TBoQAYdEQyNI25-7sS8UtqReF7H0SI4zS8MQj3BEDjxg7nrQBTyq44v_2vfrw7e5iBUzQ92A0yOrI4PGeR3DYvmlJk2N03e6AzbU52fq1rmdZ7N7VCZU1FJVRR5U1S1PNeyycdToQtZ97UsMmqVVKVUsjidyibPj5U057zKdd_Ishz6UhQSnSZ7tPbVHUOcMmJesT2psqrLzOoeLe9ZK-WIGc0hLIkc_daJghdKCdUJpbZ2kV9S1J7HEB1vlfI5i-1WOfTrxKKQlrZxfFAlSnZfpB84pBC74HryKMpn-GuDDrwuS4gJHLHTaZjJT_-MeYsoW6Nt55QWFvlFqKtQ14nSvPbHITihrrvU-3VYYviFd4zNNgt1fTh_bdWfAAAA__9b4_Y2">