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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 10:52:58 PDT 2022


spatel created this revision.
spatel added reviewers: hubert.reinterpretcast, mohammed-nurulhoque.
Herald added a subscriber: mcrosier.
Herald added a project: All.
spatel requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

As discussed in the post-commit feedback for b53d44fe47413c87f619b <https://reviews.llvm.org/rGb53d44fe47413c87f619baf9e057f2a2e49d3998>, this test was failing on AIX because atan(-0.0) results in 0.0 (positive).
I don't have an AIX system to test this pre-commit, so posting for review in case we can check that first.


https://reviews.llvm.org/D131601

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


Index: llvm/test/Transforms/EarlyCSE/atan.ll
===================================================================
--- llvm/test/Transforms/EarlyCSE/atan.ll
+++ 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131601.451554.patch
Type: text/x-patch
Size: 688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220810/f5f89489/attachment.bin>


More information about the llvm-commits mailing list