From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 452E33851C08; Tue, 28 Apr 2020 06:27:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 452E33851C08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588055256; bh=KgVGzPnWhW0KG2W6YevQzX5iFsQw70XTmeP6wPzrtlU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CgbK+FNG15yLBFroJMUnb97fXL4iORChFPfirTpqOewgUJNKPOB3z20QPJmmjcY2u ot34HtCUcycwMKwbISVBtOoOER1L2wzOmjnnOgFRCQO1HpU1M99KSVDn/P5k6n+fBU eOVCO2H+Zzn6A6IjbeMRaRK9y3zxGO85f97XX+Io= From: "luoxhu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/83403] Missed register promotion opportunities in loop Date: Tue, 28 Apr 2020 06:27:35 +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: 8.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: luoxhu at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2020 06:27:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D83403 luoxhu at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |luoxhu at gcc dot gnu.org --- Comment #7 from luoxhu at gcc dot gnu.org --- int could pass but unsigned will fail to capture the refs independent, draf= ted a patch to use the range info when checking the CONVERT expression on PLUS/MINUS/MULT for wrapping overflow(unsigned). https://gcc.gnu.org/pipermail/gcc-patches/2020-April/544684.html (gdb) p debug_aff(&off1) { type =3D sizetype offset =3D 8 elements =3D { [0] =3D (long unsigned int) n_93 * 80, [1] =3D &C * 1 } } $571 =3D void (gdb) p debug_aff(&off2) { type =3D sizetype offset =3D 0 elements =3D { [0] =3D (long unsigned int) n_93 * 80, [1] =3D &C * 1 } } Is this a reasonable solution, please?=