get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2194966,
    "url": "http://patchwork.ozlabs.org/api/patches/2194966/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260210095944.2502A4AA3975@sourceware.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": "<20260210095944.2502A4AA3975@sourceware.org>",
    "list_archive_url": null,
    "date": "2026-02-10T09:59:13",
    "name": "tree-optimization/107690 - avoid creating un-analyzable loop exits",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a64d1392e7d0990fd1cc46f527d1610f2ec143af",
    "submitter": {
        "id": 4338,
        "url": "http://patchwork.ozlabs.org/api/people/4338/?format=api",
        "name": "Richard Biener",
        "email": "rguenther@suse.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260210095944.2502A4AA3975@sourceware.org/mbox/",
    "series": [
        {
            "id": 491640,
            "url": "http://patchwork.ozlabs.org/api/series/491640/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=491640",
            "date": "2026-02-10T09:59:13",
            "name": "tree-optimization/107690 - avoid creating un-analyzable loop exits",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/491640/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2194966/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2194966/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 (1024-bit key;\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=tj6oX/S+;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=Kis3szIu;\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=tj6oX/S+;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=Kis3szIu;\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 (1024-bit key,\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=tj6oX/S+;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=Kis3szIu;\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=tj6oX/S+;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=Kis3szIu",
            "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 [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 4f9H9H48Pgz1xtV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 20:59:46 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 2502A4AA3975\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 09:59:44 +0000 (GMT)",
            "from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])\n by sourceware.org (Postfix) with ESMTPS id 30B394BA23CA\n for <gcc-patches@gcc.gnu.org>; Tue, 10 Feb 2026 09:59:14 +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 2055C3E71A\n for <gcc-patches@gcc.gnu.org>; Tue, 10 Feb 2026 09:59:13 +0000 (UTC)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 2502A4AA3975",
            "OpenDKIM Filter v2.11.0 sourceware.org 30B394BA23CA"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 30B394BA23CA",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 30B394BA23CA",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770717554; cv=none;\n b=dXrBUWZaRyNoIfRrlg06dsO3SfDoiFQONFtAqpCh9nsEW/w5l/UAt+pazaeZwUCAtVYyaDNoWHtuJJxHgiqAumZxl1+CH+JiwTcBpx+PBQ7NLXCeIflTM349NEdJPjNH4N4q64vqRBfO06yqC/hjqDC9rIugZabDkaycf5tnf5M=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770717554; c=relaxed/simple;\n bh=PD2wLeyNsFUuYEbxaLFj6vGw/rHkvJXV7o8x4ugRR04=;\n h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date:\n From:To:Subject:MIME-Version;\n b=h2qrwzfedEmTuPfw8zUihzlbpwZM19EfjytEhmjmKh9we+zB7OA/vTUIj1JK3gOtymOXzvQw1Sycz+moWkhw5cMFmyp1hIgjEoKL2aB45dysHx016DS2V7X6hsQWVWLhMLkJunZrfKrqy7iFZUxJzoGuPrvc/RugUBR7BdXk0V8=",
        "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=1770717553;\n h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version:\n content-type:content-type; bh=ME/nuxg61JcUfb8Up96hHRhbR+RfuJIT6L8ie06Ik5M=;\n b=tj6oX/S+WEp629PEyXry0HbZJyeDT/JDczQikFnIPkP37iNWdDhDuXZ7PjtRoxAo3bD5WQ\n pdwwuF4ds7vjxaAVZzB7psofaAu4HhlK9lYhb2MhY0fd8XvJ+LNwXqcUloducZIe/iHSxV\n IdohJpleY4wB6/8qLWIKIL1uRHqqgIc=",
            "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1770717553;\n h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version:\n content-type:content-type; bh=ME/nuxg61JcUfb8Up96hHRhbR+RfuJIT6L8ie06Ik5M=;\n b=Kis3szIu4i+w36Vy7Rs/git0krocQ1XaW0yK1xxDlL0RsD4SFtMeGZ/DnzEwIOTCXY8C5a\n n3BVL4CpkX0gbLCg==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1770717553;\n h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version:\n content-type:content-type; bh=ME/nuxg61JcUfb8Up96hHRhbR+RfuJIT6L8ie06Ik5M=;\n b=tj6oX/S+WEp629PEyXry0HbZJyeDT/JDczQikFnIPkP37iNWdDhDuXZ7PjtRoxAo3bD5WQ\n pdwwuF4ds7vjxaAVZzB7psofaAu4HhlK9lYhb2MhY0fd8XvJ+LNwXqcUloducZIe/iHSxV\n IdohJpleY4wB6/8qLWIKIL1uRHqqgIc=",
            "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1770717553;\n h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version:\n content-type:content-type; bh=ME/nuxg61JcUfb8Up96hHRhbR+RfuJIT6L8ie06Ik5M=;\n b=Kis3szIu4i+w36Vy7Rs/git0krocQ1XaW0yK1xxDlL0RsD4SFtMeGZ/DnzEwIOTCXY8C5a\n n3BVL4CpkX0gbLCg=="
        ],
        "Date": "Tue, 10 Feb 2026 10:59:13 +0100 (CET)",
        "From": "Richard Biener <rguenther@suse.de>",
        "To": "gcc-patches@gcc.gnu.org",
        "Subject": "[PATCH] tree-optimization/107690 - avoid creating un-analyzable loop\n exits",
        "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.998];\n NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[text/plain];\n TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1];\n MISSING_XM_UA(0.00)[]; FROM_EQ_ENVFROM(0.00)[];\n TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_ZERO(0.00)[0];\n FUZZY_RATELIMITED(0.00)[rspamd.com];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]",
        "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": "<20260210095944.2502A4AA3975@sourceware.org>"
    },
    "content": "The following adds a heuristic to ifcombine that avoids turning\nanalyzable loop exits into unanalyzable ones.  This allows vectorizing\nthe testcase in the PR again.  I've refrained from actually\nanalyzing niters but instead used a cheaper heuristic.  I believe\nwe'll only ever attempt to combine two ifs if they are in the same\nloop and if either both exit the loop or stay within.\n\nBootstrapped and tested on x86_64-unknown-linux-gnu, pushed.\n\n\tPR tree-optimization/107690\n\t* tree-ssa-ifcombine.cc (ifcombine_ifandif): Do not merge\n\tpossibly analyzable exit conditions.\n\n\t* g++.dg/vect/vect-pr107690.cc: New testcase.\n---\n gcc/testsuite/g++.dg/vect/vect-pr107690.cc | 16 ++++++++++++++++\n gcc/tree-ssa-ifcombine.cc                  | 16 ++++++++++++++++\n 2 files changed, 32 insertions(+)\n create mode 100644 gcc/testsuite/g++.dg/vect/vect-pr107690.cc",
    "diff": "diff --git a/gcc/testsuite/g++.dg/vect/vect-pr107690.cc b/gcc/testsuite/g++.dg/vect/vect-pr107690.cc\nnew file mode 100644\nindex 00000000000..847dbca5f62\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/vect/vect-pr107690.cc\n@@ -0,0 +1,16 @@\n+// { dg-do compile }\n+// { dg-require-effective-target vect_int }\n+// { dg-additional-options \"-std=gnu++20\" }\n+\n+#include <algorithm>\n+#include <array>\n+#include <ranges>\n+\n+std::array<int, 16> foo(std::array<int, 16> u, std::array<int, 16> const &v)\n+{\n+  std::ranges::transform(u, v, u.begin(), std::plus<int>());\n+  return u;\n+}\n+\n+// { dg-final { scan-tree-dump \"optimized: loop vectorized\" \"vect\" } }\n+// { dg-final { scan-tree-dump-not \"Loop being analyzed as uncounted\" \"vect\" } }\ndiff --git a/gcc/tree-ssa-ifcombine.cc b/gcc/tree-ssa-ifcombine.cc\nindex 7769118b9f6..a60e6914e68 100644\n--- a/gcc/tree-ssa-ifcombine.cc\n+++ b/gcc/tree-ssa-ifcombine.cc\n@@ -43,6 +43,7 @@ along with GCC; see the file COPYING3.  If not see\n #include \"attribs.h\"\n #include \"asan.h\"\n #include \"bitmap.h\"\n+#include \"cfgloop.h\"\n \n #ifndef LOGICAL_OP_NON_SHORT_CIRCUIT\n #define LOGICAL_OP_NON_SHORT_CIRCUIT \\\n@@ -818,6 +819,21 @@ ifcombine_ifandif (basic_block inner_cond_bb, bool inner_inv,\n   if (!outer_cond)\n     return false;\n \n+  /* niter analysis does not cope with boolean typed loop exit conditions.\n+     Avoid turning an analyzable exit into an unanalyzable one.  */\n+  if (inner_cond_bb->loop_father == outer_cond_bb->loop_father\n+      && loop_exits_from_bb_p (inner_cond_bb->loop_father, inner_cond_bb)\n+      && loop_exits_from_bb_p (outer_cond_bb->loop_father, outer_cond_bb))\n+    {\n+      tree outer_type = TREE_TYPE (gimple_cond_lhs (outer_cond));\n+      tree inner_type = TREE_TYPE (gimple_cond_lhs (inner_cond));\n+      if (TREE_CODE (outer_type) == INTEGER_TYPE\n+\t  || POINTER_TYPE_P (outer_type)\n+\t  || TREE_CODE (inner_type) == INTEGER_TYPE\n+\t  || POINTER_TYPE_P (inner_type))\n+\treturn false;\n+    }\n+\n   /* See if we test a single bit of the same name in both tests.  In\n      that case remove the outer test, merging both else edges,\n      and change the inner one to test for\n",
    "prefixes": []
}