get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2226054/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2226054,
    "url": "http://patchwork.ozlabs.org/api/patches/2226054/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/orwlxzse5e.fsf_-_@lxoliva.fsfla.org/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api",
        "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,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<orwlxzse5e.fsf_-_@lxoliva.fsfla.org>",
    "list_archive_url": null,
    "date": "2026-04-22T06:27:41",
    "name": "libstdc++: simd: use preprocessor to test for 64-bit long double [PR124657]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "4a0ac7847ae419038d201a7be5c0703a5d6ac5f7",
    "submitter": {
        "id": 74937,
        "url": "http://patchwork.ozlabs.org/api/people/74937/?format=api",
        "name": "Alexandre Oliva",
        "email": "oliva@adacore.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/orwlxzse5e.fsf_-_@lxoliva.fsfla.org/mbox/",
    "series": [
        {
            "id": 500926,
            "url": "http://patchwork.ozlabs.org/api/series/500926/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=500926",
            "date": "2026-04-22T06:27:41",
            "name": "libstdc++: simd: use preprocessor to test for 64-bit long double [PR124657]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/500926/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2226054/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2226054/checks/",
    "tags": {},
    "related": [],
    "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=b8Dlakbb;\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=b8Dlakbb",
            "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.54"
        ],
        "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 4g0q7F6Z6Tz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 16:28:56 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 00B324BA901A\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 06:28:53 +0000 (GMT)",
            "from mail-dl1-f54.google.com (mail-dl1-f54.google.com\n [74.125.82.54])\n by sourceware.org (Postfix) with ESMTPS id 3F57C4BA901A\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 06:27:57 +0000 (GMT)",
            "by mail-dl1-f54.google.com with SMTP id\n a92af1059eb24-12c8cc7a77eso1957014c88.1\n for <gcc-patches@gcc.gnu.org>; Tue, 21 Apr 2026 23:27:57 -0700 (PDT)",
            "from free.home ([2804:14c:4d1:41a6::2000])\n by smtp.gmail.com with ESMTPSA id\n a92af1059eb24-12c8caecebfsm12348662c88.5.2026.04.21.23.27.54\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 21 Apr 2026 23:27:55 -0700 (PDT)",
            "from livre (livre.home [172.31.160.2])\n by free.home (8.15.2/8.15.2) with ESMTPS id 63M6Rfh0032463\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Wed, 22 Apr 2026 03:27:42 -0300"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 00B324BA901A",
            "OpenDKIM Filter v2.11.0 sourceware.org 3F57C4BA901A"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 3F57C4BA901A",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 3F57C4BA901A",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776839277; cv=none;\n b=ECHbd4jOrmsqQP1e8ecmbeulXNzFoY+7+XsmVstqTpFRwgqlzo40ZaoY9z9rJPnBqIBiOSC98BzqcOogoFFv/Uq8Z1wAmvnsY2krXdiZyeajT2odebr13AaPCJNXbyw2hrCUu/8mEE9MR+z9tj2n6I084pLyNl/wgcjYs29WlHc=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776839277; c=relaxed/simple;\n bh=FFk6+f/QKJrCc8IxdUIAxybKRkI2jCR1QO4xBstjNkA=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=VECJWB1ST7Fo/73vrb52qObO68WRKnE2KXBdPja8KJprLtTjxXg/SYw6Wwv6GpYP64TMfe5I92O15EUyeXxGVgyDQMbeYNVNAGJVSlBEW6VO28BTTpqfuLu47UNBx1zKCrrUgHxLnANxKNGH9dKOQzXGNERf2IRRfOmrfEGnprc=",
        "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=1776839276; x=1777444076; 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=Hpu75Yy1pkEj+sOxssox+2nT3MT7vHDHCKgDLe/JCz4=;\n b=b8DlakbblqKTBRWwnRaldyDP/wTrQTLXSLtHdXX/JuDQShCNRsye3cQ6mDV5oX6eRf\n XXhURuibTVsKk4mJIciy9mMq+WWis/PTpBkMRoP+xMAsS0e6yXUg2tq0IDLYaE1u3DNW\n vnP3tHd1ieeiW6okuJvyk7mGFK1ZVCIQVjCtBxG8vjY1dYesX6KOGa22p7lTefSH8Dwc\n f2AJ7qoHRJKJPGv5g1w/wsmVGYS5JDXlAj1boq/nDkn6WXtGz2lkZTc2nnT11vjYL+XA\n 30YOtZwdoXDzN/aNzuZO4yCa7PpGi+YHE0zc1N/W41d7mh1/WwO3cj27rQtxQv405i/q\n PtRw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776839276; x=1777444076;\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=Hpu75Yy1pkEj+sOxssox+2nT3MT7vHDHCKgDLe/JCz4=;\n b=M4fFpb1tcA9DsViNBGAfzv0PqLKuAJ07YXzei4/ueyLRcev5jpyfI+y4P5eagvlWrT\n txOq/tg9jxpIEJ7Hrh6i/i3WGBY0j4LIPz6ikN0MNMdPKYBz61QJzRKYFn/wNtcxUre/\n YcKRK6eydOMPiROPh5HcNmWuP8sMGE1GMABWWxB/aZMuP0WywtsJVMqiIA/jDz5pD7NH\n IUze575fPRtGBEuS6o1BKbaDDkduABYdbP8FIum1qJmJGYuJY4JU6fj2Be4vFcgyGQM3\n SclF1wapUHrb1W0voCAtR9L+paKwupMaoePy8TcGzjzLvaBpUh6Ix9ylVprIab7PkeP1\n q9wA==",
        "X-Forwarded-Encrypted": "i=1;\n AFNElJ+dm3RuOzYkfNRxhA/VpaeNEbsr42ChAV9qbGKziy0tFiWSz35qFD3deW9WO7WBh2WYgcLK2CBIj72iqg==@gcc.gnu.org",
        "X-Gm-Message-State": "AOJu0YxAHKqnzfKKpkwNDJUKTUvSrhjRBjkyy8A4eMjdomK1HuF6igDT\n PJmx+CPMKITRcC4PvAb6+b6EmRnMNBdnLM2HhrF4wvJwAd2aCoYIwSBlh7nS7gSe+g==",
        "X-Gm-Gg": "AeBDiesD+Owg+pR/3TkEAxT2Eg2G1yy0atF8Zo7V+FzkF6r02xZg3Nqul+XAQgEjM4G\n Efv87EYOz/OdaHR9Bw14teKzCCGptb3a6AHUKJ5v8NIiFgDdS6oAbwCZlIgmE1cJFfAHmPgGZMA\n 8/JGW18JHxJy2wkabUa7/kvzyOkLfwiggEsjjr/FFBKeniOp3TS1NAeyI+XxiTRvz5/kS1IycMc\n 5wqBktRNGFNg4UmpdK+fydU9i6ANBnR9WEGUNFJxu9zMl1HNPjRHOit+N246Vj0yjVrWp0dHBCz\n IfOKYlIbz5/xIu8T9pucV5Xe8AAhf0Pwh9fMaYmVIHc7kNJzXQkgMaML8MwdnO0z6Vqh4mx2Y1N\n 3kuaOtakjtKKVhQJhqc+UsAIzpJ8lmo01vd6Semfv4DdxwbOVbdKA0SfcfqoqoMMjyG4kjxR1k5\n d9ZFjO1HWtOQ==",
        "X-Received": "by 2002:a05:7022:fa2:b0:129:1d25:f1da with SMTP id\n a92af1059eb24-12c73ae91a5mr10134874c88.3.1776839275742;\n Tue, 21 Apr 2026 23:27:55 -0700 (PDT)",
        "From": "Alexandre Oliva <oliva@adacore.com>",
        "To": "Jonathan Wakely <jwakely@redhat.com>",
        "Cc": "Matthias Kretz <MatthiasKretz@gmx.net>, libstdc++@gcc.gnu.org,\n Jonathan Wakely <jwakely.gcc@gmail.com>, gcc-patches\n <gcc-patches@gcc.gnu.org>",
        "Subject": "[PATCH] libstdc++: simd: use preprocessor to test for 64-bit long\n double [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> <orwlyf233o.fsf_-_@lxoliva.fsfla.org>\n <orzf2wuczy.fsf_-_@lxoliva.fsfla.org>\n <CACb0b4nhOnWAXk7Ox05sYvHfMJMCTfYhDo9pspLjR_uW_b-BrQ@mail.gmail.com>",
        "Date": "Wed, 22 Apr 2026 03:27:41 -0300",
        "In-Reply-To": "\n <CACb0b4nhOnWAXk7Ox05sYvHfMJMCTfYhDo9pspLjR_uW_b-BrQ@mail.gmail.com>\n (Jonathan Wakely's message of \"Tue, 21 Apr 2026 09:27:36 +0100\")",
        "Message-ID": "<orwlxzse5e.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 Apr 21, 2026, Jonathan Wakely <jwakely@redhat.com> wrote:\n\n> #if  __LDBL_MANT_DIG__ == __DBL_MANT_DIG__\n\nI tried to apply the same technique to simd.h, on top of\nhttps://gcc.gnu.org/pipermail/gcc-patches/2026-April/712616.html, but it\ndoesn't save any instantiations, neither on x86 nor on ppc.  It seems to\nmake things generally uglier, but it might offer a little compile-time\nbenefit on both, so I left it as a separate patch...  WDYT?\n\nAlso regstrapped on x86_64-linux-gnu and powerpc64le-linux-gnu.  I also\ntested pr109261_constexpr_simd.cc with -mlong-double-64 on both.  Ok for\nstage1?\n\n\nWhen long double is as wide as double on x86 or powerpc\n(-mlong-double-64), we remap it to double in __intrinsic_type.\n\nUse the preprocessor to compare __L?DBL_MANT_DIG instead of\nfloating-type type sizes on x86 SSE and PowerPC AltiVec.\n\n\nfor  libstdc++-v3/ChangeLog\n\n\tPR libstdc++/124657\n\t* include/experimental/bits/simd.h [_GLIBCXX_SIMD_HAVE_SSE]\n\t(__intrinsic_type::_S_is_ldouble): New.  Use all over.\n\t(__intrinsic_type::type): Use preprocessor tests.\n\t[__ALTIVEC__] (__intrinsic_type): Likewise.\n---\n libstdc++-v3/include/experimental/bits/simd.h |   25 ++++++++++++++++++++-----\n 1 file changed, 20 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h\nindex 8c30c8af26881..177d3598b54b5 100644\n--- a/libstdc++-v3/include/experimental/bits/simd.h\n+++ b/libstdc++-v3/include/experimental/bits/simd.h\n@@ -2469,16 +2469,24 @@ template <>\n template <typename _Tp, size_t _Bytes>\n   struct __intrinsic_type<_Tp, _Bytes, enable_if_t<__is_vectorizable_v<_Tp> && _Bytes <= 64>>\n   {\n+    static constexpr bool _S_is_ldouble = is_same_v<_Tp, long double>;\n+\n     // allow _Tp == long double with -mlong-double-64\n-    static_assert(!(is_same_v<_Tp, long double>\n-\t\t    && sizeof(long double) > sizeof(double)),\n+#if __LDBL_MANT_DIG != __DBL_MANT_DIG\n+    static_assert(!_S_is_ldouble,\n \t\t  \"no __intrinsic_type support for long double on x86\");\n+#endif\n \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,\n-\t\t      conditional_t<is_same_v<_Tp, long double>, double, _Tp> >;\n+#if __LDBL_MANT_DIG != __DBL_MANT_DIG\n+\t\t      _Tp\n+#else\n+\t\t      conditional_t<_S_is_ldouble, double, _Tp>\n+#endif\n+\t\t      >;\n   };\n #endif // _GLIBCXX_SIMD_HAVE_SSE\n \n@@ -2582,12 +2590,17 @@ template <typename _Tp, size_t _Bytes>\n     static constexpr bool _S_is_ldouble = is_same_v<_Tp, long double>;\n \n     // allow _Tp == long double with -mlong-double-64\n-    static_assert(!(_S_is_ldouble && sizeof(long double) > sizeof(double)),\n+#if __LDBL_MANT_DIG != __DBL_MANT_DIG\n+    static_assert(!_S_is_ldouble,\n \t\t  \"no __intrinsic_type support for 128-bit floating point on PowerPC\");\n+#endif\n \n #ifndef __VSX__\n     static_assert(!(is_same_v<_Tp, double>\n-\t\t    || (_S_is_ldouble && sizeof(long double) == sizeof(double))),\n+#if __LDBL_MANT_DIG == __DBL_MANT_DIG\n+\t\t    || _S_is_ldouble\n+#endif\n+\t\t    ),\n \t\t  \"no __intrinsic_type support for 64-bit floating point on PowerPC w/o VSX\");\n #endif\n \n@@ -2595,9 +2608,11 @@ template <typename _Tp, size_t _Bytes>\n     {\n       if constexpr (is_floating_point_v<_Tp>)\n \t{\n+#if __LDBL_MANT_DIG == __DBL_MANT_DIG\n \t  if constexpr (_S_is_ldouble)\n \t    return double {};\n \t  else\n+#endif\n \t    return _Tp {};\n \t}\n       else if constexpr (is_signed_v<_Tp>)\n",
    "prefixes": []
}