public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54400] New: recognize haddpd Date: Wed, 29 Aug 2012 06:10:00 -0000 [thread overview] Message-ID: <bug-54400-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54400 Bug #: 54400 Summary: recognize haddpd Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned@gcc.gnu.org ReportedBy: glisse@gcc.gnu.org Target: x86_64-linux-gnu Hello, for this program: #include <x86intrin.h> double f(__m128d v){return v[1]+v[0];} gcc -O3 -msse4 (same with -Os) generates: movapd %xmm0, %xmm2 unpckhpd %xmm2, %xmm2 movapd %xmm2, %xmm1 addsd %xmm0, %xmm1 movapd %xmm1, %xmm0 (yes, the number of mov instructions is a bit high...) Looking at the x86 backend, it can expand reduc_splus_v2df and __builtin_ia32_haddpd, but it doesn't provide any pattern that could be recognized. hsubpd is even less present. It seems to me that, considering only the low part of the result of haddpd, the pattern should be small enough to be matched: (plus (vec_select (match_operand 1) const_a) (vec_select (match_dup 1) const_b)) where a and b are 0 and 1 in any order.
next reply other threads:[~2012-08-29 6:10 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-08-29 6:10 glisse at gcc dot gnu.org [this message] 2012-09-01 9:40 ` [Bug target/54400] " glisse at gcc dot gnu.org 2012-09-03 10:13 ` [Bug middle-end/54400] " rguenth at gcc dot gnu.org 2012-09-03 10:22 ` glisse at gcc dot gnu.org 2012-10-08 20:46 ` glisse at gcc dot gnu.org 2012-10-08 21:03 ` [Bug middle-end/54400] recognize vector reductions glisse at gcc dot gnu.org 2012-10-25 8:40 ` vincenzo.innocente at cern dot ch 2021-06-08 13:36 ` rguenth at gcc dot gnu.org 2021-06-08 22:04 ` glisse at gcc dot gnu.org 2021-06-17 7:52 ` cvs-commit at gcc dot gnu.org 2021-06-17 8:00 ` rguenth at gcc dot gnu.org 2021-09-11 14:19 ` 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-54400-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).