get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2231082,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2231082/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260430104428.30D3F436F7FC@sourceware.org/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/1.1/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
    },
    "msgid": "<20260430104428.30D3F436F7FC@sourceware.org>",
    "date": "2026-04-30T10:43:59",
    "name": "tree-optimization/125088 - some TLC to the new vect_bb_slp_scalar_cost",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "79acbba655de1604343fa0cceda51a7afcc85a7e",
    "submitter": {
        "id": 4338,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/4338/?format=api",
        "name": "Richard Biener",
        "email": "rguenther@suse.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260430104428.30D3F436F7FC@sourceware.org/mbox/",
    "series": [
        {
            "id": 502270,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502270/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=502270",
            "date": "2026-04-30T10:43:59",
            "name": "tree-optimization/125088 - some TLC to the new vect_bb_slp_scalar_cost",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502270/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2231082/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2231082/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 (1024-bit key;\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=OWdmT1TR;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=nSWBpbvy;\n\tdkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de\n header.a=rsa-sha256 header.s=susede2_rsa header.b=OWdmT1TR;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=nSWBpbvy;\n\tdkim-atps=neutral",
            "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;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=OWdmT1TR;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=nSWBpbvy;\n\tdkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de\n header.a=rsa-sha256 header.s=susede2_rsa header.b=OWdmT1TR;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=nSWBpbvy",
            "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=suse.de",
            "sourceware.org; spf=pass smtp.mailfrom=suse.de",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=195.135.223.130",
            "smtp-out1.suse.de;\n\tnone"
        ],
        "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 4g5rQS0LZgz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 20:44:30 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 30D3F436F7FC\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 10:44:28 +0000 (GMT)",
            "from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])\n by sourceware.org (Postfix) with ESMTPS id BCA03436F7E0\n for <gcc-patches@gcc.gnu.org>; Thu, 30 Apr 2026 10:44:00 +0000 (GMT)",
            "from murzim.nue2.suse.org (unknown [10.168.4.243])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out1.suse.de (Postfix) with ESMTPS id A5CBD6A803\n for <gcc-patches@gcc.gnu.org>; Thu, 30 Apr 2026 10:43:59 +0000 (UTC)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 30D3F436F7FC",
            "OpenDKIM Filter v2.11.0 sourceware.org BCA03436F7E0"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org BCA03436F7E0",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org BCA03436F7E0",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777545840; cv=none;\n b=GQe+E2S5isFAk76z39k86Rpz+BNuV0SsLrl1UQRx7f4kblA38YYpvzPxYOTpVcE0nMe6RQES38T+rhcpckTxmSsPhi5n60LyYuqyH8N2H8/w/cJgP+YLBTQyRO7md8i2fJjsbU9a4Z3OZHjR96xKdHW8y5Q0GzBqvOAdQ2zjH+Q=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777545840; c=relaxed/simple;\n bh=yQ6VL2ZljuBN6LCVs/E9TjoPmGba3Z6MU+gv9s/uDVA=;\n h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date:\n From:To:Subject:MIME-Version;\n b=qde57aLZBy5k1YfAy5tLOZPBi/UCGMv9MwRefC7pZ/pebMKA64MH/V5tGqrjxWk5P3Qj+BqoT+sHQkHFTvTFs6aP1RBFgmrg1GDc7KC8g/TKIhU57o5AzK4JR/ZtNj/OXXww/xvj6TdLburkC0XA4eXKSreZzQkdvqSwXkYdpEo=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1777545839;\n h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version:\n content-type:content-type; bh=LBrLx+Fnm3Xw0U1VRWqprXiBRsj3Hw175pIttOmKcO8=;\n b=OWdmT1TRlwhN+VxeZS26YIr8v5BKkr8GLqTAPYQrbRd570799PpJ8tAPwH3ORk8r+3LWRp\n nAL4ggBPB279Oyp2otx6sZfUx1vbZBkfY4+DE28oJm1i2x2OVn7088JVZC89NtsrKaEJle\n V83YWAnPGbLP2rOBFUiD04PXJb4wtfk=",
            "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1777545839;\n h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version:\n content-type:content-type; bh=LBrLx+Fnm3Xw0U1VRWqprXiBRsj3Hw175pIttOmKcO8=;\n b=nSWBpbvy1r7Z6YSi1RqzelSun/IqVRwPpru8lM5ZLSmH4kK0b5Zmy8gMNjwRzk4KRCMUaI\n sE1RSccB2L5HnnAw==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1777545839;\n h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version:\n content-type:content-type; bh=LBrLx+Fnm3Xw0U1VRWqprXiBRsj3Hw175pIttOmKcO8=;\n b=OWdmT1TRlwhN+VxeZS26YIr8v5BKkr8GLqTAPYQrbRd570799PpJ8tAPwH3ORk8r+3LWRp\n nAL4ggBPB279Oyp2otx6sZfUx1vbZBkfY4+DE28oJm1i2x2OVn7088JVZC89NtsrKaEJle\n V83YWAnPGbLP2rOBFUiD04PXJb4wtfk=",
            "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1777545839;\n h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version:\n content-type:content-type; bh=LBrLx+Fnm3Xw0U1VRWqprXiBRsj3Hw175pIttOmKcO8=;\n b=nSWBpbvy1r7Z6YSi1RqzelSun/IqVRwPpru8lM5ZLSmH4kK0b5Zmy8gMNjwRzk4KRCMUaI\n sE1RSccB2L5HnnAw=="
        ],
        "Date": "Thu, 30 Apr 2026 12:43:59 +0200 (CEST)",
        "From": "Richard Biener <rguenther@suse.de>",
        "To": "gcc-patches@gcc.gnu.org",
        "Subject": "[PATCH] tree-optimization/125088 - some TLC to the new\n vect_bb_slp_scalar_cost",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=US-ASCII",
        "X-Spamd-Result": "default: False [-1.80 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n MISSING_MID(2.50)[]; NEURAL_HAM_LONG(-1.00)[-0.999];\n NEURAL_HAM_SHORT(-0.20)[-0.998]; MIME_GOOD(-0.10)[text/plain];\n RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[];\n MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[];\n RCVD_COUNT_ZERO(0.00)[0];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n FROM_EQ_ENVFROM(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com];\n TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n DBL_BLOCKED_OPENRESOLVER(0.00)[murzim.nue2.suse.org:helo]",
        "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",
        "Message-Id": "<20260430104428.30D3F436F7FC@sourceware.org>"
    },
    "content": "This realizes that orig_stmt_info == stmt and refactors control flow\naround cost recording to avoid the do { } while (false); loop which\nhad continue stmts confusing coverity.\n\nBootstrapped and tested on x86_64-unknown-linux-gnu, pushed.\n\n\tPR tree-optimization/125088\n\t* tree-vect-slp.cc (vect_bb_slp_scalar_cost): Refactor and\n\tsimplify.\n\t* tree-vect-stmts.cc (vect_nop_conversion_p): Exclude\n\tcopies with memory accesses.\n---\n gcc/tree-vect-slp.cc   | 36 ++++++++++++++++--------------------\n gcc/tree-vect-stmts.cc |  2 +-\n 2 files changed, 17 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc\nindex 00bb891fccb..17b8dc5b9dc 100644\n--- a/gcc/tree-vect-slp.cc\n+++ b/gcc/tree-vect-slp.cc\n@@ -9454,15 +9454,21 @@ vect_bb_slp_scalar_cost (bb_vec_info vinfo,\n \n       gcc_assert (!gimple_visited_p (stmt->stmt));\n \n-      gcc_assert (vect_orig_stmt (stmt) == stmt);\n-      stmt_vec_info orig_stmt_info = stmt;\n-\n-      do\n+      if (vect_nop_conversion_p (stmt))\n+\t;\n+      /* For single-argument PHIs assume coalescing which means zero\n+\t cost for the scalar and the vector PHIs.  This avoids\n+\t artificially favoring the vector path (but may pessimize it\n+\t in some cases).  */\n+      else if (is_a <gphi *> (stmt->stmt)\n+\t       && gimple_phi_num_args (as_a <gphi *> (stmt->stmt)) == 1)\n+\t;\n+      else\n \t{\n \t  vect_cost_for_stmt kind;\n-\t  if (STMT_VINFO_DATA_REF (orig_stmt_info))\n+\t  if (STMT_VINFO_DATA_REF (stmt))\n \t    {\n-\t      data_reference_p dr = STMT_VINFO_DATA_REF (orig_stmt_info);\n+\t      data_reference_p dr = STMT_VINFO_DATA_REF (stmt);\n \t      tree base = get_base_address (DR_REF (dr));\n \t      /* When the scalar access is to a non-global not\n \t\t address-taken decl that is not BLKmode assume we can\n@@ -9472,27 +9478,17 @@ vect_bb_slp_scalar_cost (bb_vec_info vinfo,\n \t\t  && !TREE_ADDRESSABLE (base)\n \t\t  && DECL_MODE (base) != BLKmode)\n \t\tkind = scalar_stmt;\n-\t      else if (DR_IS_READ (STMT_VINFO_DATA_REF (orig_stmt_info)))\n+\t      else if (DR_IS_READ (STMT_VINFO_DATA_REF (stmt)))\n \t\tkind = scalar_load;\n \t      else\n \t\tkind = scalar_store;\n \t    }\n-\t  else if (vect_nop_conversion_p (orig_stmt_info))\n-\t    continue;\n-\t  /* For single-argument PHIs assume coalescing which means zero\n-\t     cost for the scalar and the vector PHIs.  This avoids\n-\t     artificially favoring the vector path (but may pessimize it\n-\t     in some cases).  */\n-\t  else if (is_a <gphi *> (orig_stmt_info->stmt)\n-\t\t   && gimple_phi_num_args\n-\t\t   (as_a <gphi *> (orig_stmt_info->stmt)) == 1)\n-\t    continue;\n \t  else\n \t    kind = scalar_stmt;\n+\t  /* Cost each scalar stmt only once.  */\n \t  gimple_set_visited (stmt->stmt, true);\n-\t  record_stmt_cost (cost_vec, 1, kind, orig_stmt_info,\n-\t\t\t    NULL_TREE, 0, vect_body);\n-\t} while (false);\n+\t  record_stmt_cost (cost_vec, 1, kind, stmt, NULL_TREE, 0, vect_body);\n+\t}\n \n       /* Now walk relevant parts of the SSA use-def graph.  */\n       slp_oprnds child_ops (stmt);\ndiff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc\nindex 9328cb820f8..32691f47eb7 100644\n--- a/gcc/tree-vect-stmts.cc\n+++ b/gcc/tree-vect-stmts.cc\n@@ -5935,7 +5935,7 @@ bool\n vect_nop_conversion_p (stmt_vec_info stmt_info)\n {\n   gassign *stmt = dyn_cast <gassign *> (stmt_info->stmt);\n-  if (!stmt)\n+  if (!stmt || STMT_VINFO_DATA_REF (stmt_info))\n     return false;\n \n   tree lhs = gimple_assign_lhs (stmt);\n",
    "prefixes": []
}