[Diffusion] rGb53d44fe4741: [EarlyCSE][ConstantFolding] add tests for atan/atan2; NFC

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 08:37:34 PDT 2022


hubert.reinterpretcast added a comment.

In rGb53d44fe47413c87f619baf9e057f2a2e49d3998#1114254 <https://reviews.llvm.org/rGb53d44fe47413c87f619baf9e057f2a2e49d3998#1114254>, @spatel wrote:

> This is the test in question:
>
>   define float @callatan0() {
>   ; CHECK-LABEL: @callatan0(
>   ; CHECK-NEXT:    [[CALL:%.*]] = call float @atanf(float -0.000000e+00)
>   ; CHECK-NEXT:    ret float -0.000000e+00
>   ;
>     %call = call float @atanf(float -0.0)
>     ret float %call
>   }
>
> And if I'm seeing the bot log correctly, a result of "0.0" (positive zero) was returned for an input of -0.0.
> That doesn't match the IEEE-754 spec:
> "For the functions expm1, exp2m1, exp10m1, logp1, log2p1, log10p1, sin, tan, sinPi, atanPi, asin, atan, sinh,
> tanh, asinh, and atanh, f (+0) is +0 and f (−0) is −0 with no exception."

POSIX does not require IEEE-754 conformance.


BRANCHES
  main

Users:
  mohammed-nurulhoque (Author)
  spatel (Committer)

https://reviews.llvm.org/rGb53d44fe4741



More information about the llvm-commits mailing list