public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/114591] New: rtl-reload introduce an extra load operation since gcc-12
@ 2024-04-04 18:57 absoler at smail dot nju.edu.cn
  2024-04-04 19:03 ` [Bug target/114591] " pinskia at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: absoler at smail dot nju.edu.cn @ 2024-04-04 18:57 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-04-11  7:37 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-04 18:57 [Bug rtl-optimization/114591] New: rtl-reload introduce an extra load operation since gcc-12 absoler at smail dot nju.edu.cn
2024-04-04 19:03 ` [Bug target/114591] " pinskia at gcc dot gnu.org
2024-04-04 19:07 ` [Bug target/114591] [12/13/14 Regression] " pinskia at gcc dot gnu.org
2024-04-05  2:32 ` [Bug target/114591] [12/13/14 Regression] register allocators " law at gcc dot gnu.org
2024-04-08 15:02 ` jakub at gcc dot gnu.org
2024-04-10  7:51 ` ubizjak at gmail dot com
2024-04-10  8:17 ` liuhongt at gcc dot gnu.org
2024-04-10  8:30 ` liuhongt at gcc dot gnu.org
2024-04-10  8:36 ` ubizjak at gmail dot com
2024-04-10  8:40 ` ubizjak at gmail dot com
2024-04-10  8:47 ` ubizjak at gmail dot com
2024-04-10  8:52 ` liuhongt at gcc dot gnu.org
2024-04-10  9:07 ` ubizjak at gmail dot com
2024-04-10  9:12 ` liuhongt at gcc dot gnu.org
2024-04-11  6:33 ` liuhongt at gcc dot gnu.org
2024-04-11  6:54 ` ubizjak at gmail dot com
2024-04-11  7:08 ` pinskia at gcc dot gnu.org
2024-04-11  7:28 ` liuhongt at gcc dot gnu.org
2024-04-11  7:37 ` liuhongt at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).