From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6E9BD3858D32; Tue, 9 Apr 2024 18:22:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E9BD3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712686977; bh=9xLIdwcSr6m2/gdTN3kuTu10G0pJKhVQ5G2aLX3+//A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MNqExJAozRQl5kMGKmItzpztfVWE4Azljd2vsMkliBI7Ax4ktmdipdKbOd2iQmZWX b00uLrcPPsLsl2J5rspBBffxKlZZ12M2pVZgySHplsaV6T5UBi8rRTNgS5jHmiS7/p x/FXppTClFWpfrM40r9QraEJmVhIZ0EaZDqLbdx8= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114660] Exponentiating by squaring not performed for x * y * y * y * y Date: Tue, 09 Apr 2024 18:22:57 +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: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: jakub 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: --- 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=3D114660 --- Comment #4 from Jakub Jelinek --- I think we've been discussing an idea of turning on flag_wrapv very late am= ong the GIMPLE passes and reassociate again. Because RTL also kind of assumes flag_wrapv, there is no difference between signed/unsigned addition/subtraction/non-widening multiplication. Though, a question is if it wouldn't screw up range info for use during expansion too much. Other option is to rewrite into unsigned operations on= ly what we've successfully reassociated in the late reassoc pass.=