[llvm] [ConstantFold] Special case atan +/-0.0 (PR #143962)

Lei Huang via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 13 13:18:36 PDT 2025


================
@@ -2549,6 +2549,9 @@ static Constant *ConstantFoldScalarCall1(StringRef Name,
       case Intrinsic::cosh:
         return ConstantFoldFP(cosh, APF, Ty);
       case Intrinsic::atan:
+        // Implement optional behavior from C's Annex F for +/-0.0.
----------------
lei137 wrote:

It think there are multiple places this will need to be added and we need to look into a better way to fix then just add for individual cases as it shows up.  I can add it there if you like, but there are no tests for it currently.   This PR is just to provide a fix to https://github.com/llvm/llvm-project/pull/143416 which broke the aix bot.

https://github.com/llvm/llvm-project/pull/143962


More information about the llvm-commits mailing list