get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2224739,
    "url": "http://patchwork.ozlabs.org/api/patches/2224739/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260418042835.3266327-1-andrew.pinski@oss.qualcomm.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": "<20260418042835.3266327-1-andrew.pinski@oss.qualcomm.com>",
    "list_archive_url": null,
    "date": "2026-04-18T04:28:35",
    "name": "[GCC17-PATCH] cselim: Remove restriction of join block having 2 predecessors [PR123113]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "cea61ae4771419c5444a3015cd61f0c7c4f061e4",
    "submitter": {
        "id": 91428,
        "url": "http://patchwork.ozlabs.org/api/people/91428/?format=api",
        "name": "Andrew Pinski",
        "email": "andrew.pinski@oss.qualcomm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260418042835.3266327-1-andrew.pinski@oss.qualcomm.com/mbox/",
    "series": [
        {
            "id": 500415,
            "url": "http://patchwork.ozlabs.org/api/series/500415/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=500415",
            "date": "2026-04-18T04:28:35",
            "name": "[GCC17-PATCH] cselim: Remove restriction of join block having 2 predecessors [PR123113]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/500415/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2224739/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2224739/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=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=PpIklQNB;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=KR4Rq32F;\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=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=PpIklQNB;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=KR4Rq32F",
            "sourceware.org; dmarc=none (p=none dis=none)\n header.from=oss.qualcomm.com",
            "sourceware.org;\n spf=pass smtp.mailfrom=oss.qualcomm.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=205.220.168.131"
        ],
        "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 4fyJg66DfKz1y1V\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Apr 2026 14:29:21 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id CCDCB4AA3978\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Apr 2026 04:29:16 +0000 (GMT)",
            "from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com\n [205.220.168.131])\n by sourceware.org (Postfix) with ESMTPS id A58684AA51F8\n for <gcc-patches@gcc.gnu.org>; Sat, 18 Apr 2026 04:28:44 +0000 (GMT)",
            "from pps.filterd (m0279865.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63I28sTg011368\n for <gcc-patches@gcc.gnu.org>; Sat, 18 Apr 2026 04:28:43 GMT",
            "from mail-pl1-f199.google.com (mail-pl1-f199.google.com\n [209.85.214.199])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dm0wr06nf-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <gcc-patches@gcc.gnu.org>; Sat, 18 Apr 2026 04:28:43 +0000 (GMT)",
            "by mail-pl1-f199.google.com with SMTP id\n d9443c01a7336-2b461b36990so13129835ad.3\n for <gcc-patches@gcc.gnu.org>; Fri, 17 Apr 2026 21:28:43 -0700 (PDT)",
            "from xeond2.wrightpinski.org ([98.97.39.214])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b60003ffd7sm19543265ad.80.2026.04.17.21.28.40\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 17 Apr 2026 21:28:41 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org CCDCB4AA3978",
            "OpenDKIM Filter v2.11.0 sourceware.org A58684AA51F8"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org A58684AA51F8",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org A58684AA51F8",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776486524; cv=none;\n b=v8fgZJIZ1RBJKAq1FUCQJ04VQOiyAgIifuOlshZyv1nVnlxlOscKIjGalKLh7sRNpGjsRLT59nnE6uoBDRiEULFSVLXoyuBx9vUSy+HH7B4yEHUPyDNsVEEMETX6DG261SWTANb6AuMpggY5WTW5XjceCU00Fl25ZmkzMbOkj+E=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776486524; c=relaxed/simple;\n bh=nvoh1cqi7HcBBSpgPWp2HtBhMLIuXTTJNJ4YNkgu6SI=;\n h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID:\n MIME-Version;\n b=rqhAqHYp6vMNWGoA8mOZDH6TlAgmD6rj3Hqjy1KqxWtAHfW/NB6iZtdizy+cIc+Fv+bP/e1MoRnvqUEAf5NawgmUBF0j7c4J9GHzoPqFJzPxGKgLjoBmYOjRi2KWpzUmUDgIrQYf6p0Iw5El4OgdRWSlPqPFvqsDy3oFp+hCE2k=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n cc:content-transfer-encoding:date:from:message-id:mime-version\n :subject:to; s=qcppdkim1; bh=44kw627UK7hh7YwDm45HrMbnv5XNJmtCJv4\n Qo8uXrww=; b=PpIklQNB5iJdg/Vk/trcaj1NM35KUZ6bv7OrvoZbwlVhQ+B+ihD\n dv93001/uFgRTK2u3WGSjdAgSTAs8qoeB+GZl8dbvQlVldGRF5Tt1QlYfRLfLgwR\n yoTNvSReeeR9ynQHj7Ocr4R2k3OwbO1w0A+lTDs7XgJrClhkNbEP5Ph2trb3MvMw\n +BbnxmWAUNEmBoIbQo+drcHsY0JX7FpiUy5DLQdL1jd627qZgKUlMX7aLzhmmOAn\n u8kEh5F9AA7I3XHMOcxeyZkE9O1f8xiEcJxnLe4M9btH2l7bc/zLcaFZNDdrzcXu\n 7oKA4+D3EwVc5XYBOPUq/B4CVNUacniMAeA==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1776486522; x=1777091322; 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=44kw627UK7hh7YwDm45HrMbnv5XNJmtCJv4Qo8uXrww=;\n b=KR4Rq32F4obL/xtg9NV5Klg/O4eMRrIXukFMU0jfxtp0omvCLdgpPj3LRPjMxYhYXv\n YtlKWPypG6gkd2HDqY75/iIuH9FSEcmG7yHWfURK6HFuVAvXE/SEdRcGhkLo6rxMk6bi\n eRmPY/fbJqTs33hgxPi94aXAp+dvls1qoCauWH/ow5faFAgIc4Nm4zxL6rRmo+GUWbJg\n f90jkBSscSPcG2DBIIbps3QaiCrCPjxKyRkZRQn6iD5TrBFv6BhJlt9LMp6wEV5CEnsp\n +9fl8QllCDN7OMVe18egrJoxoRfja7NxuQMTXUuBX1EfFbMuvXk3pC37AYrO+CibSd5A\n ndwQ=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776486522; x=1777091322;\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=44kw627UK7hh7YwDm45HrMbnv5XNJmtCJv4Qo8uXrww=;\n b=Edl5MdZTHfejJ8zABR3aP0Il+sVEQhpni5lQGtoqO39qac3Ss6fazOb51nfF73nS+Y\n 0nfH5jPjutWtpdmZuqJ7/SBX55slIYOpJkOCebjHJBSWESsGoJfHBQjQOstPqnZWGqjS\n jW57zp/zNlkMAvkZ3rg5SmBNMzAQUnQkraCaO9K7Uz+Pt8tqL3HfyUT8YZ7eoPkR1stT\n oBNdTVBmADtXRJzY8Z7ncWP0XhuObA1Yr3PB3ly99NUm+IuXhOKZrSq+0CmWkkKILoBy\n oyg8u7LNrBVa5hTZnE7IvmKC2a5lzP9em8SWZhKhJtttNGoM4awwOFc+8wywQrps+W8u\n p56A==",
        "X-Gm-Message-State": "AOJu0Ywg3etIJlg9q34OcDLwkCNelMnrCq1FDm0t9VHX2HPJctQc8iJa\n KGj+TKXmV0YAq5giXPPMcr1vDL/lqq3eskqD41Z4lzsJRszMeebt+DXFgOxZHNAW3ErSjhuzQcp\n Losjz3diBexv+PqnhFNH2299durour3x3bTAf/kScnqxNNcBBeEwG7AYJqMa6VkI+j/YY",
        "X-Gm-Gg": "AeBDiesGK+WAD5Zk3otsEfDheL8QJdntmypBRP6hgBfunYJG+mFmiEoep73FWIDv2Nj\n suPCkIGDdKDBKoAGZjT21Oxu2HmVTULjIPmbIkIACwx8ctGi0Z/gyGuzKRUs2K0zRD8O0lziHBx\n qNGwHUjHHeu4+0oCIDPkaLeRavBxWjS2DxOwWZ9GvAInacXqiux9STgA/sXuHReiljY5/65Cx15\n KbriVH4+4g6q+O9lt4xWpMDwIC9wykvqlva04ypzM0XZO2DSg52qljbOO3YBVg24UhK3yt7Gk92\n E46shUO490QyBkftwFvkqdVvyGxyXqEALp+v13qjuRtfOxUkJmaJ+e0iDJSL026muJXSClLxaFs\n F6mPFx+H7PbWjHTfJaNZNVeFrVerQXLwJDM/Tj6xuWEMXK9NgGWVwCOlkqv4=",
        "X-Received": [
            "by 2002:a17:903:46c8:b0:2b4:5f83:a9d6 with SMTP id\n d9443c01a7336-2b5f9fbba9cmr58714185ad.34.1776486522100;\n Fri, 17 Apr 2026 21:28:42 -0700 (PDT)",
            "by 2002:a17:903:46c8:b0:2b4:5f83:a9d6 with SMTP id\n d9443c01a7336-2b5f9fbba9cmr58713835ad.34.1776486521564;\n Fri, 17 Apr 2026 21:28:41 -0700 (PDT)"
        ],
        "From": "Andrew Pinski <andrew.pinski@oss.qualcomm.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "Andrew Pinski <andrew.pinski@oss.qualcomm.com>",
        "Subject": "[GCC17-PATCH] cselim: Remove restriction of join block having 2\n predecessors [PR123113]",
        "Date": "Fri, 17 Apr 2026 21:28:35 -0700",
        "Message-ID": "<20260418042835.3266327-1-andrew.pinski@oss.qualcomm.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDE4MDAzOCBTYWx0ZWRfX8kitaFhtVFDU\n R1EQKqLYrMcoWrRFE0laOtYU+PqiJAvq0M7tjlVzmhpj1nNHV270O7oR5ZLPgDHO/fZCEmSkdm2\n eRN53WSGQ9he08N1F0X3Npi7wO98jV30PuNmJk09bGviFvOyI2nfsrx0oszsBf+YIrqE/LDI237\n MZvUYOAtj0hb7sO1hPMQEQJ25dw5qAIWqzjaPyqgaIbrMVZyS2gwjybMZBKPDr/GERUVJSKgCIO\n IHdFdoqHHvaTH/6UqXOjvWUz9qkaXCMvWxGwfSe7rXqDNmEc9LIVPHU4fJM/M04odHzugAjwGho\n KGk5Z994O5731XLHG6nWHIFkslszNmbGWaG0EXh7ncAYKfbuQLgVlhDGHxkwQth0ey9jgxFp7j+\n bGVMrN8iTViu/kqjxvzRKAjY00DNSmNIxbLLipLepxv7qRpm7SAeRvlrUKG1xyweWVrQxZWpOzA\n DFwLUDyDk5gfXdIZ/1w==",
        "X-Authority-Analysis": "v=2.4 cv=G9Ys1dk5 c=1 sm=1 tr=0 ts=69e3087b cx=c_pps\n a=JL+w9abYAAE89/QcEU+0QA==:117 a=V8mNeic1A8NdUVuT7JxKYQ==:17\n a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8\n a=p-fblCY5SYy9Yv798XwA:9 a=324X-CrmTo6CU4MGRt3R:22",
        "X-Proofpoint-ORIG-GUID": "sloyO3uPi12k9KTImxPBvPlzHqvXafac",
        "X-Proofpoint-GUID": "sloyO3uPi12k9KTImxPBvPlzHqvXafac",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-18_01,2026-04-17_04,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n suspectscore=0 clxscore=1015 adultscore=0 impostorscore=0 lowpriorityscore=0\n phishscore=0 spamscore=0 priorityscore=1501 malwarescore=0 bulkscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604180038",
        "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": "Since adding the new function make_forwarder to tree-ssa-phiopt.cc, we\ncan use this to remove the restriction of the join back having 2\npredecessors for cselim and allow to optimize more cases.\nWe only create the new forwarder block on demand when doing the final\nreplacement so that we don't create basic blocks which would be cleaned up\notherwise.\n\nBootstrapped and tested on x86_64-linux-gnu.\n\n\tPR tree-optimization/89430\n\tPR tree-optimization/123113\n\ngcc/ChangeLog:\n\n\t* tree-ssa-phiopt.cc (edges_split): Move up in the file.\n\t(make_forwarder): Likewise.\n\t(cond_store_replacement): Use make_forwarder if the join\n\tblock has more than 2 predecessors.\n\t(pass_cselim::execute): Remove the checks on the join\n\tblocks having more than 2 predecessors.\n\ngcc/testsuite/ChangeLog:\n\n\t* gcc.dg/tree-ssa/pr89430-1a.c: New test.\n\nSigned-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>\n---\n gcc/testsuite/gcc.dg/tree-ssa/pr89430-1a.c | 16 ++++\n gcc/tree-ssa-phiopt.cc                     | 90 ++++++++++------------\n 2 files changed, 58 insertions(+), 48 deletions(-)\n create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr89430-1a.c",
    "diff": "diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr89430-1a.c b/gcc/testsuite/gcc.dg/tree-ssa/pr89430-1a.c\nnew file mode 100644\nindex 00000000000..09534f628f2\n--- /dev/null\n+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr89430-1a.c\n@@ -0,0 +1,16 @@\n+/* { dg-do compile } */\n+/* { dg-options \"-O2 -ftree-cselim -fdump-tree-cselim-details\" } */\n+/* PR tree-optimization/89430 */\n+/* PR tree-optimization/123113 */\n+\n+unsigned test(unsigned k, unsigned b, int c) {\n+   unsigned a[2] = {1,2};\n+   if (c) {\n+        if (b < a[k]) {\n+                a[k] = b;\n+        }\n+   }\n+   return a[0]+a[1];\n+}\n+\n+/* { dg-final { scan-tree-dump \"Conditional store replacement\" \"cselim\" } } */\ndiff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc\nindex 76527ff922c..ac75e117ad3 100644\n--- a/gcc/tree-ssa-phiopt.cc\n+++ b/gcc/tree-ssa-phiopt.cc\n@@ -2755,6 +2755,43 @@ cond_removal_in_builtin_zero_pattern (basic_block cond_bb,\n   return true;\n }\n \n+/* Callback function for make_forwarder_block,\n+   returns true if the edge src is either of\n+   the 2 basic blocks in the array BBS (DATA). */\n+\n+static bool\n+edges_split (edge e, void *data)\n+{\n+  basic_block *bbs = (basic_block*)data;\n+  return e->src == bbs[0] || e->src == bbs[1];\n+}\n+\n+\n+/* Makes a forwarder block for JOIN_BB such that\n+   THEN_BB and ELSE_BB are the only 2 predecessors\n+   of the block. Note the JOIN_BB is required to be\n+   the same and the PHI nodes of JOIN_BB have to be\n+   the same too.  */\n+\n+static void\n+make_forwarder (basic_block then_bb, basic_block else_bb,\n+\t\tbasic_block join_bb)\n+{\n+  basic_block bbs[2];\n+\n+  /* If the join block already has 2 predecessors, then there\n+     is nothing to be done.  */\n+  if (EDGE_COUNT (join_bb->preds) == 2)\n+    return;\n+  bbs[0] = then_bb;\n+  bbs[1] = else_bb;\n+  edge ne = make_forwarder_block (join_bb, edges_split, bbs);\n+  gcc_assert (join_bb == ne->src);\n+  statistics_counter_event (cfun, \"if-then-else split for inserting common\", 1);\n+}\n+\n+\n+\n /* Auxiliary functions to determine the set of memory accesses which\n    can't trap because they are preceded by accesses to the same memory\n    portion.  We do that for MEM_REFs, so we only need to track\n@@ -3047,7 +3084,10 @@ cond_store_replacement (basic_block middle_bb, basic_block join_bb,\n     }\n \n   /* Now we've checked the constraints, so do the transformation:\n-     1) Remove the single store.  */\n+     0) Create a forwarder block if needed. */\n+  if (EDGE_COUNT (join_bb->preds) > 2)\n+    make_forwarder (single_pred (middle_bb), middle_bb, join_bb);\n+  /* 1) Remove the single store.  */\n   gsi = gsi_for_stmt (assign);\n   unlink_stmt_vdef (assign);\n   gsi_remove (&gsi, true);\n@@ -3115,42 +3155,6 @@ cond_store_replacement (basic_block middle_bb, basic_block join_bb,\n   return true;\n }\n \n-/* Callback function for make_forwarder_block,\n-   returns true if the edge src is either of\n-   the 2 basic blocks in the array BBS (DATA). */\n-\n-static bool\n-edges_split (edge e, void *data)\n-{\n-  basic_block *bbs = (basic_block*)data;\n-  return e->src == bbs[0] || e->src == bbs[1];\n-}\n-\n-\n-/* Makes a forwarder block for JOIN_BB such that\n-   THEN_BB and ELSE_BB are the only 2 predecessors\n-   of the block. Note the JOIN_BB is required to be\n-   the same and the PHI nodes of JOIN_BB have to be\n-   the same too.  */\n-\n-static void\n-make_forwarder (basic_block then_bb, basic_block else_bb,\n-\t\tbasic_block join_bb)\n-{\n-  basic_block bbs[2];\n-\n-  /* If the join block already has 2 predecessors, then there\n-     is nothing to be done.  */\n-  if (EDGE_COUNT (join_bb->preds) == 2)\n-    return;\n-  bbs[0] = then_bb;\n-  bbs[1] = else_bb;\n-  edge ne = make_forwarder_block (join_bb, edges_split, bbs);\n-  gcc_assert (join_bb == ne->src);\n-  statistics_counter_event (cfun, \"if-then-else split for inserting common\", 1);\n-}\n-\n-\n /* Do the main work of conditional store replacement.  */\n \n static bool\n@@ -4278,13 +4282,6 @@ pass_cselim::execute (function *)\n       if (diamond_p)\n \t{\n \t  basic_block bb3 = e1->dest;\n-\n-\t  /* Only handle sinking of store from 2 bbs only,\n-\t     The middle bbs don't need to come from the\n-\t     if always since we are sinking rather than\n-\t     hoisting. */\n-\t  if (EDGE_COUNT (bb3->preds) != 2)\n-\t    return;\n \t  if (cond_if_else_store_replacement (bb1, bb2, bb3))\n \t    cfgchanged = true;\n \t  return;\n@@ -4297,10 +4294,7 @@ pass_cselim::execute (function *)\n \treturn;\n \n       /* bb1 is the middle block, bb2 the join block, bb the split block,\n-\t e1 the fallthrough edge from bb1 to bb2.  We can't do the\n-\t optimization if the join block has more than two predecessors.  */\n-      if (EDGE_COUNT (bb2->preds) > 2)\n-\treturn;\n+\t e1 the fallthrough edge from bb1 to bb2.  */\n       if (cond_store_replacement (bb1, bb2, e1, e2, nontrap))\n \tcfgchanged = true;\n     };\n",
    "prefixes": [
        "GCC17-PATCH"
    ]
}