<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/94170>94170</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
missing fold: fabs(-x) -> fabs(x)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
good first issue,
llvm:instcombine,
missed-optimization
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dtcxzyw
</td>
</tr>
</table>
<pre>
Alive2: https://alive2.llvm.org/ce/z/iJ9_64
```
define float @src(float %0) {
entry:
%1 = fneg float %0
%2 = call float @llvm.fabs.f32(float %1)
ret float %2
}
define float @tgt(float %0) {
entry:
%2 = call float @llvm.fabs.f32(float %0)
ret float %2
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUks-O2yAQxp9mfEGJ8IDj9YFDtqkPfYkK8OBQYRMZkm7y9BVOttmVethKluz583l-DJ9OyY8zkYLmFZpDpc_5GBc1ZPt2u_6uTByuah_8hRDEnh1zPiUQe8AesNdrfhvCZdrGZQTsLQH2N8De_-h-7iTwA_A97PjjWcOBnJ-JuRB1ZiB5WizgyyPEhgN2DNrXezPNebmWgWvESkPNQByYm2lkH0TPOq51q0N4zlgRnTZp6wR-nFYDdu_ahfLzj_hgbw-Pj3-y5zF_mf1_0fiX0T7vtxqUGDrR6YpU3dataLoasToqEto6jo2pJTkSRNjJnTQdGUdC2JfKK-Qo-Y4j8ho5bnXbSt1qS2bgTrY1SE6T9uHvlVc-pTOpTtYtr4I2FNJqJMQxxoE5v6TM1h5ABPwGiEUKYu_nlG2cjJ-fpcmnRMMmnrKf_E1nH-dSaw7VoopsY85jKivzKacnQ_Y5kCpiP4_MxTAUq5aVAr5s3sqdbEB8f8-URHVegvps5tHn49lsbZwA-xXy_tqclviLbC6mLgdJgP39vBeFfwIAAP__VvTwjw">