{"id":2221601,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2221601/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/or1pgn3hu1.fsf_-_@lxoliva.fsfla.org/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.1/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<or1pgn3hu1.fsf_-_@lxoliva.fsfla.org>","date":"2026-04-09T22:11:02","name":"libstdc++: simd: map 64-bit long double to double on sse [PR124657]","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"e5fb9b18382686d6c40799673e94eeeb489c4fe0","submitter":{"id":74937,"url":"http://patchwork.ozlabs.org/api/1.1/people/74937/?format=json","name":"Alexandre Oliva","email":"oliva@adacore.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/or1pgn3hu1.fsf_-_@lxoliva.fsfla.org/mbox/","series":[{"id":499366,"url":"http://patchwork.ozlabs.org/api/1.1/series/499366/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=499366","date":"2026-04-09T22:11:02","name":"libstdc++: simd: map 64-bit long double to double on sse [PR124657]","version":1,"mbox":"http://patchwork.ozlabs.org/series/499366/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2221601/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2221601/checks/","tags":{},"headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256\n header.s=google header.b=fsMk2luA;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (2048-bit key,\n secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256\n header.s=google header.b=fsMk2luA","sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=adacore.com","sourceware.org; spf=pass smtp.mailfrom=adacore.com","server2.sourceware.org;\n arc=none smtp.remote-ip=74.125.82.173"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fsDgM1ZMfz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 08:11:57 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id B35C84BA2E36\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  9 Apr 2026 22:11:55 +0000 (GMT)","from mail-dy1-f173.google.com (mail-dy1-f173.google.com\n [74.125.82.173])\n by sourceware.org (Postfix) with ESMTPS id 6C6AA4BA2E0F\n for <gcc-patches@gcc.gnu.org>; Thu,  9 Apr 2026 22:11:20 +0000 (GMT)","by mail-dy1-f173.google.com with SMTP id\n 5a478bee46e88-2ba895adfeaso1361870eec.0\n for <gcc-patches@gcc.gnu.org>; Thu, 09 Apr 2026 15:11:20 -0700 (PDT)","from free.home ([2804:14c:4d1:41a6::1455])\n by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2d5621d7d2esm1492965eec.20.2026.04.09.15.11.16\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 09 Apr 2026 15:11:18 -0700 (PDT)","from livre (livre.home [172.31.160.2])\n by free.home (8.15.2/8.15.2) with ESMTPS id 639MB26r326127\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Thu, 9 Apr 2026 19:11:02 -0300"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org B35C84BA2E36","OpenDKIM Filter v2.11.0 sourceware.org 6C6AA4BA2E0F"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 6C6AA4BA2E0F","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 6C6AA4BA2E0F","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775772680; cv=none;\n b=upq5GuJnoVPGt7Gk9Ag1i+yg3dgMjrfb0Ki/G8sdnQ3I0nitsVPui6TQ4ajaX5s+anoqPBmnV0RoWNwqdqRQHZv2Bz4u9rZe6K2FxhICmox1ojJwk2mYLmZliZTBeB+zikhHPFg2xPVa+QlEYcpyPqDkvhAJQ/1b67iCJpW7/rc=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775772680; c=relaxed/simple;\n bh=zSbgaXpNYvftm4MaBpFi78vSzJqMAaEj9JcUsAFr8t0=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=chVgRAjSGJy3HQoTcnGIKWo1QJFtSZHa2eWaMkmEm+yuhhsx86GhMCEKFNEFVp+Dh3zRGiH8P1XyA6wSlSUxa0x/pLHVKev3u4s9dr5Ubfc8e0L+ABCXaBon0dI0+D3BT1/1fEgwsHk/FznC2pJ/68xkLOEESVDCA6QkkqnFLCw=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=adacore.com; s=google; t=1775772679; x=1776377479; darn=gcc.gnu.org;\n h=mime-version:user-agent:message-id:in-reply-to:date:references\n :organization:subject:cc:to:from:from:to:cc:subject:date:message-id\n :reply-to; bh=/p8ckT43AGUboByuWFVnBPlVrKyGk6T4ZfqEOI5DDM8=;\n b=fsMk2luAMRnhlHM79cxJxiRqVF4+XPdyQGh44Wt0MCymPeQBMuBFwKEuq8w2YGdRAG\n SUD/aFpK3n1rnbh0qAx3ef0bk/62bt3yY1wkrprDPZsteP6RSL9fbIbU4ibdINTscCQs\n uN6n7gJw/frol4TIuiVvsgSWk91gkjV8OR0/YExyQaj5+cvBd5nhEiDNQqloGq8mFe72\n F6ituATNqh1y2BWSs/9UFSomvgGmOb4jyybsF+REm0VwAcHfG1VftMhpZehzqvcDZItp\n 6/GrO6qoEYdtBq1epg4VrIDErZ2EefrhzzL583gXfchzGJsvj+bXJrNfOZBiNB1qaTHQ\n vXxg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775772679; x=1776377479;\n h=mime-version:user-agent:message-id:in-reply-to:date:references\n :organization:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=/p8ckT43AGUboByuWFVnBPlVrKyGk6T4ZfqEOI5DDM8=;\n b=rWDez7LaSETbHNWXuwuSPr7p2HiJ7ovlnsALunrWTfXi8UW9dM5/pZo4X0CBX4cfh/\n 8xpan7ci4hiaI1xGuKa8Fbmzv6mekZwP7frrqfmN4lO0jPeUr7pvK0veGqe6HBWlTyr7\n Og+ZTiXbjZ7jOdttsC5F3S4oS9V8PX+MRLyOhQoZM+c82v1LBLf14DjlMbr6CrpkPTX5\n iBc72PQmGJoPevk8Wkk2Gr0injQM1GGntGO3K2rXrixepf6/l7uwtnLqUfH07u1b2Wt8\n wAjXj6dnnGff9cAbg5jGAhcqV2bcmeY67y+Jao9ws/ED9i9sn3cApUqp7WgU000AEKdU\n 6ZJQ==","X-Forwarded-Encrypted":"i=1;\n AJvYcCUvPfGlWKIH7a4cJ6/fXcLYqbPV2xMCPThrN3sD3sLRBzCagxvh4uJg4WAiTdOvEyiMLJFqLbJduFtARg==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YxeqSNG3Sf+4vEDaqL8Yr897BW503b2RX5DOTQp4mE7m3xiuXs6\n Gh8ttbaA/GCd83aUqGnx3aMArey42cAA/cq1R6ldNHzqFfN42Ml6ln1WiLXx4aHg2g==","X-Gm-Gg":"AeBDietdhhkfKSuj+UK5t6fNrVAEBmUson7E5HqJFfvCQLl5NpAgNq6Xo3rhGXD2IZ5\n yIygohkX5YgvikNdLb45GGYAHD89qEtGU03tJ7pNRftrJ9+0uKBvwXwa11/9hcq+wqKGP4bvQj+\n 6LbuUrMqO9/EwMj7yR6AFwPEJlKAq9euebI/e3eXUkJtGRby4mOLYwnw1abiqv/SH+J/XVJQb4D\n 6LT9Qp64MkbhHYOf40mo2IOJ858gMgx0OAigcjS2Ez3mxfnEPo9+SUXke2jowrpFv6xZyVJZp4o\n 5/H3teU1cDaAy1gXUIuI9gdk6tUb1kdXXdD244oFE1tR1B9H8V/7kQgqin3WQ1XlUHOts9Wi3Rt\n 6PuWXEAwOF5nKM7hb/xn2mQIGK+yNhW9c93XI3LDF2a+ueQS80ia4gD0MbmrHz2yfTE5//Sdr4Y\n I=","X-Received":"by 2002:a05:7301:1293:b0:2c4:a862:2372 with SMTP id\n 5a478bee46e88-2d5871b01e6mr464305eec.9.1775772678883;\n Thu, 09 Apr 2026 15:11:18 -0700 (PDT)","From":"Alexandre Oliva <oliva@adacore.com>","To":"Matthias Kretz <MatthiasKretz@gmx.net>","Cc":"libstdc++@gcc.gnu.org, Jonathan Wakely <jwakely.gcc@gmail.com>,\n gcc-patches <gcc-patches@gcc.gnu.org>","Subject":"[PATCH] libstdc++: simd: map 64-bit long double to double on sse\n [PR124657]","Organization":"Free thinker, does not speak for AdaCore","References":"<oro6kdd9ji.fsf@lxoliva.fsfla.org>\n <orse9oaxa9.fsf@lxoliva.fsfla.org>\n <CAH6eHdS9SWeUfmEe+G43tMUZuR-oSAP1rf8qjUPYdx+psJFagQ@mail.gmail.com>\n <47992676.fMDQidcC6G@vir-laptop>","Date":"Thu, 09 Apr 2026 19:11:02 -0300","In-Reply-To":"<47992676.fMDQidcC6G@vir-laptop> (Matthias Kretz's message of\n \"Thu, 26 Mar 2026 14:03:47 +0000\")","Message-ID":"<or1pgn3hu1.fsf_-_@lxoliva.fsfla.org>","User-Agent":"Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)","MIME-Version":"1.0","Content-Type":"text/plain","X-Scanned-By":"MIMEDefang 2.84","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"On Mar 26, 2026, Matthias Kretz <MatthiasKretz@gmx.net> wrote:\n\n> For whatever reason, this is the first email I received of this thread.\n\nI guess I could have copied you.\n\n> I fear that this might lead to problems further down in the implementation. I \n> think this should rather map '__intrinsic_type<long double, N>' to \n> '[[gnu::vector_size(16/32/64)]] double'. PPC has to do a similar thing \n> (below).\n\nIndeed, I had filed PR124657 about the remaining compile failure with my\nprevious change, and your point above was exactly the solution for that\nbit.  But it got me to a subsequent problem that I'm addressing in a\nlater patch.\n\n\nWhen long double is as wide as double on x86 (-mlong-double-64), make\nthe __intrinsic_type a vector of double.\n\nRegstrapped on x86_64-linux-gnu.  This is not enough to enable\nexperimental/simd/pr109261_constexpr_simd.cc to compile with\n-mlong-double-64.  Ok to install?\n\n\nfor  libstdc++-v3/ChangeLog\n\n\tPR libstdc++/124657\n\t* include/experimental/bits/simd.h (__intrinsic_type::type):\n\tMap long double to double.\n---\n libstdc++-v3/include/experimental/bits/simd.h |    3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)","diff":"diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h\nindex b96818af6e6ff..8c30c8af26881 100644\n--- a/libstdc++-v3/include/experimental/bits/simd.h\n+++ b/libstdc++-v3/include/experimental/bits/simd.h\n@@ -2477,7 +2477,8 @@ template <typename _Tp, size_t _Bytes>\n     static constexpr size_t _S_VBytes = _Bytes <= 16 ? 16 : _Bytes <= 32 ? 32 : 64;\n \n     using type [[__gnu__::__vector_size__(_S_VBytes)]]\n-      = conditional_t<is_integral_v<_Tp>, long long int, _Tp>;\n+      = conditional_t<is_integral_v<_Tp>, long long int,\n+\t\t      conditional_t<is_same_v<_Tp, long double>, double, _Tp> >;\n   };\n #endif // _GLIBCXX_SIMD_HAVE_SSE\n \n","prefixes":[]}