get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 808512,
    "url": "http://patchwork.ozlabs.org/api/patches/808512/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/3a127cd6a785b1e067bf8458e8010ee01980c228.1504185832.git.segher@kernel.crashing.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": "<3a127cd6a785b1e067bf8458e8010ee01980c228.1504185832.git.segher@kernel.crashing.org>",
    "list_archive_url": null,
    "date": "2017-09-01T01:32:25",
    "name": "combine: Fix for PR82024",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "07e9531996c7fb5740fd2a1751518a0215e68ea0",
    "submitter": {
        "id": 134,
        "url": "http://patchwork.ozlabs.org/api/people/134/?format=api",
        "name": "Segher Boessenkool",
        "email": "segher@kernel.crashing.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/3a127cd6a785b1e067bf8458e8010ee01980c228.1504185832.git.segher@kernel.crashing.org/mbox/",
    "series": [
        {
            "id": 937,
            "url": "http://patchwork.ozlabs.org/api/series/937/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=937",
            "date": "2017-09-01T01:32:25",
            "name": "combine: Fix for PR82024",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/937/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808512/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808512/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-return-461248-incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "mailing list gcc-patches@gcc.gnu.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461248-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"SppNEKBO\"; dkim-atps=neutral",
            "sourceware.org; auth=none"
        ],
        "Received": [
            "from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xk1vX4hHWz9sPm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 11:32:38 +1000 (AEST)",
            "(qmail 69351 invoked by alias); 1 Sep 2017 01:32:30 -0000",
            "(qmail 69316 invoked by uid 89); 1 Sep 2017 01:32:30 -0000",
            "from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org)\n\t(140.211.15.137) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tFri, 01 Sep 2017 01:32:29 +0000",
            "by gcc1-power7.osuosl.org (Postfix, from userid 10019)\tid\n\t734B712402C9; Fri,  1 Sep 2017 01:32:27 +0000 (UTC)"
        ],
        "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:to:cc:subject:date:message-id; q=dns; s=default; b=HOEtJ059yYwx\n\tAjxMWCicAeOnAediyGjbnZXXcdk2SUvGRc5tpNXrAGu59/vio6QM6gtKuOoMIqRu\n\tuoSaY33UNdc+jjdcrKdqX8jjW7CrXDUA+TYGxK022zpj7PivkO2Qwa1qVmJx/9bO\n\t8STq5TjC2lrKfQFtS3JnC5mGd8MHIGw=",
        "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:to:cc:subject:date:message-id; s=default; bh=mLyGsp1arNJMimTJT3\n\t5rJsF0d88=; b=SppNEKBOQtMkyOvs2sy+0dYThfaFcScKJahrJ7TeeVdvuzCYdd\n\tajmC2EL1hPeW82y1fgdYgXuzJiJPsd7ug1dmD9Wv88JsDczkSbbC4a96Rd04RMb9\n\tfexieUEqgo1bZWNwkB8j5TeANfUmcbv9eKoqRFLeEQVwal03bjPKjL3QI=",
        "Mailing-List": "contact gcc-patches-help@gcc.gnu.org; run by ezmlm",
        "Precedence": "bulk",
        "List-Id": "<gcc-patches.gcc.gnu.org>",
        "List-Unsubscribe": "<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "List-Archive": "<http://gcc.gnu.org/ml/gcc-patches/>",
        "List-Post": "<mailto:gcc-patches@gcc.gnu.org>",
        "List-Help": "<mailto:gcc-patches-help@gcc.gnu.org>",
        "Sender": "gcc-patches-owner@gcc.gnu.org",
        "X-Virus-Found": "No",
        "X-Spam-SWARE-Status": "No, score=-24.1 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tKAM_LAZY_DOMAIN_SECURITY,\n\tRP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=i3",
        "X-HELO": "gcc1-power7.osuosl.org",
        "From": "Segher Boessenkool <segher@kernel.crashing.org>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "Segher Boessenkool <segher@kernel.crashing.org>",
        "Subject": "[PATCH] combine: Fix for PR82024",
        "Date": "Fri,  1 Sep 2017 01:32:25 +0000",
        "Message-Id": "<3a127cd6a785b1e067bf8458e8010ee01980c228.1504185832.git.segher@kernel.crashing.org>",
        "X-IsSubscribed": "yes"
    },
    "content": "With the testcase in the PR, with all the command line options mentioned\nthere, a (comparison) instruction becomes dead in fwprop1 but is not\ndeleted until all the way in rtl_dce.\n\nBefore combine this insn look like:\n\n20: flags:CC=cmp(r106:DI,0xffffffffffffffff)\n      REG_DEAD r106:DI\n      REG_UNUSED flags:CC\n      REG_EQUAL cmp(0,0xffffffffffffffff)\n\n(note the only output is unused).\n\nCombining some earlier insns gives\n\n13: r106:DI=0\n14: r105:DI=r101:DI+r103:DI\n\n14+13+20 then gives\n\n(parallel [\n        (set (reg:CC 17 flags)\n            (compare:CC (const_int 0 [0])\n                (const_int -1 [0xffffffffffffffff])))\n        (set (reg:DI 105)\n            (plus:DI (reg/v:DI 101 [ e ])\n                (reg:DI 103)))\n    ])\n\nwhich doesn't match; but the set of flags is dead, so combine makes the\nset of r105 the whole new instruction, which it then places at i3.  But\nthat is wrong, because r105 is used after i2 but before i3!  We forget\nto check for that in this case.\n\nThis patch fixes it.  Bootstrapped and tested on powerpc64-linux {-m32,-m64},\nand on x86_64-linux, and tested it doesn't regress output by comparing Linux\nkernel builds for 30 targets.\n\nI'll commit this tomorrow.\n\n\nSegher\n\n\n2017-08-31  Segher Boessenkool  <segher@kernel.crashing.org>\n\n\tPR rtl-optimization/82024\n\t* combine.c (try_combine): If the combination result is a PARALLEL,\n\tand we only need to retain the SET in there that would be placed\n\tat I2, check that we can place that at I3 instead, before doing so.\n\n---\n gcc/combine.c | 19 ++++++++++++++-----\n 1 file changed, 14 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/gcc/combine.c b/gcc/combine.c\nindex c139cf6..bf3eda8 100644\n--- a/gcc/combine.c\n+++ b/gcc/combine.c\n@@ -3505,7 +3505,10 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,\n      i3, and one from i2.  Combining then splitting the parallel results\n      in the original i2 again plus an invalid insn (which we delete).\n      The net effect is only to move instructions around, which makes\n-     debug info less accurate.  */\n+     debug info less accurate.\n+\n+     If the remaining SET came from I2 its destination should not be used\n+     between I2 and I3.  See PR82024.  */\n \n   if (!(added_sets_2 && i1 == 0)\n       && is_parallel_of_n_reg_sets (newpat, 2)\n@@ -3534,11 +3537,17 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,\n \t       && insn_nothrow_p (i3)\n \t       && !side_effects_p (SET_SRC (set0)))\n \t{\n-\t  newpat = set1;\n-\t  insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes);\n+\t  rtx dest = SET_DEST (set1);\n+\t  if (GET_CODE (dest) == SUBREG)\n+\t    dest = SUBREG_REG (dest);\n+\t  if (!reg_used_between_p (dest, i2, i3))\n+\t    {\n+\t      newpat = set1;\n+\t      insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes);\n \n-\t  if (insn_code_number >= 0)\n-\t    changed_i3_dest = 1;\n+\t      if (insn_code_number >= 0)\n+\t\tchanged_i3_dest = 1;\n+\t    }\n \t}\n \n       if (insn_code_number < 0)\n",
    "prefixes": []
}