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/94908] Failure to optimally optimize certain shuffle patterns
Date: Thu, 09 Mar 2023 04:22:58 +0000 [thread overview]
Message-ID: <bug-94908-4-jWPYf5lImU@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94908-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94908
--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Uroš Bizjak from comment #7)
> Created attachment 54607 [details]
> Proposed patch
>
> Patch in testing.
>
> Attached patch produces (-O2 -msse4.1):
>
> f:
> subq $24, %rsp
> xorl %eax, %eax
> vmovaps %xmm0, (%rsp)
> call g
> vmovaps (%rsp), %xmm1
> addq $24, %rsp
> vinsertps $64, %xmm0, %xmm1, %xmm0
> ret
I'm thinking of something like below so it can be matched both by
expand_vselect_vconcat in ix86_expand_vec_perm_const_1 and patterns created by
pass_combine(theoretically).
+(define_insn_and_split "*sse4_1_insertps_1"
+ [(set (match_operand:VI4F_128 0 "register_operand")
+ (vec_select:VI4F_128
+ (vec_concat:<ssedoublevecmode>
+ (match_operand:VI4F_128 1 "register_operand")
+ (match_operand:VI4F_128 2 "register_operand"))
+ (match_parallel 3 "insertps_parallel"
+ [(match_operand 4 "const_int_operand")])))]
+ "TARGET_SSE4_1 && ix86_pre_reload_split ()"
+ "#"
+ "&& 1"
next prev parent reply other threads:[~2023-03-09 4:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-01 19:02 [Bug tree-optimization/94908] New: " gabravier at gmail dot com
2020-05-01 21:24 ` [Bug tree-optimization/94908] " glisse at gcc dot gnu.org
2020-05-04 6:30 ` rguenth at gcc dot gnu.org
2023-02-17 20:49 ` gabravier at gmail dot com
2023-02-17 21:05 ` [Bug target/94908] " pinskia at gcc dot gnu.org
2023-02-18 9:35 ` ubizjak at gmail dot com
2023-02-20 3:32 ` crazylht at gmail dot com
2023-03-08 13:19 ` ubizjak at gmail dot com
2023-03-09 4:22 ` crazylht at gmail dot com [this message]
2023-03-09 14:27 ` ubizjak at gmail dot com
2023-03-09 14:32 ` ubizjak at gmail dot com
2023-04-18 16:59 ` cvs-commit at gcc dot gnu.org
2023-04-18 17:01 ` ubizjak 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-94908-4-jWPYf5lImU@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).