public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/102627] [11/12 Regression] wrong code with "-O1" Date: Wed, 06 Oct 2021 10:42:27 +0000 [thread overview] Message-ID: <bug-102627-4-VMNW7uTGDl@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102627-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102627 --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The assembly difference r11-8007 to r11-8008 is: --- pr102627.s 2021-10-06 06:32:46.000000000 -0400 +++ pr102627.s 2021-10-06 06:33:00.000000000 -0400 @@ -77,10 +77,10 @@ main: movq %rdx, %rcx movq %rax, %rdx movq e(%rip), %rax - movq %rcx, 8(%rsp) + movl %ecx, 12(%rsp) movzbl f(%rip), %ecx salq %cl, %rax - movq 8(%rsp), %rcx + movl 12(%rsp), %ecx movq %rax, %rsi movl $0, %edi call w I believe y returns the 128-bit struct g return value in %rdx:%rax pair, right before the above instructions, and the above change means that instead of spilling the whole 64-bits of %rcx that holds at that point u.j and u.k members (u.k in the upper 32 bits of %rcx) it spills just 32-bits of %ecx and fills it back in, effectively setting u.k to 0. The w call then takes %rdi, %rsi arguments it doesn't use and the TImode in %rcx:%rdx pair, but with the high 32 bits of the TImode value lost. The reason for the spill is clear, the shift instruction needs that register...
next prev parent reply other threads:[~2021-10-06 10:42 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-06 8:37 [Bug tree-optimization/102627] New: " suochenyao at 163 dot com 2021-10-06 10:13 ` [Bug tree-optimization/102627] " rguenth at gcc dot gnu.org 2021-10-06 10:32 ` [Bug rtl-optimization/102627] [11/12 Regression] " jakub at gcc dot gnu.org 2021-10-06 10:42 ` jakub at gcc dot gnu.org [this message] 2021-10-07 19:54 ` vmakarov at gcc dot gnu.org 2021-10-08 16:54 ` cvs-commit at gcc dot gnu.org 2021-10-11 8:32 ` [Bug rtl-optimization/102627] [11 " jakub at gcc dot gnu.org 2021-10-14 16:11 ` cvs-commit at gcc dot gnu.org 2021-10-14 16:15 ` vmakarov at gcc dot gnu.org 2021-10-22 20:11 ` hjl.tools at gmail dot com
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-102627-4-VMNW7uTGDl@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).