[{"id":3678977,"web_url":"http://patchwork.ozlabs.org/comment/3678977/","msgid":"<7d9a1ab5-1a1b-444e-ad3e-3bf753e980b1@oss.qualcomm.com>","list_archive_url":null,"date":"2026-04-18T15:09:35","subject":"Re: [PATCH] bitintlower: Padding bit fixes, part 2 [PR123635]","submitter":{"id":92310,"url":"http://patchwork.ozlabs.org/api/people/92310/","name":"Jeffrey Law","email":"jeffrey.law@oss.qualcomm.com"},"content":"On 4/18/2026 1:35 AM, Jakub Jelinek wrote:\n> Hi!\n>\n> So, I've tried the (extremely slow) cfarm95 RISCV box and found that my\n> earlier PR123635 patch actually broke stuff.\nYea, I saw several failures pop for the various riscv things in my \ntester.  Too busy the last few days to chase them down.  I generally \nstart with riscv64-elf and riscv32-elf as those tend to catch most \nissues and are much faster than native testing.  It's only once things \nare clean in those domains that I look at the native builds, which are \nindeed absurdly slow.\n\nGiven I've got a system here that covers things reasonably well, don't \nhesitate to reach out if you've got a patch you want tested. Also note \nthat if you include RISC-V in the subject line it'll also automatically \nget picked up by the RISE build bot.\n\n\n\n\n\n\n> Now, with r16-8678 (i.e. vanilla trunk), the FAILs are\n> FAIL: gcc.dg/torture/bitint-42.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-42.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-62.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-62.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-66.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-68.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-68.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-79.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-80.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-81.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-81.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-83.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-87.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-88.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-89.c   -O2  execution test\n> So, I broke some tests (42, 62, 66, 68, 79, 80, 81) and\n> fixed a few too (82, 86 and at -O0 only 83, 87, 88, 89).\nThat's consistent with my tester, which focuses merely on identifying \nregressions.  It flagged 42, 62, 66, 68, 79,80, 81 on rv64, but just 42, \n66, 79,80 on rv32.\n>\n> In any case, because this patch doesn't regress on riscv64-linux any\n> actual non-padding tests and even these two aren't regressions, I'd\n> like to commit this patch separately and fix stuff incrementally,\n> to unbreak the bit-field stores.\n>\n> Bootstrapped/regtested on x86_64-linux and i686-linux (plus tested on\n> riscv64-linux, see above), ok for trunk?\n>\n> 2026-04-18  Jakub Jelinek  <jakub@redhat.com>\n>\n> \tPR middle-end/123635\n> \t* gimple-lower-bitint.cc (bitint_precision_kind): Assert the current\n> \tassumptions, that bitint_ext_full for abi_limb_prec > limb_prec is\n> \tsupported only when abi_limb_prec is limb_Prec * 2 and it is not\n> \tbig endian in that case.\n> \t(bitint_large_huge::lower_mergeable_stmt): Don't set separate_ext\n> \tfir bitint_ext_full for bit-field stores.  Guard the condition\n> \ton an extra limb of padding bits to be extended rather than including\n> \tearlier extensions in that too.  If already sign extending before\n> \tand type is unsigned, set zero_ms_limb instead and later handle it.\n> \t(bitint_large_huge::lower_shift_stmt): Handle bitint_ext_full.\n>\n> \t* gcc.dg/bitintext.h: Use __riscv macro instead of __riscv__.\n> \t* gcc.dg/torture/bitint-86.c: Remove bogus sync_char_short\n> \teffective target.\n> \t* gcc.dg/torture/bitint-87.c: Likewise.\n> \t* gcc.dg/torture/bitint-88.c: New test.\n> \t* gcc.dg/torture/bitint-89.c: New test.\nI'll spin this and report back.  However, I'll defer to your judgment on \nthe actual changes -- you know that code far better than I do.\n\njeff","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=QOfzVtlX;\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=EC4PVTAy;\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=QOfzVtlX;\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=EC4PVTAy","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 [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 4fyZtY4JVPz1yGt\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 19 Apr 2026 01:10:10 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 0176D4AA51EC\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Apr 2026 15:10:08 +0000 (GMT)","from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com\n [205.220.180.131])\n by sourceware.org (Postfix) with ESMTPS id 54FB74AA54C0\n for <gcc-patches@gcc.gnu.org>; Sat, 18 Apr 2026 15:09:40 +0000 (GMT)","from pps.filterd (m0279870.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63ICNTSQ2379224\n for <gcc-patches@gcc.gnu.org>; Sat, 18 Apr 2026 15:09:39 GMT","from mail-dy1-f198.google.com (mail-dy1-f198.google.com\n [74.125.82.198])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dm21ugynh-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 15:09:39 +0000 (GMT)","by mail-dy1-f198.google.com with SMTP id\n 5a478bee46e88-2d93379001eso5159956eec.1\n for <gcc-patches@gcc.gnu.org>; Sat, 18 Apr 2026 08:09:39 -0700 (PDT)","from [172.31.0.17] ([136.38.201.137])\n by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2e53ac84c38sm6915254eec.13.2026.04.18.08.09.36\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Sat, 18 Apr 2026 08:09:37 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 0176D4AA51EC","OpenDKIM Filter v2.11.0 sourceware.org 54FB74AA54C0"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 54FB74AA54C0","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 54FB74AA54C0","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776524980; cv=none;\n b=OukZ5tmIYW/5cjHFlQbtcu1Iq/JLZIzKTF5ZrTFKwHzGN9R+1ojOzx77WL2F7U9igsoJ6m7WF6PrKsIv1a/NIK1KU4xdQphhF7/uVRnwXtUrCCSSMTP77XOg29vkwGW8wtlPaf2n5jDysBywGGp1OphmAiOpeJ96FEffpQkRkqE=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776524980; c=relaxed/simple;\n bh=H4HYmxLLQscK52WXrRvWota+v8oAbkfXEWW6qPAPXPk=;\n h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version:\n Subject:To:From;\n b=hrhjAm7GOO8JkIWhffBR8RmtY/N/rzA2ia86ik3U5BOXxgQmCoFAra4PQpf6LxnRdFquGffw7vHOlZ9JzhJEgvD2d0e2nA3YCGPYL2qlIY4COORbgRZ3tkWzIqdSHXIkNjVmOVVKXKrnlLNqGXMrRGfRGEPWP7EzGtHVddTVwVQ=","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:content-type:date:from:in-reply-to\n :message-id:mime-version:references:subject:to; s=qcppdkim1; bh=\n +2tJkHDFaO2tzF0N1OyYLdLL3LULACk8fbJcpTRIiXs=; b=QOfzVtlXv7pcZvoz\n i7+i0zEKDYwv7QjfA492vnrM03i7GdY/ep4jXP+tohtAUbYpREvR98ixgI1HTMZP\n RtvpKEvA887imN/IGMdjB3f1faWhWyEjTR9BwxjY1kG4Og173Bbqs1dRAOVK4skg\n vMGLGYNCakQz1FQRzabbYNXnynNdfwcdJ1iYqLlZqIEiRZ3IpTvMzfUjHWR7mrNR\n KNI26sITCVbAtWBlvABO9A5ZiF4mUxTWVqWi/ZYjSFvve6gllGJ/IqABZmB1bTN7\n Z85SpUlGRvPHvm4yxi0OZLU6oQd7W3SbGIrjllWgiZuvwwSAJMYuaHFYVj/CbKWg\n iGbRcg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1776524978; x=1777129778; darn=gcc.gnu.org;\n h=content-transfer-encoding:in-reply-to:from:content-language\n :references:cc:to:subject:user-agent:mime-version:date:message-id\n :from:to:cc:subject:date:message-id:reply-to;\n bh=+2tJkHDFaO2tzF0N1OyYLdLL3LULACk8fbJcpTRIiXs=;\n b=EC4PVTAyn6/YZ3xyfakbGDzJ6CNVv8UdgOJHKq7MLH5VbELqwQ7wSmzWKF2qjw17Ql\n E5zqNN/Rnb9IsZmYDUEDFv51BDDFFyfJE9cav+cqer6r9cTHYWJWtMvWSwfvYNFqfmwB\n dWke5+0GAUzBGW9wYCepr069iJWkOmFjnNvA4REoMuc1q+zlR+pv83/91ENNEq4vF5ds\n h/VLpDMqXwJr7dfQFBfl272rdNfBM8snp3ZrtANqwt0G3O+9ZETBf0NroRgaoynIqI0H\n 4Oe3y3UAy5nHa+gV3B3oQUdfpT1F01hrQBn1/fSXZ5jn5PSA8+15It6C+NypCJSxclv7\n 9t4A=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776524978; x=1777129778;\n h=content-transfer-encoding:in-reply-to:from:content-language\n :references:cc:to:subject:user-agent:mime-version:date:message-id\n :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=+2tJkHDFaO2tzF0N1OyYLdLL3LULACk8fbJcpTRIiXs=;\n b=N4aNKJJee6rfeTm7eidc2pUsyZSxhTGcIwLtomUcmbhUfdO4aSIgu8QLahSfLI9GM3\n A57O+yTuoDXBI1Xq/fMb6lOlxphrohgsnzF+VltVtbziI0VpcHtgJcH04dYh4DCg1noP\n nstvkmz8ZmotEeORYiFqcru8Mz9BAq7ZKNqHXI1P3P9UY7xlugMP58zi0Ro121iqJjq6\n cfE1V6hyVlfKhsLuWA2GNJJe4wZb8478yE0tIW8aeuQHk+oNMC4AwI8Tqpy4o1P4UoVm\n nfLDTJymN9LSCEA34RbTFn7dBN9gHkO3Yg7DSC/rC4AT9/0nK1e/ABXhv+fWiXoWtR/R\n y+xQ==","X-Gm-Message-State":"AOJu0YyKXrcQuFagM0p4wMS7D3Xw+OkiNdW8T1/av6WjeJRgUjyNLcM0\n pPR4WTB4gNMsuoKwlnm7vV2zSyOGbl0Fe/dHGl8+S/uEUFlyjiLM8+VXoilnNeUq0u18e1Cti21\n KAzrPMFCrT7Rssbjme4C4OPZO0wN4DxmtkKnhs5HT/MghWhEQWG3GgjjGhuoO","X-Gm-Gg":"AeBDieveXVe6IPCS5wgtKk55aZY4ZuMb2y43L4KNbSCneVYdlXZXrpfnTNZefhA3BRa\n zJoXljg/T6z80bMvbyERENFuZu9/wq1NC915A8k2OiUtWcGTLdgUHAogFK1DEMicN0UrgT4y/vC\n 5hXyEZzkhjnD/u5x9sNd18Ivz14k8kHQ2U81sGWOpsqYPAUUE15MLC2ZjI4gh1m1ZxJ6a8e005I\n zbi2YI3flAvIdUqla3eufpeAaI5cxlAxxlemYmBZdyaiUa5V7goN410S4nww9rIHysN6CxHKzme\n Lt9LgALEg/5z8m6F5FkCfUWl8mWgRAiKJSOlZKjAvLqahlMUgChA6GI89PYeeZW/fG4dbxYJHqm\n RVGp6OF53jZqreC0dAFovGTz3ec687rEXau4WkDlADqUjlaFIy2mJ7rQknPLN","X-Received":["by 2002:a05:7300:cc14:b0:2c6:1557:9997 with SMTP id\n 5a478bee46e88-2e478839eb6mr3582446eec.14.1776524978170;\n Sat, 18 Apr 2026 08:09:38 -0700 (PDT)","by 2002:a05:7300:cc14:b0:2c6:1557:9997 with SMTP id\n 5a478bee46e88-2e478839eb6mr3582437eec.14.1776524977631;\n Sat, 18 Apr 2026 08:09:37 -0700 (PDT)"],"Message-ID":"<7d9a1ab5-1a1b-444e-ad3e-3bf753e980b1@oss.qualcomm.com>","Date":"Sat, 18 Apr 2026 09:09:35 -0600","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] bitintlower: Padding bit fixes, part 2 [PR123635]","To":"Jakub Jelinek <jakub@redhat.com>, Richard Biener <rguenther@suse.de>,\n Andrew Pinski <andrew.pinski@oss.qualcomm.com>","Cc":"gcc-patches@gcc.gnu.org,\n Andre Simoes Dias Vieira <Andre.SimoesDiasVieira@arm.com>,\n Palmer Dabbelt <palmer@dabbelt.com>, Robin Dapp <rdapp.gcc@gmail.com>","References":"<aeM0MfvpKEvUniYx@tucnak>","Content-Language":"en-US","From":"Jeffrey Law <jeffrey.law@oss.qualcomm.com>","In-Reply-To":"<aeM0MfvpKEvUniYx@tucnak>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDE4MDE1MCBTYWx0ZWRfX1qhpE/L32Vup\n xzIjrhlYsDmFEqw7fq/Gme5oT2OhPLcxrWi8EG2SOGCinDbP+LkNO097EZxAYtNpF88UnHVHudm\n z2qXoFGPjOij5zNc0XkLTcCpO2A++XsrRbC0tcyqzMPBlakfhkaG6HnBdU/PWzsGcVfgdcRYYqm\n ERjWPJPl5VRFWQZOqauimBqeg53/hFIbZVsTZjzudFos8utjMH1fomwUydvaIdGXBvb/Q55JjJ5\n 3KoE5Q6zbZXI0ffAUSSnzCtcRD1kRld1P2psRepfFsgmn+FKJf1Jf7FVIcWAekF7DSYNXv4d6u+\n jtzCfn79BR8cQrYzum5tFHU1cwFSixyuxwzcpPeDqHNo88tbOCc6LUfutYmiw2GXa6XHvc8safU\n C/XjJprUY2rY0dQjia22KQTI7ysfH0NRL+t5l83R2zW1JZUtkKwUzIULRoo6vYEJQPR6xQaO7oH\n VW+UQCwch0OccSLMnSQ==","X-Proofpoint-GUID":"VEiVRb4d6WGsxiBXsMaS7kAMhumxQ_JQ","X-Proofpoint-ORIG-GUID":"VEiVRb4d6WGsxiBXsMaS7kAMhumxQ_JQ","X-Authority-Analysis":"v=2.4 cv=WK1PmHsR c=1 sm=1 tr=0 ts=69e39eb3 cx=c_pps\n a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=asGLMfRmzhnGNxaIYohjRg==:17\n a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22\n a=20KFwNOVAAAA:8 a=ptuS6HYjjopv8Rx4lxkA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10\n a=bBxd6f-gb0O0v-kibOvt:22","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_04,2026-04-17_04,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n lowpriorityscore=0 adultscore=0 spamscore=0 malwarescore=0 bulkscore=0\n suspectscore=0 phishscore=0 clxscore=1015 priorityscore=1501 impostorscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604180150","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"}},{"id":3678984,"web_url":"http://patchwork.ozlabs.org/comment/3678984/","msgid":"<3ab0c1ef-dc8a-4f8d-88cc-b80d6d100d5b@oss.qualcomm.com>","list_archive_url":null,"date":"2026-04-18T16:56:29","subject":"Re: [PATCH] bitintlower: Padding bit fixes, part 2 [PR123635]","submitter":{"id":92310,"url":"http://patchwork.ozlabs.org/api/people/92310/","name":"Jeffrey Law","email":"jeffrey.law@oss.qualcomm.com"},"content":"On 4/18/2026 1:35 AM, Jakub Jelinek wrote:\n> Hi!\n>\n> So, I've tried the (extremely slow) cfarm95 RISCV box and found that my\n> earlier PR123635 patch actually broke stuff.\n> First thing I found is that __riscv__ macro I was using in bitintext.h\n> doesn't exist and fixed that.\n> I wrote two new tests (88/89, one for a problem I'll talk about later and\n> one to cover shifts) and fixed one nit in 86/87.  All the testing\n> has been done on this modified tests and using\n> make -j8 -k check-gcc RUNTESTFLAGS=\"dg.exp='*bitint* pr112673.c builtin-stdc-bit-*.c pr112566-2.c pr112511.c pr116588.c pr116003.c pr113693.c pr113602.c flex-array-counted-by-7.c' dg-torture.exp='*bitint* pr116480-2.c pr114312.c pr114121.c' dfp.exp=*bitint* vect.exp='vect-early-break_99-pr113287.c' tree-ssa.exp=pr113735.c\"\n> On pre-r16-8678 source, the FAILs were\n> FAIL: gcc.dg/torture/bitint-82.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-82.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-83.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-83.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-86.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-86.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-87.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-87.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-88.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-88.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-89.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-89.c   -O2  execution test\n> i.e. all the bitintext.h tests for padding bits (except bitint-84.c),\n> plus gcc.dg/bitint-39.c gcc.dg/torture/bitint-37.c tests timing out\n> (but those timed out due to extremely slow CPU all the time, and are\n> really large and not padding related, so let's ignore that).\n> Now, with r16-8678 (i.e. vanilla trunk), the FAILs are\n> FAIL: gcc.dg/torture/bitint-42.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-42.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-62.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-62.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-66.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-68.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-68.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-79.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-80.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-81.c   -O0  execution test\n> FAIL: gcc.dg/torture/bitint-81.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-83.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-87.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-88.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-89.c   -O2  execution test\n> So, I broke some tests (42, 62, 66, 68, 79, 80, 81) and\n> fixed a few too (82, 86 and at -O0 only 83, 87, 88, 89).\n>\n> I've debugged the regressions I've caused and the problem is on large/huge\n> _BitInt bit-field stores, we can't clear any padding bits in those cases,\n> bit-fields never have paddings (C FE rejects oversized bit-fields and the\n> padding is used for further fields or is merely structure padding rather\n> than padding of the bit-field).\n> The following patch fixes more than that.  There is another problem\n> (bitint-88.c tries to test that), when we merge some operation (e.g.\n> addition) of some narrower large/huge _BitInt with sign extension from\n> it into a wider unsigned _BitInt (e.g. signed _BitInt(513) addition\n> sign extended into unsigned _BitInt(1025)), the earlier solution for\n> the extra padding limb doesn't work properly, we do want to sign\n> extend the bit 512 into bits 513-1024, but the padding bits above\n> that need to be cleared.  For the limb containing bit 1024 we do it\n> right, it is sign extension but outside of loop, so should cast the\n> all zeros or all ones value to unsigned long : 1 and back, but\n> the limb containing bit 1088 needs to be just zeroed.\n> And the patch also adds the bitint_ext_full handling to RSHIFT_EXPR\n> and LSHIFT_EXPR code.\n>\n> With this, the FAILs on riscv64-linux are\n> FAIL: gcc.dg/torture/bitint-87.c   -O2  execution test\n> FAIL: gcc.dg/torture/bitint-89.c   -O2  execution test\n> which means I need to debug further the multiplication/division/modulo/\n> casts from float and there is some remaining problem with the shifts.\n> Plus something not covered yet, the overflow builtins/ubsan (all of +-*).\n>\n> In any case, because this patch doesn't regress on riscv64-linux any\n> actual non-padding tests and even these two aren't regressions, I'd\n> like to commit this patch separately and fix stuff incrementally,\n> to unbreak the bit-field stores.\n>\n> Bootstrapped/regtested on x86_64-linux and i686-linux (plus tested on\n> riscv64-linux, see above), ok for trunk?\n>\n> 2026-04-18  Jakub Jelinek  <jakub@redhat.com>\n>\n> \tPR middle-end/123635\n> \t* gimple-lower-bitint.cc (bitint_precision_kind): Assert the current\n> \tassumptions, that bitint_ext_full for abi_limb_prec > limb_prec is\n> \tsupported only when abi_limb_prec is limb_Prec * 2 and it is not\n> \tbig endian in that case.\n> \t(bitint_large_huge::lower_mergeable_stmt): Don't set separate_ext\n> \tfir bitint_ext_full for bit-field stores.  Guard the condition\n> \ton an extra limb of padding bits to be extended rather than including\n> \tearlier extensions in that too.  If already sign extending before\n> \tand type is unsigned, set zero_ms_limb instead and later handle it.\n> \t(bitint_large_huge::lower_shift_stmt): Handle bitint_ext_full.\n>\n> \t* gcc.dg/bitintext.h: Use __riscv macro instead of __riscv__.\n> \t* gcc.dg/torture/bitint-86.c: Remove bogus sync_char_short\n> \teffective target.\n> \t* gcc.dg/torture/bitint-87.c: Likewise.\n> \t* gcc.dg/torture/bitint-88.c: New test.\n> \t* gcc.dg/torture/bitint-89.c: New test.\nThat fixed the regressions reported against riscv64-elf and \nriscv32-elf.    The -87/-89 new tests fail, but I think you're already \naware of those.\n\nThanks!  One less thing to track down over the weekend.\njeff","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=azbCh0SC;\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=kKXGqRkt;\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=azbCh0SC;\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=kKXGqRkt","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 4fydFs1yGFz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 19 Apr 2026 02:57:03 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 0553A4B920AB\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Apr 2026 16:57:02 +0000 (GMT)","from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com\n [205.220.180.131])\n by sourceware.org (Postfix) with ESMTPS id 963F14BA23DE\n for <gcc-patches@gcc.gnu.org>; Sat, 18 Apr 2026 16:56:33 +0000 (GMT)","from pps.filterd (m0279871.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63I4VGNm033991\n for <gcc-patches@gcc.gnu.org>; Sat, 18 Apr 2026 16:56:33 GMT","from mail-dy1-f199.google.com (mail-dy1-f199.google.com\n [74.125.82.199])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dm1hx179q-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 16:56:32 +0000 (GMT)","by mail-dy1-f199.google.com with SMTP id\n 5a478bee46e88-2c16233ee11so2459333eec.1\n for <gcc-patches@gcc.gnu.org>; Sat, 18 Apr 2026 09:56:32 -0700 (PDT)","from [172.31.0.17] ([136.38.201.137])\n by smtp.gmail.com with ESMTPSA id\n a92af1059eb24-12c74a18a2bsm10387699c88.10.2026.04.18.09.56.30\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Sat, 18 Apr 2026 09:56:30 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 0553A4B920AB","OpenDKIM Filter v2.11.0 sourceware.org 963F14BA23DE"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 963F14BA23DE","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 963F14BA23DE","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776531393; cv=none;\n b=JbVsIR0mmpFGM3yrh7lseaTht+4d6CsnHvkCFJ5/pcCckmVr02VHKuzeCn7ROuxc77GjtIBk2sP+7Llmc7lH1ZR9QWpCl++/u2IEVuSjIod1WmKWNEU+v5G5JGk5hatSCOo+5E0AIB4QU0OMTqIzBxt9ovOxdavDTiXJaqEQOcQ=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776531393; c=relaxed/simple;\n bh=U08A47d/dyrKSCToC1bCXSLxlTjGyLE/FhUWV9J2XJI=;\n h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version:\n Subject:To:From;\n b=eqW+QmOMp+gL7KQq4CVHOOhlJjTb5Ayn9GwRqZUS2+tvDtXn0qnGgNgaVXyZw2sF+UF5l3rsIfLVAm99OGdOr/BPaMhUUoi7tARaCZppwLo3wcsTd/8GlGFvrlS6+ylrRmhQG1T1CSpiOUlSiYN4iQr772/TeNE8EZg+k6EZxqI=","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:content-type:date:from:in-reply-to\n :message-id:mime-version:references:subject:to; s=qcppdkim1; bh=\n jWzgNQrIHVw8nC0xdXMGjpBQe0fKspI5RHJqxI5ChQk=; b=azbCh0SCTCCM+O1d\n B0sbXkRAxW8RQ8wN7twMgSzYd2RpzdDZR5NAVwi1AFBbtljfEq/pvB5uTCPm7Dqy\n 0qk8qd9x9hA4VA9clieDi0LT2Labq2jlOORrE974iGRt0razILBJQI7mil5jVXQ9\n VvpWsq/QYx6zqYB03sVJ5rxgwnMeBbul43S7E4y3JXtAGRQOQNU9rgg4JPp3nYuJ\n Gda8/ezBm6uJedAwgryXx1RvF5tl1jx54ZWa1pAYyoPd8YDXZZaZ7GBsjrHL7+H4\n KRFNrTx2hP+KAFEY98mi7Vj/yrVOJfsImkc+dUySflHYuH/jAlE1p3y1/iAsmODK\n URrRUg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1776531392; x=1777136192; darn=gcc.gnu.org;\n h=content-transfer-encoding:in-reply-to:from:content-language\n :references:cc:to:subject:user-agent:mime-version:date:message-id\n :from:to:cc:subject:date:message-id:reply-to;\n bh=jWzgNQrIHVw8nC0xdXMGjpBQe0fKspI5RHJqxI5ChQk=;\n b=kKXGqRkttnqbOHSAEoQWJY9VGmoIP6g1HWrv5wudcfFK767vVeA8/buWROp95GyZOP\n pd7aB/3N+6oD0ChxdhlHRkpYWhxv/zZorI83hsl19VYZki0uVnIPwXHBluOMTlLbDjmk\n aABRF7hfxx2GKJaAYxzcn1AHSWNKbmSOdIVVuo8sCMB+m5jsUBTY94fd1ILg51x9iD9o\n 4gwfZY07gr1CI4y9hCeFjRLjQP2uBo5uPkrn1mEyKrf4j47sFlVqQmMvDu0uEhYC7P9T\n DoUmos9hU/fq8LACl8D22ZOm9fZb7gb18uTDOiacqjgh9Cv2K69GgHIJwW+PTFZVfXQA\n 6U0w=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776531392; x=1777136192;\n h=content-transfer-encoding:in-reply-to:from:content-language\n :references:cc:to:subject:user-agent:mime-version:date:message-id\n :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=jWzgNQrIHVw8nC0xdXMGjpBQe0fKspI5RHJqxI5ChQk=;\n b=NvTJAbXk1R1KEK2hBgszM4b0aNYvj56894iutmzNr68Lx3LuHxNGHPNVo/APNG++qD\n 0GvO20aUJxtUxhIAnHx6pRCYXe4tOxKoOiHzY72bIlb5sPWY3xinWb5+0zJ9ooagjgsr\n +JxIjSr4O0AHmrUWR3zMfH56zeFgoQvMG6h//pqirbdoz4bHdwXATXOwQd2sC8kKH23e\n aDaMhgWJAEUb2P7qCdddTlVRMaUubWkgmu/+8fNZnfOWlCL6wy/sa/VKTIty7zeepiIY\n LohsFp7uo5SHopxoXa+RGI25RL20cjCAnMWicS+yGndI74jY6xlAru0EIvCS2yOVoIfW\n TWZg==","X-Gm-Message-State":"AOJu0Yy+Df1YkTwjTcbNch8ozjvnEe7+WkUX4vquqQU+wCyqt0ql0bgo\n CuiSYep0mBu69OI2Cj35wBOWAoNpVWfrnaUxkZgOUmLAIpouDCKN4qEJzixE5wioVNcACe6YBZI\n zwRi983crlY0QaKKgfhWVHWOUy4VuCBTo8OHBJG+iieaK1k4P4ka+vCwp1I8k","X-Gm-Gg":"AeBDieulIgE6X7lhSnXAoIPcs+Y1K7WAHYQ4rbnj0hLFN3MD9+dDkvxvV/REPhPaK93\n nRLVIQ3WHBpJ8Rmw2ujjBwOzBhl9cM36BjNUBSr3YJcjRHEr0kG7MgrO+NvpnOe/wnDm5BO4lih\n ThOsyALisCr95hZLtM/AKvtsrZ1ECvYjeUrOuJ0e8mlPMvu2REIUjVhywaPC6hpn4mXTOFPnmD7\n vjPf9r+bisLHY04HScBg57i8nRdEHDqEcJUQVxI2zRlWFHwwedNNB8YofBeE7swof9pEXXsGTjN\n hWXv20Unl34DEnNIbT6YmIeenFloYntI570rqteq7Kuw7wyrOwThD5Cejj/qFlxWIQo1/2y83xG\n PLiyhpj0fVW1aBdOZCS7vda5q7leodiQ1CBgrbrxFIx95+5RlnKlg05WBd6OB","X-Received":["by 2002:a05:7022:6884:b0:11b:9b98:aa4b with SMTP id\n a92af1059eb24-12c73f6443dmr3734637c88.6.1776531391774;\n Sat, 18 Apr 2026 09:56:31 -0700 (PDT)","by 2002:a05:7022:6884:b0:11b:9b98:aa4b with SMTP id\n a92af1059eb24-12c73f6443dmr3734620c88.6.1776531391192;\n Sat, 18 Apr 2026 09:56:31 -0700 (PDT)"],"Message-ID":"<3ab0c1ef-dc8a-4f8d-88cc-b80d6d100d5b@oss.qualcomm.com>","Date":"Sat, 18 Apr 2026 10:56:29 -0600","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] bitintlower: Padding bit fixes, part 2 [PR123635]","To":"Jakub Jelinek <jakub@redhat.com>, Richard Biener <rguenther@suse.de>,\n Andrew Pinski <andrew.pinski@oss.qualcomm.com>","Cc":"gcc-patches@gcc.gnu.org,\n Andre Simoes Dias Vieira <Andre.SimoesDiasVieira@arm.com>,\n Palmer Dabbelt <palmer@dabbelt.com>, Robin Dapp <rdapp.gcc@gmail.com>","References":"<aeM0MfvpKEvUniYx@tucnak>","Content-Language":"en-US","From":"Jeffrey Law <jeffrey.law@oss.qualcomm.com>","In-Reply-To":"<aeM0MfvpKEvUniYx@tucnak>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-Proofpoint-ORIG-GUID":"c5qdLh4ryrQasdq02lny_QqvE625PaFG","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDE4MDE2OSBTYWx0ZWRfX1FxQ7BxmT89w\n OZZKCvQpZWbKrQen1BwgdHWl8Z3Eq8kKHgkmbX1EIzagUSH93LeAGhWSbkBFm5PlnSRIul6HtWf\n B5ELLDPx/vSZSnvl5lVtR0zXPmgWLnKQ0vogZ3xKSTDsZsji/C0yFpW+AaDpxUMiUF1qcBL2D78\n 4bonnBcpA0okeOJzNaH8Ym252YXgIxk6TYQGHrqGJfVcS5tmAToN6yM3ODignzBFGb0cVgk7Vb8\n VIYqAxBWZs/Bv2bvDXL3LR6KE5TRT2KXUuEKriza928YygIa+8FwmEB73N/POxQGrdJI5cYOqsT\n g6rkyof7Ax5vWJNHWli+YJPKE2mFOD6n+k/XJIw7zINVhZPVWn3Ns0tPXd1qyEhpjRg8tpjGpbZ\n P1MkgkniPv4Zm7n3srOy+5zp7VAdF6uhtzotG0aj9devgj0bifzb4NM5xf9V8FkB3HpmLPKVD9A\n 3QDH++59YwoXQS0eAKA==","X-Proofpoint-GUID":"c5qdLh4ryrQasdq02lny_QqvE625PaFG","X-Authority-Analysis":"v=2.4 cv=RoX16imK c=1 sm=1 tr=0 ts=69e3b7c0 cx=c_pps\n a=cFYjgdjTJScbgFmBucgdfQ==:117 a=asGLMfRmzhnGNxaIYohjRg==:17\n a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22\n a=20KFwNOVAAAA:8 a=buvgiG6Zyxjk_QikAtYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10\n a=scEy_gLbYbu1JhEsrz4S:22","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_05,2026-04-17_04,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n impostorscore=0 malwarescore=0 adultscore=0 spamscore=0 phishscore=0\n clxscore=1015 bulkscore=0 lowpriorityscore=0 suspectscore=0\n priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc=\n route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604070000\n definitions=main-2604180169","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"}}]