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

    <tr>
        <th>Summary</th>
        <td>
            missed fold, fneg(t ? c1 : c2) => t ? -c1 : -c2
        </td>
    </tr>

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

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

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

<pre>
    https://alive2.llvm.org/ce/z/RWUbrQ
https://godbolt.org/z/qd5Tqbrzc

```llvm
define float @src(i1 %0) {
entry:
%t2 = select i1 %0, float -1.000000e+00, float 1.000000e+00
%t3 = fneg float %t2
ret float %t3
}

define float @tgt(i1 %0) {
entry:
%sel = select i1 %0, float 1.000000e+00, float -1.000000e+00
ret float %sel
}
```

@jayfoad @regehr 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU8FunDAQ_ZrhYu3KHsMCBw6bbLm3atWzsQdwZHBieyPtfn0FbNJkq1ZFCCS_eW_eYwYVox1mogaKByhOmTqn0YfmOtI8XNQ81Jh13lyaMaXnCPII2AK2ytlXwr1zr9PehwGw1QTYXgHbbz9_dOEr8BPw42fS4E3nXboRltoXU3x_6cJVb-W354Fv96K-HRnq7Uysd14lBjmPQQNWVjDAggPWDMqHrZLmFC5Lx00Ki4QM5IlFcqQTe6c83sR2Ys_XiwAf-Afg7vxdTq5y_UzDm52lx4YHSh8O5Y1Unj6mu4-ShvS_USK5f2b5W5T7jH96jeTuzb4N4dNkcv6kLr1XZnEeaKAxsMw00tSyVhk1ohQ8l7yqeTY22ojakK66qtKVrg-kyrwvy76SZLjmeWYb5JhzKXJR5ELyvTAce3HoKjxoXeoKck6Tsu59zzIb45maqsBCZE515OK6t4jrrsijnWPSfursTIAI-AiIk42RzM4_JzvZq0rWzwtWnLLQLLRddx4i5NzZmOLvVskmR81GZr13Zv2gMw2AVWIgW6YFA3lkGtexyRPIL2xDdjdopzE7B3f38ww2jedur_0E2K7Gt9fuOfgn0gmwXXNGwHaN-isAAP__weQITQ">