get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2226293,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2226293/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhubwh7m90.gcc.gcc-TEST.pinskia.33.1.3@forge-stage.sourceware.org/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<bmm.hhubwh7m90.gcc.gcc-TEST.pinskia.33.1.3@forge-stage.sourceware.org>",
    "list_archive_url": null,
    "date": "2026-04-22T10:49:12",
    "name": "[v1,03/15] testcase: Add testcase for shrink wrapping of vector<int>::push_back [PR118502]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "261bf39e94294f639191894b7cd82f9dbeab7363",
    "submitter": {
        "id": 93219,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/93219/?format=api",
        "name": "Andrew Pinski via Sourceware Forge",
        "email": "forge-bot+pinskia@forge-stage.sourceware.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhubwh7m90.gcc.gcc-TEST.pinskia.33.1.3@forge-stage.sourceware.org/mbox/",
    "series": [
        {
            "id": 500990,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/500990/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=500990",
            "date": "2026-04-22T10:49:12",
            "name": "copy-prop-arg",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/500990/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2226293/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2226293/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 spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::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; dmarc=none (p=none dis=none)\n header.from=forge-stage.sourceware.org",
            "sourceware.org;\n spf=pass smtp.mailfrom=forge-stage.sourceware.org",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=38.145.34.39"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::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 4g0xWq4xXdz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 21:17:11 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 43E9940A133A\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 11:17:03 +0000 (GMT)",
            "from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39])\n by sourceware.org (Postfix) with ESMTPS id A66F541BBF86\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 10:50:31 +0000 (GMT)",
            "from forge-stage.sourceware.org (localhost [IPv6:::1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)\n (No client certificate requested)\n by forge-stage.sourceware.org (Postfix) with ESMTPS id 74F0F42BD8\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 10:50:31 +0000 (UTC)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 43E9940A133A",
            "OpenDKIM Filter v2.11.0 sourceware.org A66F541BBF86"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org A66F541BBF86",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org A66F541BBF86",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776855031; cv=none;\n b=Fy3pk19iCOT9M46+wktBA0f23es2HfrbIwWIzHyr/sQ3qto/8/aT0So9hg+ZhYawib1xDcKmDuXywffTq42loQtjKwCK3NWnanZyo1fHBdFDCJnli/39hQCjAVB3lmJbC2glRxCM9yJiFeNwkkUuWN/bgqXO5qLKOQqCE4IifaU=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776855031; c=relaxed/simple;\n bh=98gy9IGp0uAzNJ92nvswoleE0UXbcmdr3TTM2HP5XEY=;\n h=From:Date:Subject:To:Message-ID;\n b=Im0j5PV2I/b9Dv7UrbrrQBKX4gidX+hkRR2cUgrS3uVrzvced1ou3uZchkcJQEalhxT2ZdZ0qzcudu7f+6c5zQfWEdWhIzZeSAj8Vxjk7P3bwbA4y1777uyFVhAWPeVStXgeVK7G1dGuGAoP212TOtm977+ljVduWz/BAqVKydE=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "From": "Andrew Pinski via Sourceware Forge\n <forge-bot+pinskia@forge-stage.sourceware.org>",
        "Date": "Wed, 22 Apr 2026 10:49:12 +0000",
        "Subject": "[PATCH v1 03/15] testcase: Add testcase for shrink wrapping of\n vector<int>::push_back [PR118502]",
        "To": "gcc-patches mailing list <gcc-patches@gcc.gnu.org>",
        "Message-ID": "\n <bmm.hhubwh7m90.gcc.gcc-TEST.pinskia.33.1.3@forge-stage.sourceware.org>",
        "X-Mailer": "batrachomyomachia",
        "X-Pull-Request-Organization": "gcc",
        "X-Pull-Request-Repository": "gcc-TEST",
        "X-Pull-Request": "https://forge.sourceware.org/gcc/gcc-TEST/pulls/33",
        "References": "\n <bmm.hhubwh7m90.gcc.gcc-TEST.pinskia.33.1.0@forge-stage.sourceware.org>",
        "In-Reply-To": "\n <bmm.hhubwh7m90.gcc.gcc-TEST.pinskia.33.1.0@forge-stage.sourceware.org>",
        "X-Patch-URL": "\n https://forge.sourceware.org/pinskia/gcc-TEST/commit/65bed62aff674f38f8a3b58480421d90374ebe17",
        "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>",
        "Reply-To": "gcc-patches mailing list <gcc-patches@gcc.gnu.org>,\n pinskia@gcc.gnu.org",
        "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"
    },
    "content": "From: Andrew Pinski <quic_apinski@quicinc.com>\n\nLLVM folks noticed that GCC was shrink wrapping the call to vector<int>::push_back.\nSo I thought it was a good idea to commit a testcase to make sure GCC does not regress\nin this area unknowning.\n\nNote the shrink wrapping started with r15-1619-g3b9b8d6cfdf593.\nNote this enables the testcase for x86_64 (!ia32), powerpc, aarch64 and riscv which I tested\nvia godbolt to see the shrink wrapping occurs. Also tested the testcase for both\nx86_64-linux-gnu and aarch64-linux-gnu to make sure I got the target selects correct.\n\n\tPR rtl-optimization/118502\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/opt/shrink-wrapping-vector-1.C: New test.\n\nSigned-off-by: Andrew Pinski <quic_apinski@quicinc.com>\n---\n .../g++.dg/opt/shrink-wrapping-vector-1.C       | 17 +++++++++++++++++\n 1 file changed, 17 insertions(+)\n create mode 100644 gcc/testsuite/g++.dg/opt/shrink-wrapping-vector-1.C",
    "diff": "diff --git a/gcc/testsuite/g++.dg/opt/shrink-wrapping-vector-1.C b/gcc/testsuite/g++.dg/opt/shrink-wrapping-vector-1.C\nnew file mode 100644\nindex 000000000000..5ebbc0dab641\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/opt/shrink-wrapping-vector-1.C\n@@ -0,0 +1,17 @@\n+// { dg-do compile { target { { { i?86-*-* x86_64-*-* } && { ! ia32 } } || { powerpc*-*-* aarch64*-*-* riscv*-*-* }  } } }\n+// { dg-options \"-O2  -fdump-rtl-pro_and_epilogue\"  }\n+// { dg-skip-if \"requires hosted libstdc++ for vector\" { ! hostedlib } }\n+\n+// PR rtl-optimization/118502\n+\n+// The shrink-wrapping should happen around the slow path of vector<int>::push_back,\n+// The fasth path is just checking if there is enough space and doing a few stores.\n+// We want to verify that shrink wrapping happen always.\n+\n+#include <vector>\n+\n+void push_back(std::vector<int>& xs, unsigned char x) {\n+    xs.push_back(x);\n+}\n+\n+/* { dg-final { scan-rtl-dump \"Performing shrink-wrapping\" \"pro_and_epilogue\" } } */\n",
    "prefixes": [
        "v1",
        "03/15"
    ]
}