https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111472
Jeffrey A. Law <law at gcc dot gnu.org> 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 <law at gcc dot gnu.org> --- Close. It was the next revision my bisection landed on as the fix: commit 9692309ed6b625f0fb358c0e230404b5603f69a6 (refs/bisect/bad) Author: Richard Biener <rguent...@suse.de> 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.