public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/113185] New: bad performance on big-endian&64bit port for struct 16 16
@ 2023-12-31  2:08 syq at gcc dot gnu.org
  2023-12-31  2:30 ` [Bug middle-end/113185] " pinskia at gcc dot gnu.org
  2023-12-31  2:31 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: syq at gcc dot gnu.org @ 2023-12-31  2:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113185

            Bug ID: 113185
           Summary: bad performance on big-endian&64bit port for struct 16
                    16
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: syq at gcc dot gnu.org
  Target Milestone: ---

```
struct xx {
        int a:16;
        int b:16;
};

struct xx xx (struct xx a, long long b) {
        a.b = b;
        return a;
}
```

On little-endian&64, only 1 or 2 instructions are used, such as
on AARCH64el:

```
        bfi     w0, w1, 16, 16
        ret
```
On MIPS64el
```
        move    $2,$4
        sll     $5,$5,0
        jr      $31
        ins     $2,$5,16,16
```


While for 64EB
```
        .cfi_startproc
        sub     sp, sp, #16
        .cfi_def_cfa_offset 16
        str     x0, [sp, 8]
        strh    w1, [sp, 10]
        ldr     w0, [sp, 8]
        add     sp, sp, 16
        .cfi_def_cfa_offset 0
        lsl     x0, x0, 32
        ret
        .cfi_endproc
```
```
        daddiu  $sp,$sp,-16
        sd      $4,0($sp)
        sh      $5,2($sp)
        lw      $2,0($sp)
        daddiu  $sp,$sp,16
        jr      $31
        dsll    $2,$2,32
```

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

* [Bug middle-end/113185] bad performance on big-endian&64bit port for struct 16 16
  2023-12-31  2:08 [Bug rtl-optimization/113185] New: bad performance on big-endian&64bit port for struct 16 16 syq at gcc dot gnu.org
@ 2023-12-31  2:30 ` pinskia at gcc dot gnu.org
  2023-12-31  2:31 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-12-31  2:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113185

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The issue is with the argument passing. I thought there was a dup of this bug
somewhere ...

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

* [Bug middle-end/113185] bad performance on big-endian&64bit port for struct 16 16
  2023-12-31  2:08 [Bug rtl-optimization/113185] New: bad performance on big-endian&64bit port for struct 16 16 syq at gcc dot gnu.org
  2023-12-31  2:30 ` [Bug middle-end/113185] " pinskia at gcc dot gnu.org
@ 2023-12-31  2:31 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-12-31  2:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113185

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-12-31
             Status|UNCONFIRMED                 |NEW
           Severity|normal                      |enhancement
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=90864,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=45026,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=30271
     Ever confirmed|0                           |1

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

end of thread, other threads:[~2023-12-31  2:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-31  2:08 [Bug rtl-optimization/113185] New: bad performance on big-endian&64bit port for struct 16 16 syq at gcc dot gnu.org
2023-12-31  2:30 ` [Bug middle-end/113185] " pinskia at gcc dot gnu.org
2023-12-31  2:31 ` pinskia 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).