This is an archive of the discontinued LLVM Phabricator instance.

[Flang] removing Float Bessel functions for AIX
ClosedPublic

Authored by madanial on Oct 17 2022, 9:16 PM.

Details

Summary

AIX libc only provides bessel functions j0,j1,jn and y0,y1,yn but doesn't have their float equivalents j0f,j1f,jnf and y0f,y1f,ynf. These functions cause a build failure on AIX, taking them out results in a clean build.

Diff Detail

Event Timeline

madanial created this revision.Oct 17 2022, 9:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 17 2022, 9:16 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
madanial requested review of this revision.Oct 17 2022, 9:16 PM

What happen when you have code that requires these functions?

AIX was not on the target list for flang so it had to be added before answering your question. If those functions are required at compile time it results in a semantic error as these float bessel functions cannot be folded. If these functions are required at runtime it results in a undefined symbol linker error as it looks for jnf but cannot resolve it as it was taken out in order to be able to build.

clementval accepted this revision.Nov 18 2022, 5:47 AM

Just add comment before merging.

flang/lib/Evaluate/intrinsics-library.cpp
298

Can you add a small comment so we remember why it's done.

This revision is now accepted and ready to land.Nov 18 2022, 5:47 AM
madanial updated this revision to Diff 476546.Nov 18 2022, 11:46 AM

Adding comment as requested

madanial marked an inline comment as done.Nov 18 2022, 11:46 AM
This revision was automatically updated to reflect the committed changes.