<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/87523>87523</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
-fno-unsafe-math-optimizations enables constrained intrinsics
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
topperc
</td>
</tr>
</table>
<pre>
I expected -fno-unsafe-math-optimizations would be the default behavior and only undo -funsafe-math-optimizations. Instead it enables constrained intrinsics. https://godbolt.org/z/ooYdY4Kox
I checked with @andykaylor who thought this behavior might be because gcc documentation says -fno-unsafe-math-optimizations implies -ftrapping-math. gcc has -ftrapping-math by default, but clang does not.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEks1u3DoMhZ9G3hA2NJInc2fhRW4DA4M-QZb6oS01smhYVCaTpy_GbRGgRZuNBIjUIfnxmFLinBEHcfxfHJ8aUznQNjCtK26useRvwwXwbUXH6KGdMrU1FzNhuxgOLa0cl_huOFIucKWaPFgEDggeJ1MTg8VgXiNtYLIHyukGNXuCdvqrTgeXXBiNh8iA2diEBRzlwpuJGT3EzFvMJbrSQWBei9CPQo1CjTN5S4k72mahxnehRqJn_9x_pTchn4R8_HFewAV0L-jhGjmA6KXJ_vZibok2uAYCDlTnwMAhlo8Jlnh_swgWnakFYXYOPLm6YOa9dyjmVj7DFJc1Rbyn8WbWNeZ5z-p2uWD-CIC9_aIp1BewlcElk2fwhAUycdf4QfuzPpsGh8PpoA4PWvayCYM59Oi0PkstndVqQimdNO6o_HnyWusmDkqqXvZSHx6OspfdySs7TV5JhUaeVC96iYuJqUvpdblzbWIpFYf_Tkelm2QsprK7R6mMV9iDQqm7mbbh_qe1dS6ilykWLh8qHDnh8Ampfy-_qVsaftt_5FBt52gRarzX-nm160bf0LFQ495hEWrcJ_geAAD__xpqCgA">