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

Lei Huang via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 16 10:04:14 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:

This fix is more valid then changing the test case IMHO.  
Would you like to provide a separate test case for LibFunc_atan?

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


More information about the llvm-commits mailing list