From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 04683385782B; Sun, 1 Oct 2023 19:29:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04683385782B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696188543; bh=22gcstzHwNgSMY1yy22iDbvvM1qSZ5UdZeE3zecIZRk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BfwyP3Aci3BBe2LKd7N58PmBnCKSjRU4DIOD3Ig0MrUcRpHFS42eQhtCCwFkZRfGv HARfkiA3/EYKE+6RdfGFDZn3fegjrASKlrDZSOr8QOYwNUDu4xYgTKmDUh5uk1BktN iaENxPxWj5FD4tqkJD/Am4o4dYlu1LJWaMBWAKto= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110386] [11/12/13 Regression] ICE with ABSU in backprop Date: Sun, 01 Oct 2023 19:28:58 +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: ice-checking, ice-on-valid-code, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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=3D110386 --- Comment #10 from CVS Commits --- The releases/gcc-13 branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:b5fa95a3569f6ee66697876a3a380fef1b333f3d commit r13-7927-gb5fa95a3569f6ee66697876a3a380fef1b333f3d Author: Andrew Pinski Date: Sat Sep 23 21:53:09 2023 -0700 Fix PR 110386: backprop vs ABSU_EXPR The issue here is that when backprop tries to go and strip sign ops, it skips over ABSU_EXPR but ABSU_EXPR not only does an ABS, it also changes the type to unsigned. Since strip_sign_op_1 is only supposed to strip off sign changing operands and not ones that change types, removing ABSU_EXPR here is correct. We don't handle nop conversions so this does cause any missed optimizations either. Committed to the GCC 13 branch after bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/110386 gcc/ChangeLog: * gimple-ssa-backprop.cc (strip_sign_op_1): Remove ABSU_EXPR. gcc/testsuite/ChangeLog: * gcc.c-torture/compile/pr110386-1.c: New test. * gcc.c-torture/compile/pr110386-2.c: New test. (cherry picked from commit 2bbac12ea7bd8a3eef5382e1b13f6019df4ec03f)=