public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "syq at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/113185] New: bad performance on big-endian&64bit port for struct 16 16 Date: Sun, 31 Dec 2023 02:08:10 +0000 [thread overview] Message-ID: <bug-113185-4@http.gcc.gnu.org/bugzilla/> (raw) 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 ```
next reply other threads:[~2023-12-31 2:08 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-31 2:08 syq at gcc dot gnu.org [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-113185-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).