From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 52CE3385801F; Tue, 12 Mar 2024 14:16:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 52CE3385801F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710252998; bh=zvZp6Yx9ZMX9obz9Z2xNofEqwy5uaj+CR9qyT4aquSg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=E4Vn+onh4ihVaStfrFzuL+wbbiQSnjqgvxWkMBBOszZp1gSfOCdZ6dwhKhsBwWdQ/ 2OBZRWQPh1sFXQjubybNiH567bV0nPgN0I6arPijQrpIF2P+YZDXvzvIrJhrZZrb/c bZWR9wlskTloDvEUi9jH6hpPcIZYx+EbvKe4ojXc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2 Date: Tue, 12 Mar 2024 14:16:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114121 --- Comment #17 from GCC Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:73dac51b32575f980289c073969c6d825963d076 commit r14-9440-g73dac51b32575f980289c073969c6d825963d076 Author: Richard Biener Date: Tue Mar 12 14:00:05 2024 +0100 tree-optimization/114121 - chrec_fold_{plus,multiply} and recursion The following addresses endless recursion in the chrec_fold_{plus,multiply} functions when handling sign-conversions. We only need to apply tricks when we'd fail (there's a chrec in the converted operand) and we need to make sure to not turn the other operand into something worse (for the chrec-vs-chrec case). PR tree-optimization/114121 * tree-chrec.cc (chrec_fold_plus_1): Guard recursion with converted operand properly. (chrec_fold_multiply): Likewise. Handle missed recursion. * gcc.dg/torture/pr114312.c: New testcase.=