[PATCH] D127964: [DCE] Eliminate no-op atan and atan2 calls
    Rainer Orth via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Aug 19 07:55:58 PDT 2022
    
    
  
ro added a comment.
I've looked around some more and it seems the Solaris `libm` acts within the C standard: all of C99, p.219, C11, p.239, and C17, p.147 state
  A domain error may occur if both arguments are zero.
I've also found the atan2 docs on cppreference.com <https://en.cppreference.com/w/c/numeric/math/atan2> which says the same, adding
  If the implementation supports IEEE floating-point arithmetic (IEC 60559),
  
      If x and y are both zero, domain error does not occur
      If x and y are both zero, range error does not occur either 
IEC 60559 support thus seems to be lacking on Solaris and, given that's it's optional, the LLVM testsuite should cope either way.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127964/new/
https://reviews.llvm.org/D127964
    
    
More information about the llvm-commits
mailing list