From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8395D3858C00; Mon, 26 Sep 2022 16:29:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8395D3858C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664209783; bh=Mt66DBLlG3CqTXZHM5Ua5E3+hUEZPFvQUS8s8OiXBq4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=thM0c8fl14iCDM1z0kxZ7mj/T/KPrZXXaIT/sINmfNBzLVXvQfiu+/TUoFGia3CiV PR7dur8dvTCgAquD6LaCXELMAB6ddXXwUNMAvs8NW2D8Ra0qcP3e3yu7tis+gBAXOp ZHLGb92YJV3RmvIIKAhU0cj7MNCOpKizMC2qDLVI= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/78085] extra sign extend if used to store in 32bit and return 64bit and the upper bits are known to be zeroed. Date: Mon, 26 Sep 2022 16:29:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 6.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia 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=3D78085 --- Comment #3 from Andrew Pinski --- >From REE: Trying to eliminate extension: (insn 9 8 15 2 (set (reg:DI 0 ax [orig:88 _3 ] [88]) (sign_extend:DI (reg:SI 0 ax [orig:84 _3 ] [84]))) "a.c":6:9 160 {*extendsidi2_rex64} (nil)) Tentatively merged extension with definition : (insn 7 6 8 2 (parallel [ (set (reg:DI 0 ax) (zero_extend:DI (and:SI (reg:SI 0 ax [86]) (const_int 3 [0x3])))) (clobber (reg:CC 17 flags)) ]) "a.c":5:4 -1 (nil)) deferring rescan insn with uid =3D 7. All merges were successful. Eliminated the extension. deferring deletion of insn with uid =3D 9. Elimination opportunities =3D 1 realized =3D 1=