From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1CED03858D35; Tue, 31 Jan 2023 20:01:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CED03858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675195314; bh=EDHMxkk9WLQxvaQ43UZBug2dq1Kz2JdXQCnDTNkPB6Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Y5aUTMBA1a+wXKAVJPB6iKxc2j9VQsMf0k5TawDfhe4epzVIZQ8E+z+0fxZX6uzJG 4UuIwYO6x1y1mhtYZNcnlbUKRt+Ixt0D84XMvXiOh3IGarlcgaJmyCk7wobsDtg+Nq Hf3p8y9kOO63NSJNbj221xh76qX4jdm58ZgUefvw= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108354] [13 Regression] Dead Code Elimination Regression at -O2 since r13-89-gb3e98eb3396e16 Date: Tue, 31 Jan 2023 20:01:53 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.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=3D108354 --- Comment #4 from Andrew Pinski --- (In reply to Andrew Pinski from comment #3) > (In reply to Andrew Pinski from comment #2) > > This is a specific case of PR 91213 and the case which will also fix PR > > 96921: > >=20 > > /* 1 - a is a ^ 1 if a had a bool range. */ > > (simplify > > (minus integer_onep@0 SSA_NAME@1) > > (if (INTEGRAL_TYPE_P (type) > > && ssa_name_has_boolean_range (@1)) > > (bit_xor @1 @0))) >=20 > I might be running into an Ada build failure with this patch; I am double > checking this now. It also could be a latent bug ... I added an extra check for TYPE_UNSIGNED and there is still an issue. I suspect there might be a latent bug happening somewhere.=20 apinski@xeond:~/src/upstream-gcc/gcc/objdir/gcc/ada/tools$ ../../xgcc -B../= ../ -c -g -O2 -W -Wall -gnatpg -gnata -I- -I../rts -I. -I/home/apinski/src/upstream-gcc/gcc/gcc/ada /home/apinski/src/upstream-gcc/gcc/gcc/ada/gnatlink.adb -o gnatlink.o -v Reading specs from ../../specs COLLECT_GCC=3D../../xgcc Target: x86_64-pc-linux-gnu Configured with: /home/apinski/src/upstream-gcc/gcc/configure --prefix=3D/home/apinski/upstream-gcc --enable-languages=3Dc,c++,fortran,lto,objc,go,ada Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.1 20230131 (experimental) [master 733988099bc] (GCC) COLLECT_GCC_OPTIONS=3D'-B' '../../' '-c' '-g' '-O2' '-Wextra' '-Wall' '-gna= tpg' '-gnata' '-I' '-' '-I' '../rts' '-I' '.' '-I' '/home/apinski/src/upstream-gcc/gcc/gcc/ada' '-o' 'gnatlink.o' '-v' '-mtune=3Dgeneric' '-march=3Dx86-64' ../../gnat1 -I - -I ../rts -I . -I /home/apinski/src/upstream-gcc/gcc/gcc/= ada -quiet -O2 -Wextra -Wall -dumpbase gnatlink.adb -dumpbase-ext .adb -gnatwa = -g -gnatpg -gnata -mtune=3Dgeneric -march=3Dx86-64 -gnatO gnatlink.o /home/apinski/src/upstream-gcc/gcc/gcc/ada/gnatlink.adb -o /tmp/ccn5ePu7.s raised STORAGE_ERROR : stack overflow or erroneous memory access=