From patchwork Mon Feb 3 21:24:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 861573 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:11cb:b0:385:e875:8a9e with SMTP id i11csp14932wrx; Mon, 3 Feb 2025 13:26:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW3hJWnV6ccoHoh+wbL7IBvvhw024v9DIiVakZpN5A7MSl1z991rrxT4fRm5hL4opAxdbmmjA==@linaro.org X-Google-Smtp-Source: AGHT+IH/9lzs1oEfoAOppGO4UY3gdVS72g50Jj5pvT3f/wOWbzAig69VuTDKZ0VVgE4ab78e4d/F X-Received: by 2002:a05:6214:2468:b0:6d8:aa52:74a3 with SMTP id 6a1803df08f44-6e243c7320cmr366669536d6.28.1738617990862; Mon, 03 Feb 2025 13:26:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1738617990; cv=pass; d=google.com; s=arc-20240605; b=JlbvPifOCGkyppt2XT6kI9fiOcU7J3NU88LCWuA6gcFDiF+wx3n0epIThJKcV2aQd7 MrlxHXbxIJhz9wWPa5Myno1yr4IFqCk2jW+829Nj8rLUIwDZIJT1xiPDYQyrIyM+3K4k 2c3W8k+iaqpYS1SHTuq0GPFYXM5zgpgnRPfPB0vBiZthtMUe5TkZAfIwMKJRVh9X8qVe bWAAYXO/S6OokgvObgTlKMhEk2igbTGL1Z1QsIaZrvABPAtmEJQfx2Fs6u34qLVH0jKV KlHKzKe0V+F2/bIGR792L+8CsrHzkLmwc10BdDGmPg/XMf7R1M03iE8J5mGSQsGU7PPh Y+BA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dkim-filter:arc-filter:dmarc-filter:delivered-to:dkim-filter; bh=bcrrfDtAuxNpr16fmOd2COz8yAVg3PRri04Nd0ZoRP8=; fh=Pi2apwTyRle/crbOq6UOyUkSwIydBObhkp/dAjam2Pw=; b=O4dMvjwb/cYRYtwtwsQ0OLIo6vDfk6qp/m37fB9DYcFqY2ref/7peE802Hurq7G7Dy FtIfjKVpjY78r2u/KvP9Sz46k9YG661Js1B0gFWjYu4uZDFgiRmDu/W/dTZuNdrvtI+d yPcLUc0fQTwIaN4jHKyZAEH9oyYAA2Jj0+OvWHOnj/bH/2Z5edHuCljhwAq1Iz0XUwGT RN4XPRqO+sa9aK0qO++CwRpjZjJLMWcXV/BIZuVDWO73pfqhK7Tnwn9pWDWaKYa85pVI uzVsF+7YfkwvyFTE3o37pZjI6LJFOvdk+JvG5V7Rft+YD1T73TqiMzjDWENjID0MkcgR l7fQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s18A2y8e; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 6a1803df08f44-6e41fdd7fb6si9923976d6.17.2025.02.03.13.26.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 13:26:30 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s18A2y8e; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 197B83858C56 for ; Mon, 3 Feb 2025 21:26:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 197B83858C56 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=s18A2y8e X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id 64C4B3858D20 for ; Mon, 3 Feb 2025 21:25:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 64C4B3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 64C4B3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::102f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1738617953; cv=none; b=OCiUqzkZ9SqqCyh3Umevh2E1hRB+HAlWwhmHsrSw16ZzcVu7/N3Kj/kMTxoJTvFl4fDbQaaulR8jUbUvwsbRLbu70ToQl1kOpn79R2R3Rak/fsGOa/+mmIPhAM5BebOxXwrLRsDyT1TA8klGiGJilonOuVd7psrbfFIuHJ/UfeA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1738617953; c=relaxed/simple; bh=x0Mf/OHxvntnXYWigIfo3sxugDYieIJJxuxoy7cN9ls=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=t0MUWlZ9yHvKTKdFqsYFcg9bxkfdnByxZqtbmCvY+KsF0x5C+zx/CjxHKfsVFjfKMapp3sV4bn/xiEYAPzMR3v86ZXYraMVIThk1IOXXnak064k9R/cgA4cYvGnedruq+xDBi5MyP6t4p1+MTEMN1NKlHV/3hMOX4GH+4GFedDI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 64C4B3858D20 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2ee51f8c47dso6424753a91.1 for ; Mon, 03 Feb 2025 13:25:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738617952; x=1739222752; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bcrrfDtAuxNpr16fmOd2COz8yAVg3PRri04Nd0ZoRP8=; b=s18A2y8e+S7fKN+kA/1Hxo8zl9BP6s7XkCXvDlorWLY4mMuHOUEJrM0u3Y41st7+pS 5tUbigfMed+1bDqx09rcaLbPOhvft77q/tFjT/ETmqrqm+IyX6m7dhZ5nYFHq/uDQIFk aQiqttvsAsgYFna/HKWmM/g9rJaUPviNE3vr0tTOJ1asbT/BvhLfFZiWVZ1kaxTZD83w k2dcK197NIU82oYiLGV3qV08sR+XSrQHYJj0p7NmtcsXibOwoQyQrdq++L+cKp4RQeQX O7FYvYxPtONPP5PaVAI5DL9xRX33Ld5KfpzKj2UI8VTALFcvI1AvpqQ/6sxinH6ACMfU uDtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738617952; x=1739222752; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bcrrfDtAuxNpr16fmOd2COz8yAVg3PRri04Nd0ZoRP8=; b=w5daGNzy93XUH6/U0bhvBnlMehqCShbnJ+F27wxPLSMwIjHCwpQYLExYaGKzEtB6l+ F1Wp/2kZScH8AXovv8SV8wKFa/NoqRhlZnRP2jIwglL2gfdr6/LdOtoFz2qOg5YHRoVj M9vO7V6pTOHzPRZ7iu1aB1yE7WxTDfCs4uXSsGm/swoKER6kx49f9mEucngFaT8Qy66s Y9y1lJ3D1i/vdJqRrYvlgnNnh1VuyvHvxH1bjAaZQVLzOO7wrs7FxmIytKTqfDdEPQzR b5ovAOWjPsA8aG0gA7PsQBh8/PKPF36lmlZKjCk1VxcZRPL306tI0Fz6nsXE5n9c1NjO OpMw== X-Gm-Message-State: AOJu0Yz4O2/xMd1vL1D/omTx8x9fIE8zZvxPgsoBepVX+vGh2kwjBKVB ursoHifC+s6s2Rz1X5t/1AZvM5p7adfTU+kiihbw0oxfyPZ64N8Zl7G17KEz+tUyoQmVsTrYJvV c X-Gm-Gg: ASbGncv2j3LsRyE/H4eQnP5d/++5J50Ajvi8xU/YwUXw/LW+wzemGyd+Ajmn7ljh3Wj UcvXnyg95ZkIgV494YiEmGNhvAgXJOQ2uOF2BYwXHUaV6h4zUVEIR0b9e74teFgYk9HiDnRbupz 4rYLl7NvJ4HrU/r6RkBO85fbD94Pa3cWgAcC55KCfauV7zxHxFmsvJYGu02+kH5m1fWKEmq2pcg EYGlj9R08LKr+DdS5Tb3MF0CFPpVFYCcaHNLzbMTZtEEe6ApLrmvDV0xbYySOsmzVDhfwypQXSC 8eQEon/EWX3gC/A1TOmfySjFFzcG X-Received: by 2002:a05:6a00:44ca:b0:729:597:4faa with SMTP id d2e1a72fcca58-72fd0c65895mr30860121b3a.16.1738617952071; Mon, 03 Feb 2025 13:25:52 -0800 (PST) Received: from ubuntu-vm.. ([177.103.113.88]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72fe69ba418sm9184218b3a.105.2025.02.03.13.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 13:25:51 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Paul Zimmermann , Alexei Sibidanov , DJ Delorie Subject: [PATCH 0/3] Optimize CORE-MATH internal tables Date: Mon, 3 Feb 2025 18:24:16 -0300 Message-ID: <20250203212546.911043-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org Some implementation share internal table, which can be optimized to avoid duplicate data. The are small code or no changes for x86_64 and powerpc64le, which do not affect performance; but on aarch64 with gcc-14 I see a slight better code generation due the usage of ldq for floating point constant loading. Adhemerval Zanella (3): math: Consolidate acosf and asinf internal tables math: Consolidate acoshf and asinhf internal tables math: Consolidate coshf and sinhf internal tables math/Makefile | 3 + sysdeps/ieee754/flt-32/e_acosf.c | 36 ++----- sysdeps/ieee754/flt-32/e_acoshf.c | 111 ++------------------ sysdeps/ieee754/flt-32/e_asincosf_data.c | 53 ++++++++++ sysdeps/ieee754/flt-32/e_asincosf_data.h | 37 +++++++ sysdeps/ieee754/flt-32/e_asinf.c | 38 ++----- sysdeps/ieee754/flt-32/e_coshf.c | 38 ++----- sysdeps/ieee754/flt-32/e_sincoshf_data.c | 49 +++++++++ sysdeps/ieee754/flt-32/e_sincoshf_data.h | 36 +++++++ sysdeps/ieee754/flt-32/e_sinhf.c | 37 ++----- sysdeps/ieee754/flt-32/s_asincoshf_data.c | 121 ++++++++++++++++++++++ sysdeps/ieee754/flt-32/s_asincoshf_data.h | 36 +++++++ sysdeps/ieee754/flt-32/s_asinhf.c | 109 ++----------------- 13 files changed, 382 insertions(+), 322 deletions(-) create mode 100644 sysdeps/ieee754/flt-32/e_asincosf_data.c create mode 100644 sysdeps/ieee754/flt-32/e_asincosf_data.h create mode 100644 sysdeps/ieee754/flt-32/e_sincoshf_data.c create mode 100644 sysdeps/ieee754/flt-32/e_sincoshf_data.h create mode 100644 sysdeps/ieee754/flt-32/s_asincoshf_data.c create mode 100644 sysdeps/ieee754/flt-32/s_asincoshf_data.h