public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "thiago at kde dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/59539] Missed optimisation: VEX-prefixed operations don't need aligned data Date: Wed, 18 Dec 2013 08:49:00 -0000 [thread overview] Message-ID: <bug-59539-4-6OdOXnaiwu@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-59539-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59539 --- Comment #2 from Thiago Macieira <thiago at kde dot org> --- I have to use _mm_loadu_si128 because non-VEX SSE requires explicit unaligned loads. Here's more food for thought: __m128i result = _mm_cmpeq_epi16((__m128i*)p1, (__m128i*)p2); For non-VEX code, so far the compiler emitted one MOVDQA and one PCMPEQW if it could, enforcing that both sources needed to be aligned. With VEX, VPCMPEQW can do unaligned, so should the other load also be changed to VPMOVDQU instead of VPMOVDQA? Similarly, if I use _mm_load_si128 (not loadu), can the compiler combine one load into the next instruction? Performance-wise, the execution will be the same, with one fewer instruction to be retired (so, better); but it will not cause an unaligned fault if the pointer isn't aligned.
next prev parent reply other threads:[~2013-12-18 8:49 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-12-18 0:50 [Bug target/59539] New: " thiago at kde dot org 2013-12-18 8:33 ` [Bug target/59539] " jakub at gcc dot gnu.org 2013-12-18 8:49 ` thiago at kde dot org [this message] 2013-12-18 9:38 ` ubizjak at gmail dot com 2013-12-18 9:43 ` jakub at gcc dot gnu.org 2013-12-18 9:50 ` ubizjak at gmail dot com 2013-12-18 10:18 ` jakub at gcc dot gnu.org 2013-12-18 10:39 ` ubizjak at gmail dot com 2013-12-18 11:04 ` ubizjak at gmail dot com 2013-12-18 16:50 ` jakub at gcc dot gnu.org 2013-12-18 16:52 ` jakub at gcc dot gnu.org 2013-12-18 17:36 ` thiago at kde dot org 2013-12-19 0:07 ` thiago at kde dot org 2013-12-19 0:14 ` thiago at kde dot 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-59539-4-6OdOXnaiwu@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).