[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 6 10:08:52 PDT 2022
sepavloff added inline comments.
================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:3189
+ case LibFunc_atanl:
+ return !Op.isDenormal();
+
----------------
Should we check for denormal argument?
C11 standard (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf, 7.12.4.3) does not mention any error condition. GLIBC documentation (https://www.gnu.org/software/libc/manual/html_node/Inverse-Trig-Functions.html) also says nothing about it. POSIX (https://pubs.opengroup.org/onlinepubs/9699919799/functions/atan.html) says range error is optional.
Can we safely assume `atan` never sets error?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127964/new/
https://reviews.llvm.org/D127964
More information about the llvm-commits
mailing list