Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2194465/?format=api
{ "id": 2194465, "url": "http://patchwork.ozlabs.org/api/patches/2194465/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/82793403-f030-40eb-97ba-6c2e8c866177@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": "<82793403-f030-40eb-97ba-6c2e8c866177@oss.qualcomm.com>", "list_archive_url": null, "date": "2026-02-09T02:36:54", "name": "[committed,PR,target/123911,RISC-V] Fix infinite recursion in riscv_legitimize_move", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "be768c8992f2fd7bd156c89808445eaf1b85b499", "submitter": { "id": 92310, "url": "http://patchwork.ozlabs.org/api/people/92310/?format=api", "name": "Jeffrey Law", "email": "jeffrey.law@oss.qualcomm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/82793403-f030-40eb-97ba-6c2e8c866177@oss.qualcomm.com/mbox/", "series": [ { "id": 491460, "url": "http://patchwork.ozlabs.org/api/series/491460/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=491460", "date": "2026-02-09T02:36:54", "name": "[committed,PR,target/123911,RISC-V] Fix infinite recursion in riscv_legitimize_move", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/491460/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2194465/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2194465/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=WG06if7E;\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=bzykz4S6;\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=WG06if7E;\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=bzykz4S6", "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\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 4f8TPX30HYz1xtr\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 09 Feb 2026 13:37:35 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 617D54B1A2F8\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 9 Feb 2026 02:37:31 +0000 (GMT)", "from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com\n [205.220.168.131])\n by sourceware.org (Postfix) with ESMTPS id 59BFE4B9DB5E\n for <gcc-patches@gcc.gnu.org>; Mon, 9 Feb 2026 02:36:59 +0000 (GMT)", "from pps.filterd (m0279862.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 618JOhUY2034068\n for <gcc-patches@gcc.gnu.org>; Mon, 9 Feb 2026 02:36:58 GMT", "from mail-dl1-f72.google.com (mail-dl1-f72.google.com\n [74.125.82.72])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c5xb53d19-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <gcc-patches@gcc.gnu.org>; Mon, 09 Feb 2026 02:36:58 +0000 (GMT)", "by mail-dl1-f72.google.com with SMTP id\n a92af1059eb24-124627fc58dso6223420c88.1\n for <gcc-patches@gcc.gnu.org>; Sun, 08 Feb 2026 18:36:58 -0800 (PST)", "from [172.31.0.38] ([136.38.201.137])\n by smtp.gmail.com with ESMTPSA id\n a92af1059eb24-1270d8e25f1sm5939436c88.9.2026.02.08.18.36.55\n for <gcc-patches@gcc.gnu.org>\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Sun, 08 Feb 2026 18:36:55 -0800 (PST)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 617D54B1A2F8", "OpenDKIM Filter v2.11.0 sourceware.org 59BFE4B9DB5E" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 59BFE4B9DB5E", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 59BFE4B9DB5E", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770604619; cv=none;\n b=xMy4GFVXNIg/ZsyCFRnmkB6itIXUxtFJelaQTUq6MfZVRpryxypFNRUtqxbK31EtXtfrN0YkLRZF3c6u9mJwRziiOnxh65W/iA5V7hFBlEL9wBxeRaOo7Y51m4A5pDX2olP2jcOzBA5iyRk0a9I9MMjW8ryoSfqbavAXrcFLCug=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770604619; c=relaxed/simple;\n bh=Ti53ctzYNx47gORAwfwmrXaDwc+Q9axh38xC/Uo16nU=;\n h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version:From:\n Subject:To;\n b=NiV9Hr+MC4xclT+MLgwCvN5/DWX9U6++ZVB872BWwnE+rTE7WiRFIn4bbOCWtI9HjL1d8P43LzFFkrYQC5MhnqINq2l9zbtNH51eMs1NKtvSMOy58XSkjrfkGXjPv72sjzUh6rS5PlzP3bfAQx6Be9MKhFsVgEp/y+xvJ3ED1M8=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n content-type:date:from:message-id:mime-version:subject:to; s=\n qcppdkim1; bh=vqB+kZCtg3lEBzvFRYBxJ3/PFChJNJA+bFgrwo55t3Q=; b=WG\n 06if7Eluopi/hZFrbeZp7jYGS1Z/Rtl+ixshJYSBInmWJmmZ8EB728uORX+X3Mhg\n 53kgt+2uZZ63R3VwhNmIKX47oywrUML2HvbQlluXfdCjsPjkgr66mp//MiQgTeck\n djG8pAxV+aGngXlwJH9QENTSqDtV8vyqLHBLm3nNpHmeZmDo2TiYtMpaO2FcnwiG\n 8L02i6lWn2yM94Z+umEH0UHUQXPgPgDaLZKXgnYWIdcSmf8rSIw9JXXPjvZlSsxt\n 99oztlOLpXVb+awOrPHMaDYIV8Bb7LO0SpyNL17i0siNwdyIv/vFCNjY8OzaeU5i\n 2yT/Y9kDy1zPMw0MSZmg==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1770604617; x=1771209417; darn=gcc.gnu.org;\n h=to:subject:from:content-language:user-agent:mime-version:date\n :message-id:from:to:cc:subject:date:message-id:reply-to;\n bh=vqB+kZCtg3lEBzvFRYBxJ3/PFChJNJA+bFgrwo55t3Q=;\n b=bzykz4S6lvmrHLc6q8VZc3nNKbg8r7t0NORI0UqLOgDeiBZA3h+aN1CWkTw1vdnXBw\n WD/7kFZMMFoqpoETqSI/L5INT0yvCxY2Do3MAf5j6SXZXe71hewPwPelwHsdYKcmJH9C\n fDRf0NO+8yJt94Tl7fhITlb1x807yoyUWDCi3DtKFNO2bq81ImlPJhW6geCLyJeVQcko\n 2yiGR4gZ6TSJRZlDHQGl4Spo4FMcY5xQ84NMx8pmcuqVK4faHmN/3WkxYGvR+uNqhdYV\n rUDe0ONx0DA3TnTwX1wk+nXgdpJLhFEMH1A5hbVr+yPR9D06LsRw12rfSLvqBQwkSIkW\n Q9uA==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770604617; x=1771209417;\n h=to:subject:from:content-language:user-agent:mime-version:date\n :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=vqB+kZCtg3lEBzvFRYBxJ3/PFChJNJA+bFgrwo55t3Q=;\n b=SyP1WcBgxXc4pzbDuDe7NYo/pvGoEUx38H8xVre3mpTz5W2nGfSFM0xCliGU9FWVjo\n fv7Ptj64iMewYsqYjA+gcAmNEDvRA1jMAF58JSBB+7FPZQTLJ9NGPKsiSaSDBBMvjKRO\n 0kHS7RzMhvlam7cxKXazvewtXybi01ooYDZLpy5qWHEa8rkdm+uZHK01p3EOlmDG3KwV\n eMxw2BwvKADIJnWCdKhD3HG5c5wTNdkZJzM537qow9l0tDbLOp6E+TbSu6f96hvejX5k\n 9VBCai9e0gG67YUh4IfJ8OoB9vAXE6IhodI/yYTCZlXqHhqbUbKxL2eQTEyoyzuUH9UI\n U3ZQ==", "X-Gm-Message-State": "AOJu0YxY/D5/YTchOxYQk8WGJqFUJiyu6jD7KnFc0WlEZnglz3EyFuUK\n rR0uhRZg+iN78O0NDaknH1laWzHzDWb4NXs3M0QSGepB41FZ9hi7bF8fEXKSPb1BA42yI1MERuv\n ocHFOyyhYsLvyy5hhqU4PV98B8oU2B1MleFvHBeYKNxrwgMrA1YspSCwAMM3h+CEJJuvX2kA=", "X-Gm-Gg": "AZuq6aLtMiM417nhMlj62CwnmG7WzYDb1x/oxonlzyLTcjs/syKphkvQeuO2+cOA6hy\n 5gd6HVwhbI30pl6Nev5emhaogBEJK0iX0GVCKNaCGJ1taYNx6S77DcHz+yWAL8yaUdDxTXmsPh1\n ILhssrtC8s7rgAi6PE3IyYdPQietRTEE5pxVP9M6zawCf57TOe831ou1rs8lIwBeThAd+SASLRB\n Ng+2XvhoKiwxtDbUYqucOcQNdZJkN1hxSvMSTm+uqTHNKQibIuu0qGBvP1BZdqG4KyqdzzWtS9Q\n EIdqpiGYcfKckfbjybjj/uPN9r9fL1d5TsIckh55hZ8LKs0Ro6gdZbNxgwzIrd9YW6i8CA2ouvc\n FjQPAdgsyOLgWOaKHB/puRXW1vTAX+Kyye0OesQ==", "X-Received": [ "by 2002:a05:7022:2398:b0:122:a2:ffcd with SMTP id\n a92af1059eb24-12704049c0emr4143744c88.23.1770604617140;\n Sun, 08 Feb 2026 18:36:57 -0800 (PST)", "by 2002:a05:7022:2398:b0:122:a2:ffcd with SMTP id\n a92af1059eb24-12704049c0emr4143735c88.23.1770604616432;\n Sun, 08 Feb 2026 18:36:56 -0800 (PST)" ], "Content-Type": "multipart/mixed; boundary=\"------------kGXmlZ7KqHLjxhx6D7iznE5j\"", "Message-ID": "<82793403-f030-40eb-97ba-6c2e8c866177@oss.qualcomm.com>", "Date": "Sun, 8 Feb 2026 19:36:54 -0700", "MIME-Version": "1.0", "User-Agent": "Mozilla Thunderbird", "Content-Language": "en-US", "From": "Jeffrey Law <jeffrey.law@oss.qualcomm.com>", "Subject": "[committed][PR target/123911][RISC-V] Fix infinite recursion in\n riscv_legitimize_move", "To": "'GCC Patches' <gcc-patches@gcc.gnu.org>", "X-Authority-Analysis": "v=2.4 cv=QMBlhwLL c=1 sm=1 tr=0 ts=6989484a cx=c_pps\n a=bS7HVuBVfinNPG3f6cIo3Q==:117 a=asGLMfRmzhnGNxaIYohjRg==:17\n a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=r77TgQKjGQsHNAKrUKIA:9\n a=qQZx4RP6w3eXCZg_LRcA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10\n a=a1v9srxRo6eTGqadT-gA:9 a=B2y7HmGcmWMA:10 a=vBUdepa8ALXHeOFLBtFW:22", "X-Proofpoint-GUID": "DVIUUHNCId95by3ZoTcqXMLfHdEMSpzQ", "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwMjA5MDAyMSBTYWx0ZWRfX2A9otZB6xdbT\n z04SRzRbkvwokm42fNJlOd6ViPFhvwckXmqNLBOmqvWILo8RJQ4uP3gLaK8OhtcPlzaAgCP5G+/\n 0ivPCrzc1JomFnCNyLhlrfnphNF66Mf/rb3Lma5m1KRy7gapJhfvZ3rIhOOA60SfviLp5gVAPVw\n gojuoANxBh5NuU6r0Uw2LZjGDw2xLjJaamyeQWxQwA+hSv2JCPD2xxL63cW30tVwaUEKTaIHnNs\n HB/2rQwvqfANCTILe2Zx/Vs1A9bLyCpVDZvTPX28OxVP8P8InP88UFQ1y8/dXU9svNSRWS/B2Dk\n uaMOEWHSMdKmxlaOH4nESNSU2JuW18sbRhRvD3Vs8YSsDvDmRAt7W+fo616CyEgW91d5ZiO09XG\n JZaZZK86S5BKTljZKlyCqQbAia8WoHmFPxx21Xi0BDh1LyMxS0ixrayyI6rlWUM9BY2o30IGL0U\n lQVK/kFuh2C9QSXhP1A==", "X-Proofpoint-ORIG-GUID": "DVIUUHNCId95by3ZoTcqXMLfHdEMSpzQ", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-02-08_05,2026-02-05_03,2025-10-01_01", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n clxscore=1015 malwarescore=0 suspectscore=0 spamscore=0 adultscore=0\n priorityscore=1501 impostorscore=0 bulkscore=0 lowpriorityscore=0\n phishscore=0 classifier=typeunknown authscore=0 authtc= authcc=\n route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000\n definitions=main-2602090021", "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": "I kept hoping I'd see a better solution, perhaps one where chunks of \nthis routine just go away, but that hasn't materialized. So...\n\nThis patch avoids infinite recursion through riscv_legitimize_move. \nEssentially we end up calling it recursively with arguments that are a \nnop-move and those particular arguments trigger infinite recursion.\n\nSo this patch just recognizes and elides the nop move. Bootstrapped on \nriscv64-linux-gnu and regression tested on riscv{32,64}-elf with no \nregressions. Pushing to the trunk.\n\njeff\ncommit 45f9d4970c13314499aa53ba843873d095105d0f\nAuthor: Jeff Law <jeffrey.law@oss.qualcomm.com>\nDate: Sun Feb 8 08:23:07 2026 -0700\n\n Patch for testing", "diff": "diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc\nindex 25749af14366..3baf0a936b58 100644\n--- a/gcc/config/riscv/riscv.cc\n+++ b/gcc/config/riscv/riscv.cc\n@@ -3912,9 +3912,16 @@ riscv_legitimize_move (machine_mode mode, rtx dest, rtx src)\n \t\t}\n \t }\n \n+\t /* If we are extracting a single element out of a vector and do\n+\t not need an intermediate register, then the extraction will\n+\t occur directly into RESULT. RESULT is the same as DEST and\n+\t INT_REG. So we end up with a nop move. That is not a major\n+\t problem, except in this case it'll send us right back into\n+\t this code and we recurse. Given we put the value in RESULT\n+\t already we can just elide the nop move here and be done. */\n \t if (need_int_reg_p)\n \t emit_move_insn (dest, gen_lowpart (GET_MODE (dest), int_reg));\n-\t else\n+\t else if (!rtx_equal_p (dest, int_reg)) \n \t emit_move_insn (dest, int_reg);\n \t return true;\n \t}\ndiff --git a/gcc/testsuite/gcc.target/riscv/pr123911.c b/gcc/testsuite/gcc.target/riscv/pr123911.c\nnew file mode 100644\nindex 000000000000..30abe7ac76dd\n--- /dev/null\n+++ b/gcc/testsuite/gcc.target/riscv/pr123911.c\n@@ -0,0 +1,15 @@\n+/* { dg-do compile */\n+/* { dg-options \"-march=rv64gv -mabi=lp64d\" { target { rv64 } } } */\n+/* { dg-options \"-march=rv32gv -mabi=ilp32\" { target { rv32 } } } */\n+\n+typedef __attribute__((__vector_size__(8))) char W;\n+typedef __attribute__((__vector_size__(64))) short V;\n+\n+V\n+foo(V v, W w)\n+{\n+ __builtin_memmove(30 + (char *)&v, &w, 1);\n+ __builtin_memmove(&v, &w, 8);\n+ return v;\n+}\n+\n", "prefixes": [ "committed", "PR", "target/123911", "RISC-V" ] }