From d59f7b0f307e2ad80d13c5078ff654c3c13df1e4 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Fri, 22 Apr 2022 12:47:46 +0200 Subject: BUG: Move FPE clearing to work around issue on clang I am not sure why the previous places led to (oddly) unreliable code on some Mac clang versions. Moving it here fixes it, so it is all fine. There was previously some inlining, which we should be able to trust the compiler to do (as an attempt to get back to the same result as the macro version. But it turned out the issue was moving down the FPE clearing till after we know we actually do the operation. This also removes an unused function for true division IIRC. --- numpy/core/setup_common.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'numpy/core/setup_common.py') diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py index 1143872b1..44fa0a651 100644 --- a/numpy/core/setup_common.py +++ b/numpy/core/setup_common.py @@ -183,6 +183,8 @@ OPTIONAL_FUNCTION_ATTRIBUTES = [('__attribute__((optimize("unroll-loops")))', 'attribute_optimize_unroll_loops'), ('__attribute__((optimize("O3")))', 'attribute_optimize_opt_3'), + ('__attribute__((optimize("O2")))', + 'attribute_optimize_opt_2'), ('__attribute__((nonnull (1)))', 'attribute_nonnull'), ('__attribute__((target ("avx")))', -- cgit v1.2.1