On June 8, 2017 6:44:01 PM GMT+02:00, Joseph Myers <jos...@codesourcery.com> wrote: >On Thu, 8 Jun 2017, Richard Biener wrote: > >> For a built-in this is generally valid. For plain isnan it depends >on >> what the standard says. >> >> You have to support taking the address of isnan anyway and thus >> expanding to a library call in that case. Why doesn't that not work? > >In the case of isnan there is the Unix98 non-type-generic function, so >it >should definitely work to take the address of that function as declared >in >the system headers. > >For the DEF_GCC_BUILTIN type-generic functions there may not be any >corresponding library function at all (as well as only being callable >with >the __builtin_* name).
I haven't followed the patches in detail but I would suggest to move the lowering somewhere to gimple-fold.c so that late discovered direct calls are also lowered. Richard.