https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114591
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 = 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.