[PATCH] D127964: [DCE] Eliminate no-op atan and atan2 calls

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 11:10:22 PDT 2022


sepavloff added inline comments.


================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:3257-3260
+      case LibFunc_atan2:
+      case LibFunc_atan2f:
+      case LibFunc_atan2l:
+        return true;
----------------
Both GLIBC and POSIX docs say that atan(0, 0) is 0. But C11 says (7.12.4.4p2):
```
... A domain error may occur if both arguments are zero.
```
Could you please elaborate this question?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127964/new/

https://reviews.llvm.org/D127964



More information about the llvm-commits mailing list