public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/98442] [X86] suboptimal for memset with CLEAR_BY_PIECES
Date: Thu, 31 Dec 2020 03:56:50 +0000 [thread overview]
Message-ID: <bug-98442-4-PpyNhq3q6k@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98442-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98442
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #2)
> Please take a look at users/hjl/pieces/master branch:
>
> https://gitlab.com/x86-gcc/gcc/-/tree/users/hjl/pieces/master
>
> You may get some ideas.
I got
[hjl@gnu-cfl-1 gcc]$ cat /tmp/x.c
char Tab[64];
void foo(int n)
{
for (int i= 0; i != 64; i++)
Tab[i] = 0;
}
[hjl@gnu-cfl-1 gcc]$ ./xgcc -B./ -march=skylake -S -O2 /tmp/x.c
[hjl@gnu-cfl-1 gcc]$ cat x.s
.file "x.c"
.text
.p2align 4
.globl foo
.type foo, @function
foo:
.LFB0:
.cfi_startproc
vpxor %xmm0, %xmm0, %xmm0
vmovups %ymm0, Tab(%rip)
vmovups %ymm0, Tab+32(%rip)
vzeroupper
ret
.cfi_endproc
.LFE0:
.size foo, .-foo
.comm Tab,64,32
.ident "GCC: (GNU) 10.0.0 20190523 (experimental)"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-cfl-1 gcc]$
This requires middle-end changes.
next prev parent reply other threads:[~2020-12-31 3:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-25 1:38 [Bug target/98442] New: " crazylht at gmail dot com
2020-12-31 3:38 ` [Bug target/98442] " crazylht at gmail dot com
2020-12-31 3:48 ` hjl.tools at gmail dot com
2020-12-31 3:56 ` hjl.tools at gmail dot com [this message]
2021-01-05 10:05 ` rguenth at gcc dot gnu.org
2021-10-06 23:48 ` 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-98442-4-PpyNhq3q6k@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: link
Be 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).