<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/75786>75786</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
missed optimization around std::signbit(x)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
k-arrows
</td>
</tr>
</table>
<pre>
Test case:
https://godbolt.org/z/d75s1EYWd
```cpp
#include <cmath>
bool foo(float x) {
if (std::signbit(x))
return (x > 0.0);
return false;
}
```
Alive2 proof:
https://alive2.llvm.org/ce/z/bRufWD
Original test case (from gcc testsuite):
https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.dg/tree-ssa/vrp-float-signbit-3.c
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8Us2OnDwQfJrmYoFMexjgwGH2m-H6SVGkVY7-g3FiMLLN7GafPjJDdkdRNpIF6uqiXF00D8GMs9YdVE9QnTO-xqvz3Y-ce-9eQiac-tl91SESyYMGdgJ6Bnq6xriEVGEP2I9OCWdj4fwI2L8B9qquQnn59qzudDjS-5HLsiPIzCztqjQB9p-ceLwCu-y97Smcs2RwDrAZrOORvAK2BOqne5sQMxDAJkSVfLBTmkOYCNgkYjo7jxCv4-rnxH4lwC6EFjT12bvUThi4TTPuMNTnP9w_2jtZc9NIFu_c8EksfKMU1t6mPRqp93zEl3V4Pj_q_e_NaGZuSfwddvI7eDeRUcoNDauJejP-979g4nUVhXRTKqTMJ-O98_ci3WmdAOwnHqL-QB-EE1Ko5DN6rfMQOGB_80u-5Z_vAeeskJnqmGpZyzPdlTXFltL60GbXrmk0a2pWNRWVXJXVUVXsUCuNQiErRZWZDimyEsumLKuW1kVzrKQqJaoDlXwYBjhQPXFj32PLTAir7uqqbo6Z5ULbsC0r4qxfyNYExLS7vkvf5GIdAxyoNSGGD5VootXdZELQirglmsm88WjcTLh366zIJ4uUrd52_wg6XbC_8sW771pGwH6zFQD7zfavAAAA___AFwZO">