get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2229085,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229085/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/0dbc23c2-b1d3-416b-8ca8-c8948b6e7983@redhat.com/",
    "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": "<0dbc23c2-b1d3-416b-8ca8-c8948b6e7983@redhat.com>",
    "date": "2026-04-27T19:09:21",
    "name": "[pushed,IRA] : Fix some cost calculation",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "501117ac875cfacc48ba1b8ef7eb7349a9257895",
    "submitter": {
        "id": 4455,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/4455/?format=api",
        "name": "Vladimir Makarov",
        "email": "vmakarov@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/0dbc23c2-b1d3-416b-8ca8-c8948b6e7983@redhat.com/mbox/",
    "series": [
        {
            "id": 501710,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501710/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501710",
            "date": "2026-04-27T19:09:21",
            "name": "[pushed,IRA] : Fix some cost calculation",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501710/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2229085/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2229085/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=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=ScGs6RBn;\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=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=ScGs6RBn",
            "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com",
            "sourceware.org; spf=pass smtp.mailfrom=redhat.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.133.124"
        ],
        "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 4g4D1v4264z1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 05:21:07 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 8B6B14BB1C3E\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 19:21:05 +0000 (GMT)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id 5BF4F4BA903F\n for <gcc-patches@gcc.gnu.org>; Mon, 27 Apr 2026 19:09:27 +0000 (GMT)",
            "from mail-qt1-f200.google.com (mail-qt1-f200.google.com\n [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-426-uTvQ0S1DO3WWM-bzbuOKqg-1; Mon, 27 Apr 2026 15:09:24 -0400",
            "by mail-qt1-f200.google.com with SMTP id\n d75a77b69052e-50da31af14cso281079331cf.1\n for <gcc-patches@gcc.gnu.org>; Mon, 27 Apr 2026 12:09:24 -0700 (PDT)",
            "from [192.168.0.111] (192-0-141-76.cpe.teksavvy.com. [192.0.141.76])\n by smtp.gmail.com with ESMTPSA id\n d75a77b69052e-50e61c191basm258838921cf.16.2026.04.27.12.09.22\n for <gcc-patches@gcc.gnu.org>\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Mon, 27 Apr 2026 12:09:22 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 8B6B14BB1C3E",
            "OpenDKIM Filter v2.11.0 sourceware.org 5BF4F4BA903F"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 5BF4F4BA903F",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 5BF4F4BA903F",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777316967; cv=none;\n b=m0n5riZ/ni9335bSABt0GdSFlOJOYqMc7pgJaFJ8euK89R6YcrE/RyspaRI2pAns9mzK+RGAQplWYrMIiQyDIr8i/PZ4tNbp3DWIStAomnrlvAPApC5yDZkKeR7je2Y5IInk3k4yArP1J/0nHXpn5GmtfrZ4VRY3ZFqMntIaXSA=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777316967; c=relaxed/simple;\n bh=V0kRHNQg+YB6pariqutf34kd443dCdEoS5NIRkAru2o=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:To:From:Subject;\n b=PdmuZwyTEhUh01/ROQG6/AH9kH1Haduk/FJagX/fdAD/HKYRPjPVm3zKoTvMGPmIm+HILgc2YMcoNjqIq4ioqs6zoOgnuEDKH6h/idhWUd9mBAgXl5syOZ7YtRxQKfXj1uOSoqlA1q2Z+Ttur2Wc3fJXgbVjRu4lok7GRsUpwrA=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777316967;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type;\n bh=2lzde2vCVodJYpaC0k5t9yAXIDJd9/rcrY0B5SBLzsw=;\n b=ScGs6RBnAk9QJBrk3SP0/hkEGuOonOrMXz802OkKEZKYJ1ASG6LjO+8jZzj7uBjHyT67Mo\n UP/dzoYqAmwM4ChDwOxH2ObETQPwESz1Ge+poQ0aATXiQDaKbkRrpAZRJNYgQijO0dI2rJ\n f9c2CBSZrs2u0tDJ9uJM8juLtZ+yy44=",
        "X-MC-Unique": "uTvQ0S1DO3WWM-bzbuOKqg-1",
        "X-Mimecast-MFC-AGG-ID": "uTvQ0S1DO3WWM-bzbuOKqg_1777316963",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777316963; x=1777921763;\n h=subject:from:to:content-language:user-agent:mime-version:date\n :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=eEMM/2lWq+vCk/kg95NBKPdUt6SlIKzC24Lg1xsnl5M=;\n b=q6p4bdG8JCUQgUVrHCj+gcgoFrXcZfPNAcBUYPqTX+m29xx/8MXwZEpmA8r4Kf3xD7\n TyGmDWM5L+82csvKtL3BIVuHgZTq7TESJrcyambdJVRj8rP889uZebcmVfPIC4d+ySS9\n 20Arf4kEZcxrLqxde/JQsn6stOn2e/leUthanFiMQB/u7Tr3KjM6/5LT6V+bzqGBUDmF\n fMW2Pse3J49RC7q1C16xu1YLaXx1t4mCXSa6KEBJvSp/EpPLaBp2Scgevta/q8r9KS8g\n 2/xbGqx72F3xHxIVCX77gx4qAeO0yE70sayHNxKvXH7jO/FTMoN8FouZEQZ8lmg16kxN\n UCAg==",
        "X-Gm-Message-State": "AOJu0YynMT0pQqtfANEfzCwVAy+0fxzLcBulXO0SkB/COq9QUa/CpXbA\n qS7CqwkKXZa72SXuAe6uYK2Ssmz6WnGQiZ5BEOzl+GbMVyQpoOuEOZMgDcgDsG0ao7Awl5X2Zhp\n bhKb9W0TmvuW57D0u8U5P+rpi0Q9uEXuXO03XzyLMFzulMncS7HmbzRLE5Vet/OpoIZZewAql0I\n 79moouxkqnKCZCcn+LJsDHww4rl+zraFdwUtaMJzENF00=",
        "X-Gm-Gg": "AeBDietTKWT5+pMxRqeOPADens2YuQfd2mzy5ni2V5rBqTema206wprZ+O5x75+LZnD\n zukMLlqdIFcmfif3CwRr4OWXKtUcj6Dpq2EFalCsV0ud1u933YkLZcKJmcXPkjHaHGAlIjm2yob\n hUOJ8kNSLexyQGaFcdhS+0zPvyGFnKUdch4Ez8WlPt24wB0Az78qCrWU0OIEzfWCr8ruH2cwTwI\n eVa6qgFe9bV+BD/7oHZcqpj6Msk3zH486g1SqeSUkG7QBqsgY45repd5ZlVAm1zx3aD3/cKbftg\n pk5Vkefhcz+AXim2yAPFcFcNqrSWFEL5KYUnnfObu1nV4KIUWBMO82IRMMAZunP+B1zxfBy65mN\n Ga8YWoPdcqbiT9vFTinmNC921VQ7YcrQ9gQP6wLAvVSTga61BmgHU0EwiEe2ZMtU3ag==",
        "X-Received": [
            "by 2002:a05:622a:7906:b0:50e:feee:76c3 with SMTP id\n d75a77b69052e-5100c8af06dmr7180941cf.18.1777316963595;\n Mon, 27 Apr 2026 12:09:23 -0700 (PDT)",
            "by 2002:a05:622a:7906:b0:50e:feee:76c3 with SMTP id\n d75a77b69052e-5100c8af06dmr7180461cf.18.1777316963140;\n Mon, 27 Apr 2026 12:09:23 -0700 (PDT)"
        ],
        "Message-ID": "<0dbc23c2-b1d3-416b-8ca8-c8948b6e7983@redhat.com>",
        "Date": "Mon, 27 Apr 2026 15:09:21 -0400",
        "MIME-Version": "1.0",
        "User-Agent": "Mozilla Thunderbird",
        "To": "\"gcc-patches@gcc.gnu.org\" <gcc-patches@gcc.gnu.org>",
        "From": "Vladimir Makarov <vmakarov@redhat.com>",
        "Subject": "[pushed][IRA]: Fix some cost calculation",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "34SM1CBM6UBdDN7uYI01lODE4oj1zGWtHjoRIsMnxfE_1777316963",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "multipart/mixed; boundary=\"------------ikJ6767SNGQpADypEnhiQMgu\"",
        "Content-Language": "en-US",
        "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": "Commit message describes the patch.\n\nThe patch was successfully bootstrapped and tested on x86-64, aarch64, \nppc64le.",
    "diff": "commit 000144cf5c0c0a9ba5c821cc9ca12b86868ec0ae\nAuthor: Vladimir N. Makarov <vmakarov@redhat.com>\nDate:   Mon Apr 27 12:15:35 2026 -0400\n\n    [IRA]: Fix some cost calculation.\n    \n    ira_memory_move_cost is used in many IRA places but I found 2 places where\n    load and store costs are used instead of correspondingly store and load\n    costs.  The patch fixes this.\n    \n    gcc/ChangeLog:\n    \n            * ira-costs.cc (record_reg_classes): When calculating alt_cost use\n            the right cost of memory-reg move.\n            * ira-emit.cc (emit_move_list): Use load cost instead of store for\n            moving memory to reg.\n\ndiff --git a/gcc/ira-costs.cc b/gcc/ira-costs.cc\nindex 8a731422761..3a42837a995 100644\n--- a/gcc/ira-costs.cc\n+++ b/gcc/ira-costs.cc\n@@ -993,10 +993,10 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,\n \t\t      else if (op_class == NO_REGS)\n \t\t\talt_cost\n \t\t\t  += ((out_p\n-\t\t\t       ? ira_memory_move_cost[mode][pref_class][1]\n+\t\t\t       ? ira_memory_move_cost[mode][pref_class][0]\n \t\t\t       : 0)\n \t\t\t      + (in_p\n-\t\t\t\t ? ira_memory_move_cost[mode][pref_class][0]\n+\t\t\t\t ? ira_memory_move_cost[mode][pref_class][1]\n \t\t\t\t : 0));\n \t\t      else if (ira_reg_class_intersect[pref_class][op_class]\n \t\t\t       == NO_REGS)\ndiff --git a/gcc/ira-emit.cc b/gcc/ira-emit.cc\nindex 07ca0de2355..7a0dbdb072f 100644\n--- a/gcc/ira-emit.cc\n+++ b/gcc/ira-emit.cc\n@@ -962,7 +962,7 @@ emit_move_list (move_t list, int freq)\n \t{\n \t  if (ALLOCNO_HARD_REGNO (list->to) >= 0)\n \t    {\n-\t      cost = ira_memory_move_cost[mode][aclass][0] * freq;\n+\t      cost = ira_memory_move_cost[mode][aclass][1] * freq;\n \t      ira_load_cost += cost;\n \t    }\n \t}\n",
    "prefixes": [
        "pushed",
        "IRA"
    ]
}