[llvm] 43dd567 - [EarlyCSE] allow flexibility in atan(-0.0) test

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 12:04:17 PDT 2022


Author: Sanjay Patel
Date: 2022-08-10T15:02:01-04:00
New Revision: 43dd567443e1faf0c3c6912c432cd94c47261778

URL: https://github.com/llvm/llvm-project/commit/43dd567443e1faf0c3c6912c432cd94c47261778
DIFF: https://github.com/llvm/llvm-project/commit/43dd567443e1faf0c3c6912c432cd94c47261778.diff

LOG: [EarlyCSE] allow flexibility in atan(-0.0) test

As discussed in the post-commit feedback for b53d44fe47413c87f619b,
this test was failing on AIX because atan(-0.0) results in 0.0 (positive).

Differential Revision: https://reviews.llvm.org/D131601

Added: 
    

Modified: 
    llvm/test/Transforms/EarlyCSE/atan.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/EarlyCSE/atan.ll b/llvm/test/Transforms/EarlyCSE/atan.ll
index a50403bcb0277..194de3d608af6 100644
--- a/llvm/test/Transforms/EarlyCSE/atan.ll
+++ b/llvm/test/Transforms/EarlyCSE/atan.ll
@@ -1,10 +1,11 @@
-; XFAIL: system-aix
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -early-cse -S < %s | FileCheck %s
 
+; We allow either sign to provide flexibility for mathlib
+; implementations. The POSIX standard is not strict here.
+
 define float @callatan0() {
 ; CHECK-LABEL: @callatan0(
-; CHECK-NEXT:    ret float -0.000000e+00
+; CHECK-NEXT:    ret float {{-?}}0.000000e+00
 ;
   %call = call float @atanf(float -0.0)
   ret float %call


        


More information about the llvm-commits mailing list