get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 807772,
    "url": "http://patchwork.ozlabs.org/api/patches/807772/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/e4d087eb-6170-e688-4248-0627f2d2a556@linux.vnet.ibm.com/",
    "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": "<e4d087eb-6170-e688-4248-0627f2d2a556@linux.vnet.ibm.com>",
    "list_archive_url": null,
    "date": "2017-08-30T17:22:45",
    "name": "Fix PR81987 (SLSR dominance issue)",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "902b102be1da9454d7e3c2820733595971a38bf2",
    "submitter": {
        "id": 6459,
        "url": "http://patchwork.ozlabs.org/api/people/6459/?format=api",
        "name": "Bill Schmidt",
        "email": "wschmidt@linux.vnet.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/e4d087eb-6170-e688-4248-0627f2d2a556@linux.vnet.ibm.com/mbox/",
    "series": [
        {
            "id": 663,
            "url": "http://patchwork.ozlabs.org/api/series/663/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=663",
            "date": "2017-08-30T17:22:45",
            "name": "Fix PR81987 (SLSR dominance issue)",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/663/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/807772/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/807772/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-return-461184-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-461184-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=\"pp8Tc4np\"; 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 3xjC514bGlz9sN7\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 03:23:00 +1000 (AEST)",
            "(qmail 49690 invoked by alias); 30 Aug 2017 17:22:53 -0000",
            "(qmail 49611 invoked by uid 89); 30 Aug 2017 17:22:53 -0000",
            "from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com)\n\t(148.163.156.1) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tWed, 30 Aug 2017 17:22:51 +0000",
            "from pps.filterd (m0098399.ppops.net [127.0.0.1])\tby\n\tmx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv7UHJE1M046322\tfor <gcc-patches@gcc.gnu.org>;\n\tWed, 30 Aug 2017 13:22:50 -0400",
            "from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202])\tby\n\tmx0a-001b2d01.pphosted.com with ESMTP id\n\t2cnyf4rdqy-1\t(version=TLSv1.2 cipher=AES256-SHA bits=256\n\tverify=NOT)\tfor <gcc-patches@gcc.gnu.org>;\n\tWed, 30 Aug 2017 13:22:49 -0400",
            "from localhost\tby e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted\tfor\n\t<gcc-patches@gcc.gnu.org> from <wschmidt@linux.vnet.ibm.com>;\n\tWed, 30 Aug 2017 13:22:48 -0400",
            "from b01cxnp22034.gho.pok.ibm.com (9.57.198.24)\tby\n\te12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted;\n\tWed, 30 Aug 2017 13:22:46 -0400",
            "from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com\n\t[9.57.199.110])\tby b01cxnp22034.gho.pok.ibm.com\n\t(8.14.9/8.14.9/NCO v10.0) with ESMTP id v7UHMMNx22741062;\n\tWed, 30 Aug 2017 17:22:45 GMT",
            "from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1])\tby IMSVA\n\t(Postfix) with ESMTP id E5693AE063;\n\tWed, 30 Aug 2017 13:23:09 -0400 (EDT)",
            "from bigmac.rchland.ibm.com (unknown [9.10.86.76])\tby\n\tb01ledav005.gho.pok.ibm.com (Postfix) with ESMTP id\n\tBD8E9AE03B; Wed, 30 Aug 2017 13:23:09 -0400 (EDT)"
        ],
        "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:to:cc\n\t:from:subject:date:mime-version:content-type\n\t:content-transfer-encoding:message-id; q=dns; s=default; b=uGAjp\n\tIApKdkTXazOi4dNLb2C4hhE83rfAfQAnPpez9PTXa7Ifs2wtJN56/Luf1nOyUoV5\n\tfeOO8bo8a6rvifXtMKcND/yLw7Ru9P9xUl6TIJoOMDNBeKuxjLHvpstSK/zYPqqm\n\t0NnuCCHBWhxTXJWdNUnjy7u4axmFE0jlf2h8Jo=",
        "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:to:cc\n\t:from:subject:date:mime-version:content-type\n\t:content-transfer-encoding:message-id; s=default; bh=SObxNlKCeAu\n\tpCPop76EruVcEFNw=; b=pp8Tc4npljL8TfPYOWVdi81CC993IEDczPU+1r2O0aE\n\t1pc1SvLvNS9t3EukaS3MUI3XzNoGO4oDSM+9rC7C0Z8cgb7+R8V99LM6+rcyLGuX\n\tE4OGeT90xvZwAQL+2Cd3HS9znBX8TKsVotHRzOafddF8NVSmB8L6fCOBo0veCRdU\n\t=",
        "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=-10.4 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS,\n\tKAM_LAZY_DOMAIN_SECURITY,\n\tRCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=earliest,\n\tnominal, Multiple, dominance",
        "X-HELO": "mx0a-001b2d01.pphosted.com",
        "To": "GCC Patches <gcc-patches@gcc.gnu.org>",
        "Cc": "Richard Biener <richard.guenther@gmail.com>",
        "From": "Bill Schmidt <wschmidt@linux.vnet.ibm.com>",
        "Subject": "[PATCH] Fix PR81987 (SLSR dominance issue)",
        "Date": "Wed, 30 Aug 2017 12:22:45 -0500",
        "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12;\n\trv:52.0) Gecko/20100101 Thunderbird/52.3.0",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=utf-8",
        "Content-Transfer-Encoding": "7bit",
        "X-TM-AS-GCONF": "00",
        "x-cbid": "17083017-0048-0000-0000-000001DBD4E4",
        "X-IBM-SpamModules-Scores": "",
        "X-IBM-SpamModules-Versions": "BY=3.00007637; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000226; SDB=6.00909817; UDB=6.00456342;\n\tIPR=6.00690101; BA=6.00005562; NDR=6.00000001; ZLA=6.00000005;\n\tZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000;\n\tZU=6.00000002; MB=3.00016930; XFM=3.00000015;\n\tUTC=2017-08-30 17:22:47",
        "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused",
        "x-cbparentid": "17083017-0049-0000-0000-000042663BC3",
        "Message-Id": "<e4d087eb-6170-e688-4248-0627f2d2a556@linux.vnet.ibm.com>",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-30_07:, , signatures=0",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0 malwarescore=0 phishscore=0\n\tadultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx\n\tscancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1708300263",
        "X-IsSubscribed": "yes"
    },
    "content": "Hi,\n\nhttps://gcc.gnu.org/PR81987 identifies an SSA verification error following\nSLSR.  The problem arises when SLSR places an initialization expression at\na point not dominated by the definition of an SSA name it uses.  When there\nare multiple conditional candidates for replacement, the initialization\nexpression must dominate all of these candidates and their phi dependencies,\nbut the nearest common dominator for these may actually be above the stride\ndefinition in some cases.\n\nIn such cases a single initialization point is not possible.  With sufficient\nanalysis, it would be possible to find multiple initialization points that\nwould satisfy availability of the stride at the cost of larger code.  This\nis too complex for a bug fix, though.  This patch instead refuses to replace\ncandidates where a single legal initialization point isn't possible.  We\nensure this by setting the cost for the increment associated with this\ninitialization to effectively infinite.\n\nBootstrapped and tested on powerpc64le-linux-gnu with no regressions.  Is\nthis okay for trunk, and backport to all supported releases after a period\nof burn-in?\n\nThanks,\nBill\n\n\n[gcc]\n\n2017-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>\n\n\tPR tree-optimization/81987\n\t* gimple-ssa-strength-reduction.c (insert_initializers): Don't\n\tinsert an initializer in a location not dominated by the stride\n\tdefinition.\n\n[gcc/testsuite]\n\n2017-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>\n\n\tPR tree-optimization/81987\n\t* g++.dg/torture/pr81987.C: New file.",
    "diff": "Index: gcc/gimple-ssa-strength-reduction.c\n===================================================================\n--- gcc/gimple-ssa-strength-reduction.c\t(revision 251369)\n+++ gcc/gimple-ssa-strength-reduction.c\t(working copy)\n@@ -3340,6 +3340,23 @@ insert_initializers (slsr_cand_t c)\n \t that block, the earliest one will be returned in WHERE.  */\n       bb = nearest_common_dominator_for_cands (c, incr, &where);\n \n+      /* If the NCD is not dominated by the block containing the\n+\t definition of the stride, we can't legally insert a\n+\t single initializer.  Mark the increment as unprofitable\n+\t so we don't make any replacements.  FIXME: Multiple\n+\t initializers could be placed with more analysis.  */\n+      gimple *stride_def = SSA_NAME_DEF_STMT (c->stride);\n+      basic_block stride_bb = gimple_bb (stride_def);\n+\n+      if (stride_bb && !dominated_by_p (CDI_DOMINATORS, bb, stride_bb))\n+\t{\n+\t  if (dump_file && (dump_flags & TDF_DETAILS))\n+\t    fprintf (dump_file,\n+\t\t     \"Initializer #%d cannot be legally placed\\n\", i);\n+\t  incr_vec[i].cost = COST_INFINITE;\n+\t  continue;\n+\t}\n+\n       /* If the nominal stride has a different type than the recorded\n \t stride type, build a cast from the nominal stride to that type.  */\n       if (!types_compatible_p (TREE_TYPE (c->stride), c->stride_type))\nIndex: gcc/testsuite/g++.dg/torture/pr81987.C\n===================================================================\n--- gcc/testsuite/g++.dg/torture/pr81987.C\t(nonexistent)\n+++ gcc/testsuite/g++.dg/torture/pr81987.C\t(working copy)\n@@ -0,0 +1,61 @@\n+extern short var_1;\n+extern const short var_3;\n+extern unsigned long int var_9;\n+extern short var_13;\n+extern const unsigned long int var_15;\n+extern const unsigned long int var_37;\n+extern unsigned long int var_40;\n+extern long long int var_47;\n+extern short var_48;\n+extern const short var_54;\n+extern long long int var_79;\n+extern long long int var_81;\n+extern long long int var_94;\n+extern long long int var_95;\n+extern long long int var_701;\n+extern unsigned long int var_786;\n+extern short var_788;\n+extern long long int var_844;\n+\n+struct struct_1 {\n+  short member_1_2 : 15;\n+  static long long int member_1_3;\n+};\n+\n+extern struct_1 struct_obj_6;\n+extern struct_1 struct_obj_8;\n+\n+void foo() {\n+  int a = var_3 <= 602154393864UL;\n+  if (var_81 ? 0 : var_3 && var_9)\n+    ;\n+  else {\n+    var_94 = 0;\n+    if (var_3 && var_48 || var_13) {\n+      if (var_48)\n+\tvar_95 = 0;\n+      short b((2364461588881776511UL + var_3) * (2 ? var_13 : 0) || var_1);\n+      struct_obj_8.member_1_2 = b;\n+      if (var_15) {\n+\tif (var_81)\n+\t  if (var_47)\n+\t    ;\n+\t  else if (var_40)\n+\t    var_701 = 0;\n+      } else {\n+\tif (var_40)\n+\t  var_79 = 0;\n+\tif (var_54) {\n+\t  if (var_37)\n+\t    var_786 = 0;\n+\t  else\n+\t    var_788 = 0;\n+\t            struct_obj_6.member_1_3 =\n+\t\t      (2364461588881776511UL + var_3) * (2 ? var_13 : 0);\n+\t}\n+      }\n+      if ((2364461588881776511UL + var_3) * (2 ? var_13 : 0))\n+\tvar_844 = 0;\n+    }\n+  }\n+}\n",
    "prefixes": []
}