From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D8E9D3858D39; Sat, 20 Apr 2024 23:37:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8E9D3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713656244; bh=LQNySOlBk6lUPuJdrhl5v0iZpqPWSM/wrmHzNvrfYzg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Bjw5cH5W3/cc5jwJl06Ex3/B4fsFjbR8tCMkjstiUNRSDyu4PmvXAo0m+DYFeMB27 WGY/RbQm3KL9RMg9djJDC9EWjsSFqDkE/cVKpMy0MB1g02JZ/noFmGE1A/4lA4Y3FF T40KmQeddvTpoZyH5mqDx1XJYOxzKbWpfPmmkkso= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114787] [13/14 Regression] wrong code at -O1 on x86_64-linux-gnu (the generated code hangs) Date: Sat, 20 Apr 2024 23:37:24 +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: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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=3D114787 --- Comment #5 from Andrew Pinski --- The first difference (in GCC 13) with/without -fdump-tree-all-all comes from cunroll: Broken: ``` Loop 3 iterates 2 times. Loop 3 iterates at most 1 times. Loop 3 likely iterates at most 1 times. Analyzing # of iterations of loop 3 exit condition [2, + , 4294967295] !=3D 0 bounds on difference of bases: -2 ... -2 result: # of iterations 2, bounded by 2 Removed pointless exit: if (ivtmp_43 !=3D 0) ``` Working: ``` Loop 3 iterates 2 times. Loop 3 iterates at most 2 times. Loop 3 likely iterates at most 2 times. ```=