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

    <tr>
        <th>Summary</th>
        <td>
            Faulty floating point exception due to SLP optimization
        </td>
    </tr>

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

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

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

<pre>
    The failing code is basically doing 3 similar operations which are done in one go thanks to SLP, except the 4th item in the vector used runs a 0/0 division leading to a floating point exception raised (I've enabled them).

A full reproducer can be found on godbolt : https://godbolt.org/z/sePnqh9ss
It also shows how gcc avoids the problem with to an extra instruction `movlhps` which makes sure that 0/1 is executed rather then 0/0

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0UsFu4zgM_Rr5QjSwlTi2Dz5ktzBQYA8Fdn9AlhhLW1n0iFLS9usHcgIMMMBcTNCkHh8fn2J2S0AcRfuXaF8rlZOlOPJGQWM1k_ka_7MIV-W8CwtoMgiOYVbstPL-CwyV_0dgtzqvItCGUSVHgeFunbagIoKhgOAClLAQJKvCB0Mi-PefdyH_BvzUuCVIFuGULLiEa2kv-Q11ogiZ0UDMgUFBLeRUg3E3x44CeFSmcEgECq6eVCrZRi6kJ3DpisoVCCH7NyG7GwIGNXs0Zcgq5HAQ9auoL4_vBa7Ze4i4RTJZYwStAswIV8rBAAVYyMzkE4jjBWxKG4vjRchJyOlZOVBchJy-hZwY38MPOzA_wN8SKM8EbOnOYOkOi9agbuQM7ytvkWaPK9xdsvtWAfAzRQUucIpZ7_uIc73SzduNxbl-Sr2qD2TgHLFInHahmnIu_ESdU1FQJYuxTAkPGR-UKjMezXAcVIVj09WnvmmHRlZ2NEOHLXbtYBpsu1ljLwd96rCfUQ5X2VdulLU81U09NG3bH-UBz_osrzU2Ta9r2aM41bgq5w_e39YiSuWYM45ddxpk5dWMnnfzSRnwDntRSFm8GMfy5mXOC4tT7R0n_oWSXPI4Tir79PXnq5uMT5sBbcmt7nv3ZpWjH387m0s2zwdNq5BTmfIML1uk_1EnIaedGws57dx_BgAA__-KoBTk">