Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2229189/?format=api
{ "id": 2229189, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229189/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260427211020.1450021-1-andrew.pinski@oss.qualcomm.com/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/1.1/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 }, "msgid": "<20260427211020.1450021-1-andrew.pinski@oss.qualcomm.com>", "date": "2026-04-27T21:10:20", "name": "ivopts: Fix up doloop support for enum and bitint types [PR125036]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "ed16f1c1bc5f998bb430ac3ef55e29092f8c236a", "submitter": { "id": 91428, "url": "http://patchwork.ozlabs.org/api/1.1/people/91428/?format=api", "name": "Andrew Pinski", "email": "andrew.pinski@oss.qualcomm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260427211020.1450021-1-andrew.pinski@oss.qualcomm.com/mbox/", "series": [ { "id": 501727, "url": "http://patchwork.ozlabs.org/api/1.1/series/501727/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501727", "date": "2026-04-27T21:10:20", "name": "ivopts: Fix up doloop support for enum and bitint types [PR125036]", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501727/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2229189/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2229189/checks/", "tags": {}, "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=O5T0lhu9;\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=MkqVM+5S;\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=O5T0lhu9;\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=MkqVM+5S", "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.180.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 4g4GSg58tvz1xrS\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 07:10:59 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id B98844BA9030\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 21:10:57 +0000 (GMT)", "from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com\n [205.220.180.131])\n by sourceware.org (Postfix) with ESMTPS id 1C9674B9DB57\n for <gcc-patches@gcc.gnu.org>; Mon, 27 Apr 2026 21:10:30 +0000 (GMT)", "from pps.filterd (m0279868.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63RJ5RPl429177\n for <gcc-patches@gcc.gnu.org>; Mon, 27 Apr 2026 21:10:29 GMT", "from mail-pj1-f69.google.com (mail-pj1-f69.google.com\n [209.85.216.69])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dt7x31y7w-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <gcc-patches@gcc.gnu.org>; Mon, 27 Apr 2026 21:10:29 +0000 (GMT)", "by mail-pj1-f69.google.com with SMTP id\n 98e67ed59e1d1-3594620fe97so23653572a91.1\n for <gcc-patches@gcc.gnu.org>; Mon, 27 Apr 2026 14:10:29 -0700 (PDT)", "from xeond2.wrightpinski.org ([98.97.39.232])\n by smtp.gmail.com with ESMTPSA id\n 41be03b00d2f7-c7fc2ff23acsm181360a12.15.2026.04.27.14.10.26\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 27 Apr 2026 14:10:26 -0700 (PDT)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org B98844BA9030", "OpenDKIM Filter v2.11.0 sourceware.org 1C9674B9DB57" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 1C9674B9DB57", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 1C9674B9DB57", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777324230; cv=none;\n b=pQv1CSdwdEPRfvaoM0kWZu/fXMcxxdRmBHN/U8Q/0QNwL1YhjsT0xZaaFoIS541jUUgXmryk5B9S4BU3r0OrPr8xr2047CKI870mQqV11AGKDLMWC/21OTGZCBPgM2DZSszZDMmET1qQ9d+28p5kJwI83CQwPLAuy9cWQp/rx7w=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777324230; c=relaxed/simple;\n bh=TsSv6CRsBsU8kqv3dfTXlxfc+t+IV9CyxC4jGiVnowA=;\n h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID:\n MIME-Version;\n b=Knk91/YMn2TZjf78TEjMLNck7xZ7OXqxQjobBNnRoXmgZLdDI/BmLlNmsO9rkHBDkLYWYNAZ8hxiLTBwO4ClrxVnJzP76fapp2pjRLgnBHYFi+LCCHKoCTI/92TLr2cGkDd6CzgoA5uF/xdxLBWCGYcwIveFyzsy0LjKAoCzH8w=", "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=AF7LveyKjbDw+ApVnaMr4W0+sv+Hf27DrG8\n 5AlElh8k=; b=O5T0lhu9TJAx2ckGyy5DAWN4ZfiMmH+Q8HHA3ZhM32rwxUzDwOt\n XsRUr1uHRzgI4TWTwAoH/xL5YNTZYIgytlS77tQ1WvettLweM9Km27ieCRHoH3gi\n MGD+gvCjNVAPYyq8P+JWDMxXaT80oh3EDGsLP6q0HOxoisX9ctS+WEOKFtD8hDJL\n oQvqqlDrp3tQkIOBoajrCdFIM+P/OzNRfAwgURcloR4V+y2tL8CORMtK0y7nDoSr\n dVqfGJStlL2yaym2YMDpvOj14tpjX/Qkb3rdYre95KsWX2h/f9LWdoBsi2TMQlsu\n KtIgxLntvWcb/pZ/1y+Hw1qZUGEeGASsMow==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1777324228; x=1777929028; 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=AF7LveyKjbDw+ApVnaMr4W0+sv+Hf27DrG85AlElh8k=;\n b=MkqVM+5SSlU6mhKFf8q3J5GqBhBUt5MtPfmerZKBYEZtWvGXrTOX3IApdc1ONJ+dT5\n LhykIhG9nfrau1HxvKzdfvLEJHZBp9H9nHOQxSXw9Cg7mgP9pVkIp/aE8xHqOavMjQaF\n Tu1wmQxH/iQAG1u5L7O5cYZ/e2Ve2ISF0I5jNyfSSnIgtGN8ShOyPeR4Y6wWyKI2UG9r\n G65ouaIkSyRJX+wxyAVrzuv8VMAsJQmE75dmqYIimoXM1Xk3dSpGllp+dZCVe+SI8Se8\n o1m4yZoG8Sxth4qfn6FP/Zuc3DPzQVPdbmFIZBeLGgtPD87DvCwJK99fstnejXNFgdZg\n 6AmQ==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777324228; x=1777929028;\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=AF7LveyKjbDw+ApVnaMr4W0+sv+Hf27DrG85AlElh8k=;\n b=b+jOvDF+ebZSpW+qr/0+mduG5LPQcVllI4GdAq8iRatMYOfdzH3VWK6WiXaiuXriBQ\n QxZaX7IBXukfIN0nqFKITky+98QWx7am1G519yUEeWkCUD6RM8qKsYpajQfKbCNfJ+Wm\n 4HGpiWSC99QfQJ5KMSyGQTmNY5MRE6sUTbh41EITVnHWyjFAt8bulx/0zkkS4OhoaAZM\n eSRJkiiwT4dWFVeD7jk59ygC/EepB+oIOG4ydRkusFVzDS0YiIPPqiT93HJgrxmHvKou\n A2K0yKjp9wtEnvUCxmbxQIF3IusVTWfinnNVKOYUpwFco7+FAFs7jP9HhecfJeDHCB0T\n lMXw==", "X-Gm-Message-State": "AOJu0YyjFuKkDupBFzrZV8bNnnkVcbjepgUgDGQuFQjbTey2qxdaC9I6\n XUKvxzuA9YSr8TvVLo4Ml93jvYVTER0cYiTvH/Dl3NwUZg9f6drKPK+2testvDn4z9wPAtNcLGZ\n GrMi5uUqL4p6vwNLDG+ydPs95mFezqxwmOCckH/211471jVhqfxdKkZbLQwO2mBccBocj", "X-Gm-Gg": "AeBDiev9+jqjJWwUyL7/VGELuxnerLKDVsgn9USTbUHJK47+znpPPAMEKLNghXQE7QK\n h/B5vsc2y7Fa9ROtfEp06UcstGOjlkOaOMvrvK/JVO8VwkN1mc9otZ9DO/qlH4dg9PTgCbN7dmK\n WqX7F3GAFSjyDOLnRfyXa8/ViXi8a/CmXfkbnY0kj2QU7CHNkd1GJhOXAP9DHxmWaFwWZq6Gnyo\n ltuXHXHJSe2nVpojWnGeIWFKdMBRNLGwJjv6k9YaR/ybigwVFWZ0xdYUltJqBWDZ8PFeIZcveSX\n y563Hwl6/myTmpjzfmwwYY4rrjWgPchOCzUuQHYYcvnhuChwh5ygWS91aGORJRW9vH37m3kpgM5\n lnZ+18QPWdcwHhyHFD5U97gDsgN6uhSHlHtd1twsIviKLrnOs7luJJzJVsmI=", "X-Received": [ "by 2002:a05:6a20:7fa6:b0:398:7a23:2779 with SMTP id\n adf61e73a8af0-3a39c41e21cmr315782637.52.1777324227677;\n Mon, 27 Apr 2026 14:10:27 -0700 (PDT)", "by 2002:a05:6a20:7fa6:b0:398:7a23:2779 with SMTP id\n adf61e73a8af0-3a39c41e21cmr315758637.52.1777324227208;\n Mon, 27 Apr 2026 14:10:27 -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": "[PATCH] ivopts: Fix up doloop support for enum and bitint types\n [PR125036]", "Date": "Mon, 27 Apr 2026 14:10:20 -0700", "Message-ID": "<20260427211020.1450021-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": "AW1haW4tMjYwNDI3MDIyNCBTYWx0ZWRfX5XNa9pEQwvnU\n geIGeWI0cNq5TiMmCsjT15v/9iRi8BGP7Tw0xEfjM8xpDsdyVF2OIIv7VWzorNmUwHI8ckAeCNe\n TCN/WGklgPMI0BG8vOj+xySPuaBrHX0BNa/SSNLa+0H9kmF/a7hH1D0GUcTxD/850EDxcBk8zfU\n zcRMSa+znnNU6G3k8tlE9IPLDopHgwqt1MkTXBji6x6UPNZeWUsaaBWODi+NCVg/LHZRtrIU3AR\n c8D3kHUTWleTrQvBBubOp0SqBTyTmFT7Wjv4ydsAa3nqbbE8MJZnjCNtmrE3EQXJtc2OTsQ8Gu/\n /86hY8IWSf8yv9zmGkhpNxN5311Ogk3cxjqmDhkHZ1U7WalSD+5akWmngoqghCsuiDOWQCVvsH4\n VlZFnWSqjg5jvpm/UWm65OsHtMOcHjFDFuZYyeRovOpBboI0g5t+eUITZpXouVbl5whIq4Nn2qP\n 3jZlKI+A2mygOgiBsOQ==", "X-Proofpoint-ORIG-GUID": "9MVBSi6z5V1vLmxrHONsFmd8uN-vgwa8", "X-Authority-Analysis": "v=2.4 cv=AJEsYPsu c=1 sm=1 tr=0 ts=69efd0c5 cx=c_pps\n a=vVfyC5vLCtgYJKYeQD43oA==:117 a=f5cvaX97Ia4lQZzhc/wXyQ==:17\n a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8\n a=HbgY-9wCeSIJeqIeAzAA:9 a=rl5im9kqc5Lf4LNbBjHf:22", "X-Proofpoint-GUID": "9MVBSi6z5V1vLmxrHONsFmd8uN-vgwa8", "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-27_04,2026-04-21_02,2025-10-01_01", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n phishscore=0 impostorscore=0 priorityscore=1501 suspectscore=0 bulkscore=0\n malwarescore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604270224", "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": "After r17-89-g78280307c78ead, ninter handles enum types so ivcannon\nwill also use enum types and now ninter returns an enum type here.\nAlso add_iv_candidate_for_doloop was expecting only integer types.\nThis fixes the issue by allowing non integer types for what ninter\nreturns and converts it into an integer type which is a full mode\ninteger type.\n\nBootstrapped and tested on powerpc64le-linux-gnu.\n\n\tPR tree-optimization/125036\n\ngcc/ChangeLog:\n\n\t* tree-ssa-loop-ivopts.cc (add_iv_candidate_for_doloop): Don't\n\tassert on niniter being integer type. Convert to a full mode\n\tinteger type if non integer or non-full mode integer type.\n\ngcc/testsuite/ChangeLog:\n\n\t* gcc.dg/torture/pr125036-1.c: New test.\n\nSigned-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>\n---\n gcc/testsuite/gcc.dg/torture/pr125036-1.c | 11 +++++++++++\n gcc/tree-ssa-loop-ivopts.cc | 11 ++++++++++-\n 2 files changed, 21 insertions(+), 1 deletion(-)\n create mode 100644 gcc/testsuite/gcc.dg/torture/pr125036-1.c", "diff": "diff --git a/gcc/testsuite/gcc.dg/torture/pr125036-1.c b/gcc/testsuite/gcc.dg/torture/pr125036-1.c\nnew file mode 100644\nindex 00000000000..7bd2b1c7d5c\n--- /dev/null\n+++ b/gcc/testsuite/gcc.dg/torture/pr125036-1.c\n@@ -0,0 +1,11 @@\n+/* PR tree-optimization/125036 */\n+/* { dg-do compile } */\n+\n+enum a { b, c, d, e, f };\n+int g;\n+void h(int *);\n+void j() {\n+ enum a i = b;\n+ for (; i < f; ++i)\n+ h(&g);\n+}\ndiff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc\nindex dfec607fd2e..776487d0f8b 100644\n--- a/gcc/tree-ssa-loop-ivopts.cc\n+++ b/gcc/tree-ssa-loop-ivopts.cc\n@@ -5783,7 +5783,7 @@ add_iv_candidate_for_doloop (struct ivopts_data *data)\n \n tree niter = niter_desc->niter;\n tree ntype = TREE_TYPE (niter);\n- gcc_assert (TREE_CODE (ntype) == INTEGER_TYPE);\n+ gcc_assert (INTEGRAL_NB_TYPE_P (ntype));\n \n tree may_be_zero = niter_desc->may_be_zero;\n if (may_be_zero && integer_zerop (may_be_zero))\n@@ -5815,6 +5815,15 @@ add_iv_candidate_for_doloop (struct ivopts_data *data)\n base = fold_build2 (PLUS_EXPR, ntype, unshare_expr (niter),\n \t\t\tbuild_int_cst (ntype, 1));\n \n+ /* For non integer types or non-mode precision types,\n+ convert directly to an integer type. */\n+ if (TREE_CODE (ntype) != INTEGER_TYPE\n+ || !type_has_mode_precision_p (ntype))\n+ {\n+ ntype = lang_hooks.types.type_for_mode (TYPE_MODE (ntype),\n+\t\t\t\t\t TYPE_UNSIGNED (ntype));\n+ base = fold_convert (ntype, base);\n+ }\n \n add_candidate (data, base, build_int_cst (ntype, -1), true, NULL, NULL, true);\n }\n", "prefixes": [] }