From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6FF263857C4D; Thu, 7 Mar 2024 22:24:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6FF263857C4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709850257; bh=OqmptoV5XftHmBQaOVp6iYna0af69u/AzAYlgP5TXVk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WPz6CvyMZsZYcFUrPzX83Rd4qt3qEWkZvqPDpOHFyHSchK0nF9cwoTL962G1jErOF 3T7ok0i6j3vlDKwmMyATvj+a1NUDpwL5yWvGxQkr17phr9+B6h/5MbpisFDWXr4T/4 eWOJCyOnX0RPUepm9Y3/xFVYgWun07zWgJ/uJqvM= From: "law at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111472] [11/12/13 Regression] Wrong code at -Os on x86_64-linux-gnu since r11-4563-gd0d8b5d836 Date: Thu, 07 Mar 2024 22:24:15 +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: law at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc short_desc 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=3D111472 Jeffrey A. Law changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at gcc dot gnu.org Summary|[11/12/13/14 Regression] |[11/12/13 Regression] Wrong |Wrong code at -Os on |code at -Os on |x86_64-linux-gnu since |x86_64-linux-gnu since |r11-4563-gd0d8b5d836 |r11-4563-gd0d8b5d836 --- Comment #6 from Jeffrey A. Law --- Close. It was the next revision my bisection landed on as the fix: commit 9692309ed6b625f0fb358c0e230404b5603f69a6 (refs/bisect/bad) Author: Richard Biener Date: Fri Oct 20 15:08:49 2023 +0200 tree-optimization/111445 - simple_iv simplification fault The following fixes a missed check in the simple_iv attempt to simplify (signed T)((unsigned T) base + step) where it allows a truncating inner conversion leading to wrong code. PR tree-optimization/111445 * tree-scalar-evolution.cc (simple_iv_with_niters): Add missing check for a sign-conversion. * gcc.dg/torture/pr111445.c: New testcase.=