get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2227442,
    "url": "http://patchwork.ozlabs.org/api/patches/2227442/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260423181323.1478400-1-avinal.xlvii@gmail.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": "<20260423181323.1478400-1-avinal.xlvii@gmail.com>",
    "list_archive_url": null,
    "date": "2026-04-23T18:13:23",
    "name": "[v2] tree-ssa-strlen: Use gimple_build/gimple_convert_to_ptrofftype [PR122989]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "59724af0419e3c48ce3a68c7298aa7f4e34242c3",
    "submitter": {
        "id": 88549,
        "url": "http://patchwork.ozlabs.org/api/people/88549/?format=api",
        "name": "Avinal Kumar",
        "email": "avinal.xlvii@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260423181323.1478400-1-avinal.xlvii@gmail.com/mbox/",
    "series": [
        {
            "id": 501233,
            "url": "http://patchwork.ozlabs.org/api/series/501233/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501233",
            "date": "2026-04-23T18:13:23",
            "name": "[v2] tree-ssa-strlen: Use gimple_build/gimple_convert_to_ptrofftype [PR122989]",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/501233/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2227442/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2227442/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\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=ToHS7qjr;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.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 (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=ToHS7qjr",
            "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "sourceware.org; spf=pass smtp.mailfrom=gmail.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.215.179"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 4g1kkf11T7z1yDD\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 04:14:16 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id C96E44B9DB73\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 18:14:14 +0000 (GMT)",
            "from mail-pg1-f179.google.com (mail-pg1-f179.google.com\n [209.85.215.179])\n by sourceware.org (Postfix) with ESMTPS id 3C41F4B9DB6A\n for <gcc-patches@gcc.gnu.org>; Thu, 23 Apr 2026 18:13:47 +0000 (GMT)",
            "by mail-pg1-f179.google.com with SMTP id\n 41be03b00d2f7-c76b994f7a8so2759447a12.3\n for <gcc-patches@gcc.gnu.org>; Thu, 23 Apr 2026 11:13:47 -0700 (PDT)",
            "from fedoraemon.neon-universe.ts.net\n ([2406:7400:11d:a9dc:9a14:72eb:1a60:868a])\n by smtp.gmail.com with ESMTPSA id\n 41be03b00d2f7-c7991ca66dasm9172252a12.26.2026.04.23.11.13.43\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 23 Apr 2026 11:13:44 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org C96E44B9DB73",
            "OpenDKIM Filter v2.11.0 sourceware.org 3C41F4B9DB6A"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 3C41F4B9DB6A",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 3C41F4B9DB6A",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776968027; cv=none;\n b=dIh9eoVWqK4QNWByT3gnKCw7slr/DhWGOn+O8fg/ZVsHyBIuCw1j/LoYB1wN9/t61SoTSaTi73pAUfvmlQI1EJsTTyNYu4Ic7K4EZL+/IfOONNAavBuMlS+eud4lOtiI3q37JACxCkVQmQTi69O9pXB2pL3kn+i7YrQVmUWXaQ0=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776968027; c=relaxed/simple;\n bh=Bh8mCEfp9PulRpAaTfywFvQRyFmuhnyM5xnbQOtZmYY=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=wOdjrjJTQlv6RUDlM3ZWX7mVbOVM5Jq+YpoOpxk5uDWLqzMl9Mrkxabr43GOoxkFRu7muoNVhWKEXb1fz3BS9i/YySI4IqBpSGGHFLg/JtezWHPTCvL/X2PdqzEsI0SsY6AhDO4ntsJnvKdc8no4P3Vzc9nQCjZyQyJH8BhtRzs=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776968025; x=1777572825; darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=Rtim95/O3aeKqPsFOqaSs0xRvZvTIqcd8vos9NDS8hI=;\n b=ToHS7qjrVoC50q5tpQiYb19poCo3sMkjXaEBoAP77y5ZCacQ2DqGDIZalVWn8CqhHF\n h+hxA+CA6dIBC6a30bL6uGflicqJQZbImRtynNaYi1cxUXDkVrrP78474sSxqODlyJ9J\n O6t5oUVtyxYcBevvZjUWMTLEqpUK1Y93ebUCc6W/faELYvvcXmwq/qDYID51WE5QOthe\n JKz7TuSQGZjlO+VtV042afb0tlaS3b9FEp9LMAYQXJXYs9Um4WL3P1CM5uDaoSEg/lli\n o9QrXU5GYJRsMgXH0Fk09zNt+AjND4LIRqtEY6EAALTBjb1hhJ6W5ACAy88QXRFyw0/L\n Ofiw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776968025; x=1777572825;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=Rtim95/O3aeKqPsFOqaSs0xRvZvTIqcd8vos9NDS8hI=;\n b=OwbiIyEuu4IH7TAvl6k/YPGOFTIbXGFca7Pn6k+cUmtWlf5EeZrLMM8KJgcftgfT3N\n XwoEPIOb+hVGU/OCfsVf2FE/D8SeTiM3NlsRGTmooM1BSs04IwuwkWqMpP2n3he0Ev7t\n X4EbWLd1aRp1WJJ2RamB2h5qIbf9Y/VmLXy7rDJrfqXrr39sTU+ToltKGenKR1b3l6sJ\n 4zpXEDSZpdXd7hR3lMaPmizZRwQVGLUPddUkBUAnWGAWWE8YtLL2pt5Eql7V+Te22AQB\n x8wKYo9a/FFG6eTygms9A2VrpFbD7cLMq/0DhFf3ceiv9PGHl2O9FiqfVQ2A5Wvcc61E\n 4wZw==",
        "X-Gm-Message-State": "AOJu0Yw7DC80D4R96slBKaCiotyQbKRFPlmi7SRvItfxO9M/QirY4vM1\n PFBTkp8WVXAHYHLttsS6LxAgoJe0yPNgqtrITPO9JGIXCUx1f8nxD357pBbGnw==",
        "X-Gm-Gg": "AeBDiesXlJONBzX6t27Z9jJNb4V/FGwfsa1RUND7Dsz3Xi08T8yno7VmnaBHAlE1bBO\n sm2ku8yQo01jeNLEPIJ1bqdI0wW8zYD2NGfViaGtaSTkT1uRbT6KMOyTSEqdqsd6ZDjt7PqLL/R\n Vyo3U7c+TL3tkQw27ZXWS28V0JRqp74e3ov2M3nu+dB1VNqMBEzBBe5uq1K2JYbrTkgJ6/dcnf0\n rstrnLB74uJsmvouDdREwYpAPY/WiN3m59P6ubq9w2PqWlrmDV/obW/NUuM5e7pj7bi0KBNPsGB\n q04r9iGDDL0+hB8sSsjO3EfdMg/bcXUs2lRD1N6/xvTXNqfAa1yM/A0KHUAB1wRFo8XPVjsBnfN\n XLJyLceDbEo4ms9Z32IJM/DoGG208/XGjClwS9XEU7rhf2iWDucQ88SvK0SD81Gl6n0MBE20oFX\n bXh08vDi49P+n0ToKSupKwNU3CP0WZt7pBtBvaF19xEQy2iB5iHtrMv0iglZYIMPJPQg==",
        "X-Received": "by 2002:a05:6a20:12d3:b0:35d:5d40:6d79 with SMTP id\n adf61e73a8af0-3a08d726af6mr29657910637.12.1776968025318;\n Thu, 23 Apr 2026 11:13:45 -0700 (PDT)",
        "From": "Avinal Kumar <avinal.xlvii@gmail.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "andrew.pinski@oss.qualcomm.com",
        "Subject": "[PATCH v2] tree-ssa-strlen: Use\n gimple_build/gimple_convert_to_ptrofftype [PR122989]",
        "Date": "Thu, 23 Apr 2026 23:43:23 +0530",
        "Message-ID": "<20260423181323.1478400-1-avinal.xlvii@gmail.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Replace convert_to_ptrofftype, force_gimple_operand_gsi,\ngimple_build_assign, and gsi_insert_before with\ngimple_convert_to_ptrofftype and gimple_build.\n\ngcc/ChangeLog:\n\n\tPR tree-optimization/122989\n\t* tree-ssa-strlen.cc (get_string_length): Use\n\tgimple_convert_to_ptrofftype and gimple_build instead of\n\tconvert_to_ptrofftype/force_gimple_operand_gsi/gimple_build_assign.\n\nSigned-off-by: Avinal Kumar <avinal.xlvii@gmail.com>\n---\nOk, generating changelog was easy, I missed it the first time. I ran both build\nand test, it took around an hour. The test results are confusing, it shows pass\nbut the exit code is not 0. Here is the summary from the tests:\n\n============================================================================\nTestsuite summary for package-unused version-unused\n============================================================================\n# TOTAL: 38\n# PASS:  38\n# SKIP:  0\n# XFAIL: 0\n# FAIL:  0\n# XPASS: 0\n# ERROR: 0\n============================================================================\nmake[4]: Leaving directory '/home/cicada/Documents/code/gcc-work/build/libbacktrace'\nmake[3]: Leaving directory '/home/cicada/Documents/code/gcc-work/build/libbacktrace'\nmake[2]: Leaving directory '/home/cicada/Documents/code/gcc-work/build/libbacktrace'\nmake[1]: Target 'check-host' not remade because of errors.\nmake[1]: Leaving directory '/home/cicada/Documents/code/gcc-work/build'\nmake: *** [Makefile:2711: do-check] Error 2\nmake: Target 'check' not remade because of errors.\n\nI tried multiple times, same results.\n\n gcc/tree-ssa-strlen.cc | 18 +++++++-----------\n 1 file changed, 7 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/gcc/tree-ssa-strlen.cc b/gcc/tree-ssa-strlen.cc\nindex c698998f5d8..70d45e36b3f 100644\n--- a/gcc/tree-ssa-strlen.cc\n+++ b/gcc/tree-ssa-strlen.cc\n@@ -877,17 +877,13 @@ get_string_length (strinfo *si)\n \t  gimple_set_vuse (lenstmt, gimple_vuse (stmt));\n \t  gsi_insert_before (&gsi, lenstmt, GSI_SAME_STMT);\n \t  tem = gimple_call_arg (stmt, 0);\n-          if (!ptrofftype_p (TREE_TYPE (lhs)))\n-            {\n-              lhs = convert_to_ptrofftype (lhs);\n-              lhs = force_gimple_operand_gsi (&gsi, lhs, true, NULL_TREE,\n-                                              true, GSI_SAME_STMT);\n-            }\n-\t  lenstmt = gimple_build_assign\n-\t\t\t(make_ssa_name (TREE_TYPE (gimple_call_arg (stmt, 0))),\n-\t\t\t POINTER_PLUS_EXPR,tem, lhs);\n-\t  gsi_insert_before (&gsi, lenstmt, GSI_SAME_STMT);\n-\t  gimple_call_set_arg (stmt, 0, gimple_assign_lhs (lenstmt));\n+\t  lhs = gimple_convert_to_ptrofftype (&gsi, true, GSI_SAME_STMT,\n+\t\t\t\t\t\tgimple_location (stmt), lhs);\n+\t  tem = gimple_build (&gsi, true, GSI_SAME_STMT,\n+\t\t\t\tgimple_location (stmt), POINTER_PLUS_EXPR,\n+\t\t\t\tTREE_TYPE (gimple_call_arg (stmt, 0)),\n+\t\t\t\ttem, lhs);\n+\t  gimple_call_set_arg (stmt, 0, tem);\n \t  lhs = NULL_TREE;\n \t  /* FALLTHRU */\n \tcase BUILT_IN_STRCPY:\n",
    "prefixes": [
        "v2"
    ]
}