From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5817E385842B; Tue, 4 Apr 2023 12:12:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5817E385842B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680610371; bh=3w7NYL+SQ0LmnmGetEgQiFO2JBZzXJv+xgxAW6XSzJc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=i2n7a5+jYt358njSnD3ghAkruxgaE+sA/QKMC7PDekftB5AoJnDUZEUs+FnevZgFK +WX79ATWOccGzuptCPjqeFS3fWls4D69vbn/LudCGH5GneQbbkyBqd4E8iXhw1lWKo maaM+2rHiGzkmq+guFaz6Y3y7D5sZYWH6KXNm1wE= From: "manolis.tsamis at vrull dot eu" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109393] Very trivial address calculation does not fold Date: Tue, 04 Apr 2023 12:12:50 +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: manolis.tsamis at vrull dot eu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D109393 --- Comment #2 from manolis.tsamis at vrull dot eu --- (In reply to Andrew Pinski from comment #1) > Note sometimes -fwrapv will optimize things because it can assume that > overflow is defined as wrapping and this is one case that is true. Yes it > sounds counter intuitive but it is true. Even re-association happens more > with -fwrapv :). Yes it is truly counter intuitive :) Yet, leaving this wrapv behaviour aside, isn't this something that should be always optimized regardless of wrap/overflow flags?=