I tried replying to an old thread but got no response. So I’m trying someplace else.
My target machine has hardware instructions for ldexp, frexp, atan2, asin, acos, atan, rsqrt.
I want some suggestions on how to generate them.
I suppose the options (e.g. for atan2) are:
- Match them in TargetLowering::LowerCall().
How does one insure that the name “atan2” was from math.h and not just some arbitrary name? - Have the front end (clang) generate an intrinsic.
a. Target specific - is there a target that has done this for math calls?
b. New generic llvm.atan2… Why are some libm routines implemented with
intrinsics, e.g., llvm.sin., llvm.cos.* and some are not?
c. Are these intrinsics dependent on __builtin_atan2?
Ideas please. Thank you.
brian