get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2235279,
    "url": "http://patchwork.ozlabs.org/api/patches/2235279/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260509010145.3856073-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": "<20260509010145.3856073-1-andrew.pinski@oss.qualcomm.com>",
    "list_archive_url": null,
    "date": "2026-05-09T01:01:45",
    "name": "[PUSHED] match: Fix merged patterns for a!=b implies a and b are not zero [PR125234]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "ff20ca2ab4d241177e0c8c6bbf868f4636afea4b",
    "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/20260509010145.3856073-1-andrew.pinski@oss.qualcomm.com/mbox/",
    "series": [
        {
            "id": 503470,
            "url": "http://patchwork.ozlabs.org/api/series/503470/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=503470",
            "date": "2026-05-09T01:01:45",
            "name": "[PUSHED] match: Fix merged patterns for a!=b implies a and b are not zero [PR125234]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/503470/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2235279/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2235279/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=NA4945sP;\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=Xcsw7oeR;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::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=NA4945sP;\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=Xcsw7oeR",
            "sourceware.org; dmarc=none (p=none dis=none)\n header.from=oss.qualcomm.com",
            "sourceware.org;\n spf=pass smtp.mailfrom=oss.qualcomm.com",
            "sourceware.org;\n arc=none smtp.remote-ip=205.220.168.131"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::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 4gC74x4Rpkz1yK7\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 11:02:38 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [IPv6:::1])\n\tby sourceware.org (Postfix) with ESMTP id 4CA604BA2E05\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  9 May 2026 01:02:35 +0000 (GMT)",
            "from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com\n [205.220.168.131])\n by sourceware.org (Postfix) with ESMTPS id 9B5E24BA543C\n for <gcc-patches@gcc.gnu.org>; Sat,  9 May 2026 01:01:54 +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 648HU2TA2515295\n for <gcc-patches@gcc.gnu.org>; Sat, 9 May 2026 01:01:53 GMT",
            "from mail-pf1-f197.google.com (mail-pf1-f197.google.com\n [209.85.210.197])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1m9ns62b-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <gcc-patches@gcc.gnu.org>; Sat, 09 May 2026 01:01:53 +0000 (GMT)",
            "by mail-pf1-f197.google.com with SMTP id\n d2e1a72fcca58-83544d05c5aso1501453b3a.2\n for <gcc-patches@gcc.gnu.org>; Fri, 08 May 2026 18:01:53 -0700 (PDT)",
            "from xeond2.wrightpinski.org ([98.97.32.100])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-83967dbf67fsm13849657b3a.47.2026.05.08.18.01.50\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 08 May 2026 18:01:51 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 4CA604BA2E05",
            "OpenDKIM Filter v2.11.0 sourceware.org 9B5E24BA543C"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 9B5E24BA543C",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 9B5E24BA543C",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778288514; cv=none;\n b=aX+cpPpzdigcTJrOqtDmVJs7+ZSwPpiI02ZR79uCUoLTci6Ag479+LK4E0AhEOlNMevpkYoctkRpNIxkv6nvP85oyEyjY4KiaNYbSMGo1MNj5WGXVti3E5s83ciGkaID7glni1w05M7mAg8UbiBfXmjEvGKOeHC4ZMW/RU8YwYk=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1778288514; c=relaxed/simple;\n bh=xsnaFDS0P+aafoDM1L3SzPxo7R3EDBeG3ib0U9byRFE=;\n h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID:\n MIME-Version;\n b=Bpr5NJr+jEnXUyBgKm1YWPMI1Z3uHDANsHoC0j4ac2d9f7pA1UVCS3dGgF3PD5iAopkhGf+qkVHIkHuek1iaFxeFdospeZ+bYVrrb5hYyN2XlGyGjgHfdKkYzcOCFZme95NDPgKG4BoMShF9qHRqs3j8UXA6OGeOVDcShcWEtXY=",
        "ARC-Authentication-Results": "i=1; sourceware.org;\n dkim=pass (2048-bit key, unprotected)\n header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=NA4945sP;\n dkim=pass (2048-bit key, unprotected) header.d=oss.qualcomm.com\n header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google\n header.b=Xcsw7oeR",
        "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=t0tfeebDXN2NuXVOb+j92XscOLezthk3vqT\n +gAHo/x8=; b=NA4945sPv56KxeRhXugZTlU0ILgUNhJJDbvux8Nf/++CdhKAUTn\n QGyba657Bz16oAtV/Xez1/bsBQ4k1oj9tnx1dA0yO/dNAw9S5RPOAvot2Fvxdo/F\n 6jrqPh0OSKhXVyteRav24AqVE1OwgncB/Mo3RMeKlOQaWXRfmqLGCrIV671u+BLA\n udVIWUwd2neN9dTvsBMqC0amu5htwEgx6NMvmZTSOksRQq3qLf+JHit4d5qtY2U9\n 7ZgC7bL+iPFwmpCoJ3p7J8kY6Z3e5Xxb/cHrP7IFcQi2jX9vgt84TGa17V2bbDDt\n JNGKKsQFRdP8bpsFQ/4jzUHoz3kPVXEprRg==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1778288512; x=1778893312; 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=t0tfeebDXN2NuXVOb+j92XscOLezthk3vqT+gAHo/x8=;\n b=Xcsw7oeRQiTzJTMFOLpY/ZgcqTg4Ahc9hkr3O0lvyUYuDWV1rPB0kgqzr9S3lJZipB\n mjQ1NG6TwDEyyD9QhM29PD3KWbq6jnma2LsuvPx5pVYOd8M53B9cIaCDuoUF/Hod6C36\n xIJABu+iDcO0ih4hV2WA3lrmnYIN7JLZ/hY6BmTwtuewoPOk0XZzucDUm3icZjmnkbn0\n zCyT7QBUjfGy1Swm8soe+E9da7w/yjh17jD3aIXaVH5iRK7ssw7GyyAdA7Ot2eAD/wjp\n 8woIcuax6GE+qosMoAR8f1PkcGPC1RUrjxi9CcvfNyWnPj4pd0BH2hPaL2twtsQNkOFv\n z75A=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1778288512; x=1778893312;\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=t0tfeebDXN2NuXVOb+j92XscOLezthk3vqT+gAHo/x8=;\n b=PMqDYdOqBehSoYbVzH1dTB0kRZ1hoVRNaWzECVKH3vb/+itEKsOxZkgOxmiftSUefM\n I/E05yEEeivxEZRtYaSgkMrKILzOK7thbm3JrixHkx12S/4I5jlyxXIiCeo1xjHT1TKO\n BYvO58BDu/2cLbpNyKIPED9XeCSUEI6SpeCvaDppTx7fPGfifGKpIM3G+w8vOgTjqC6C\n 26U5/o3MNUydMuNi5SrT/P5EkeARFwEv7c1J+ELXch6aTbBQ83AM9Vx86Om0EcC+FVBG\n YRX7OGv2lpW9awufMsijRiTKj9KRz7xsiLrubXRqnAumP2wcGTWfIgCAHgwzNjVBzeoX\n nzeg==",
        "X-Gm-Message-State": "AOJu0YzSUeNcf9iuAXfjBu7x5Hvf64+jyT5jQwxH2G34sa3JiuXaioG8\n S+hs3EDpTzd8KKbBDwCNAXcMiO+NuTwwdU+Eb5E79h/zYTmc+MK61y6LwQRH8G3Aom3wVHDuZmx\n +bN0u5p3aZZUn0eCyJQGfEB4zWepzzsm/5goodst6PJ8uEx+WUBPaudvAgu79dkI8AudB",
        "X-Gm-Gg": "Acq92OGmmTWd4VC0Jx1HQWqyhqXcDw3o5bsvhMqVBiSnnrOThgPOJbG+M432Er1x0lf\n PY1pBLVPYNkKXadwRhA+6wvuuB19t0Gj7fV4/yyc9klodJakfoYJHW075TF1f0HD8ajaIB9/th0\n zJARbSS6sLWtNjkveCB/Ds8w0RU3dR/KjNRVRoF+LoJF4SDCxAXtHcUwuDIxYKxJ8CxPv2F2q78\n mppNxLSPUkZyh7+HAo/tzwt7HSFDTTDrdWgImyeLBzbUCuA0zKAb2MMNEyOGBKQdJyLKS4lMMhN\n CIHuDOP+AQ3EzjKllvcymKBy0sawYDij9BeT2OWQ2faz6D0j6FJn2dToNVN1CF9bG/O2lgUvVVE\n n8uXW4/Vp8m9Pq21Q1D3Ho7d0+MrF1nThivKn7BmIGza8SHoS",
        "X-Received": [
            "by 2002:a05:6a00:450c:b0:836:3f6a:3e7a with SMTP id\n d2e1a72fcca58-83cf6a3a892mr5460827b3a.26.1778288512349;\n Fri, 08 May 2026 18:01:52 -0700 (PDT)",
            "by 2002:a05:6a00:450c:b0:836:3f6a:3e7a with SMTP id\n d2e1a72fcca58-83cf6a3a892mr5460790b3a.26.1778288511728;\n Fri, 08 May 2026 18:01:51 -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": "[PUSHED] match: Fix merged patterns for a!=b implies a and b are not\n zero [PR125234]",
        "Date": "Fri,  8 May 2026 18:01:45 -0700",
        "Message-ID": "<20260509010145.3856073-1-andrew.pinski@oss.qualcomm.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Authority-Analysis": "v=2.4 cv=DaEnbPtW c=1 sm=1 tr=0 ts=69fe8781 cx=c_pps\n a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=1q0fwHvi0sEtN60BPuMPLQ==:17\n a=qqwZlryegnVS91B2:21 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22\n a=EUspDBNiAAAA:8 a=i9hahLn-yprgLzF4iLUA:9 a=2VI0MkxyNR6bbpdq8BZq:22",
        "X-Proofpoint-GUID": "P7IxathkMPVWmNl1yhtKsXT1V4zzRaM0",
        "X-Proofpoint-ORIG-GUID": "P7IxathkMPVWmNl1yhtKsXT1V4zzRaM0",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNTA5MDAwOCBTYWx0ZWRfXyNXTy+TmMZpt\n XzxpycccVUWyr2uxD8WtKy7G/plc3fXmdk/vr+XzvTxGx7dpKmVhGLaz5RhitwGYJKp6/l+0+B4\n M/39oZTJqW430clIrdYIaXnU5lkY+wbsdHGh563GVCxcCOze8bkS+PPxIa52ak9/jjZ/9UxUzeA\n J1BwRV1cI06DGQHUQE7ahj/1S67PdxXGOirS8qTa123fwO6+dY5Nxg+MEP1Ul4cqwYZCPd5zh6K\n +yp+b++1PWJtm9S8l0Sf5sODyPFkXZ7TIqzyn+LU0fLF5qjzO7kLW95zCMy04olZ7YR7qTbbO9O\n AnYILWrVhjRSVzABvqO7BzBtSNk7pXJuC5b2oETqjigB5o5p2gPUcXfeQzcOwLmBFLMdblod4d7\n PWMmxy9zCTJaN4LNOQxMWLq3YvUBOTXxMd4Lbs2tLSUjkCMBnkYH7vPpWw5V0k5PDFOWks9/d/P\n PbTn54C5DdsLoFEKEnA==",
        "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-05-09_01,2026-05-08_02,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n bulkscore=0 spamscore=0 priorityscore=1501 adultscore=0 malwarescore=0\n suspectscore=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605090008",
        "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": "In r17-231-gc65691bc5a2873, I messed up the resulting constant for\n`(a != b) & ((a | b) == 0)` and `(a == b) | ((a | b) != 0)`. I had\nswapped which one was resulting in true/false. This fixes the issue\nand adds a testcase to make sure it does not regress again.\n\nPushed as obvious after a bootstrap/test on x86_64-linux-gnu.\n\n\tPR tree-optimization/125234\n\ngcc/ChangeLog:\n\n\t* match.pd (`(a !=/== b) &\\| ((a|b) ==/!= 0)`): Fix\n\tresulting constant form.\n\ngcc/testsuite/ChangeLog:\n\n\t* gcc.dg/torture/pr125234-1.c: New test.\n\nSigned-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>\n---\n gcc/match.pd                              |  2 +-\n gcc/testsuite/gcc.dg/torture/pr125234-1.c | 49 +++++++++++++++++++++++\n 2 files changed, 50 insertions(+), 1 deletion(-)\n create mode 100644 gcc/testsuite/gcc.dg/torture/pr125234-1.c",
    "diff": "diff --git a/gcc/match.pd b/gcc/match.pd\nindex 494e26a7d49..198e2e7202e 100644\n--- a/gcc/match.pd\n+++ b/gcc/match.pd\n@@ -7197,7 +7197,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)\n      neeqr (eq      ne)\n  (simplify\n   (bitop (neeql @0 @1) (neeqr (bit_ior @0 @1) integer_zerop))\n-  { constant_boolean_node (bitop==BIT_AND_EXPR, type); }))\n+  { constant_boolean_node (bitop == BIT_IOR_EXPR, type); }))\n #endif\n \n /* These was part of minmax phiopt.  */\ndiff --git a/gcc/testsuite/gcc.dg/torture/pr125234-1.c b/gcc/testsuite/gcc.dg/torture/pr125234-1.c\nnew file mode 100644\nindex 00000000000..70854ea8c72\n--- /dev/null\n+++ b/gcc/testsuite/gcc.dg/torture/pr125234-1.c\n@@ -0,0 +1,49 @@\n+/* PR tree-optimization/125234 */\n+/* { dg-do run } */\n+\n+__attribute__((noinline))\n+int f0(int a, int b)\n+{\n+  return (a != b) & ((a | b) == 0);\n+}\n+\n+__attribute__((noinline))\n+int f1(int a, int b)\n+{\n+  return (a == b) | ((a | b) != 0);\n+}\n+\n+\n+__attribute__((noinline))\n+int f0_(int a, int b)\n+{\n+  if (a != b)\n+    if ((a | b) == 0)\n+      return 1;\n+  return 0;\n+}\n+\n+__attribute__((noinline))\n+int f1_(int a, int b)\n+{\n+  if (a == b)\n+    return 1;\n+  if ((a | b) != 0)\n+    return 1;\n+  return 0;\n+}\n+\n+\n+int\n+main()\n+{\n+  if (f0(0, 0))\n+    __builtin_abort ();\n+  if (!f1(0, 0))\n+    __builtin_abort ();\n+  if (f0_(0, 0))\n+    __builtin_abort ();\n+  if (!f1_(0, 0))\n+    __builtin_abort ();\n+}\n+\n",
    "prefixes": [
        "PUSHED"
    ]
}