On Tue, 28 Sep 2021, Hongtao Liu via Gcc-patches wrote: > Yes, that's why I didn't follow the existing pattern, i think we can > add optimize back to the condition, but not canonicalize_math_p () > since there's no math function for _Float16.
At some point we should add _Float16 functions to glibc, but that's trickier than for the _FloatN / _FloatNx types that are already supported there because of the implications for minimum compiler versions supported (_Float16 functions could be supported in glibc for AArch64 and Arm by increasing the minimum compiler version for building glibc for those architectures to GCC 7, but not for x86_64 and x86 until we're ready to require GCC 12 or later to build glibc for those architectures), and we'd need to think carefully about design questions such as when functions are implemented using _Float16 or float arithmetic or just wrap float functions as a starting point. And for generating calls to such functions GCC would need to know whether the libm implementation provides them or not. -- Joseph S. Myers jos...@codesourcery.com