llvm-project
0130acf8 - [KnownFPClass] Do not propagate non-NaN through `asin` and `acos` (#213812)

Commit
11 days ago
[KnownFPClass] Do not propagate non-NaN through `asin` and `acos` (#213812) `KnownFPClass` incorrectly assumed that a non-NaN input to `asin` or `acos` implies a non-NaN result. However, both `asin` and `acos` can return NaN from a finite input when `|x| > 1.0`, such as `asin(2.0)` or `acos(2.0)`. I have fixed this by removing the calls to `Known.propagateNaN(KnownSrc)`, which incorrectly propagated that `asin(non-NaN) == non-NaN`. I discovered this while working on https://github.com/llvm/llvm-project/issues/211686. The same issue was previously noted in a post-merge review comment on https://github.com/llvm/llvm-project/pull/190609#discussion_r3632814122 AI disclosure: I used OpenAI Codex (GPT-5.6-sol) to help generate the test updates, which I reviewed and tested locally.
Author
Parents
Loading