From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2B0A03858C98; Thu, 4 Apr 2024 18:57:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2B0A03858C98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712257060; bh=w86i21g8g7+QYU9N/Sl33Yv/grREfeo1GfvSxX6SsXs=; h=From:To:Subject:Date:From; b=ri6+aOPVdCoj30nM7u5T2gI1npZr4JInSI4eYPjGUxhAkGVbLDJZUmbpIRZz1G8ZK mB0F+heYM1ADJtcAM6EzvOOmxExf4Ne5aNm8F9N1tTBnJNDm7h5luICopLwpWrWoJf ES1WtWlEQi+mSWi9rGEEls6A2WFtVmdTH8cSlYGE= From: "absoler at smail dot nju.edu.cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/114591] New: rtl-reload introduce an extra load operation since gcc-12 Date: Thu, 04 Apr 2024 18:57:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: absoler at smail dot nju.edu.cn 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D114591 Bug ID: 114591 Summary: rtl-reload introduce an extra load operation since gcc-12 Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: absoler at smail dot nju.edu.cn Target Milestone: --- Hi, I found such a case: ``` unsigned v1; long long v2; short func_1() { v2 =3D v1; return v2; } ``` gcc-12 and gcc-13 would produce under -O2: ``` func_1: mov 0x0(%rip),%eax # v1 mov %rax,0x0(%rip) # v2 movzwl 0x0(%rip),%eax # v1 ``` and gcc-11's: ``` func_1: mov 0x0(%rip),%edx # v1 mov %rdx,0x0(%rip) # v2 mov %rdx,%rax ``` I guess the latter is better? the second load of `v1` was introduced in RTL-reload pass, maybe this pessimize the performance.=