public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "crazylht at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/82139] unnecessary movapd with _mm_castsi128_pd to use BLENDPD on __m128i results
Date: Mon, 06 Sep 2021 06:09:03 +0000 [thread overview]
Message-ID: <bug-82139-4-PDNidCtci9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-82139-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82139
--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> It is worse on the trunk:
> .L2:
> movdqu (%rdi), %xmm1
> movdqu (%rdi), %xmm0
> addq $16, %rdi
> paddd %xmm3, %xmm1
> paddd %xmm2, %xmm0
> blendpd $2, %xmm0, %xmm1
> movups %xmm1, -16(%rdi)
> cmpq %rdi, %rax
> jne .L2
>
> Why two loads from %rdi here?
> This is done during RA as far as I can tell.
It looks like generic cost model should be updated.
w/ -O2 -msse4 -mno-avx -mtune=skylake looks optimal
movdqu (%rdi), %xmm0
movdqa %xmm3, %xmm1
paddd %xmm0, %xmm1
paddd %xmm2, %xmm0
blendpd $2, %xmm0, %xmm1
movups %xmm1, (%rdi)
addq $16, %rdi
cmpq %rdi, %rax
jne .L2
prev parent reply other threads:[~2021-09-06 6:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-82139-4@http.gcc.gnu.org/bugzilla/>
2021-09-04 3:01 ` pinskia at gcc dot gnu.org
2021-09-06 6:09 ` crazylht at gmail dot com [this message]
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-82139-4-PDNidCtci9@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).