On Thu, 1 Sep 2022, Aldy Hernandez via Gcc-patches wrote: > Now that we keep track of the signbit, we can use it to fold > __builtin_signbit. > > I am assuming I don't have try too hard to get the actual signbit > number and 1 will do. Especially, since we're inconsistent in trunk whether > we fold the builtin or whether we calculate it at runtime.
The main thing to watch out for is cases where, in the abstract machine, there is a single call executed to __builtin_signbit, but after code transformations, some uses of the result of that call are optimized to use a 0 or 1 value and other uses end up using a runtime value - inconsistency between different calls is fine, inconsistency where only a single call is executed in the abstract machine isn't. (Cf. bugs 102930, 85957, 93681, 93806, 93682, for example; the test in bug 93806 comment 27 is the sort of thing to try.) -- Joseph S. Myers jos...@codesourcery.com