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 tree-optimization/63464] compare one character to many: faster Date: Tue, 07 Oct 2014 21:01:00 -0000 [thread overview] Message-ID: <bug-63464-4-hRvOKfZDG1@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-63464-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> --- The SLP version is slightly slower than the bit test in this case (at least on my old desktop), but it can more easily handle testing for characters that are not within 64 of each other. __m128i b=_mm_set1_epi8(*s); __m128i m=_mm_set_epi8('\n','\r',',',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '); __m128i e=_mm_cmpeq_epi8(b,m); bool found=_mm_movemask_epi8(e)!=0; Though we are missing REDUC_TRUTH_OR_EXPR to model the last line.
next prev parent reply other threads:[~2014-10-07 21:01 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-10-05 21:28 [Bug tree-optimization/63464] New: " glisse at gcc dot gnu.org 2014-10-06 11:27 ` [Bug tree-optimization/63464] " jakub at gcc dot gnu.org 2014-10-06 11:52 ` rguenther at suse dot de 2014-10-06 16:59 ` jakub at gcc dot gnu.org 2014-10-07 11:11 ` jakub at gcc dot gnu.org 2014-10-07 11:15 ` rguenther at suse dot de 2014-10-07 20:15 ` glisse at gcc dot gnu.org 2014-10-07 21:01 ` glisse at gcc dot gnu.org [this message] 2014-10-10 12:16 ` jakub at gcc dot gnu.org 2014-10-13 15:51 ` jakub at gcc dot gnu.org 2014-10-13 15:53 ` jakub at gcc dot gnu.org 2014-10-15 14:19 ` jakub at gcc dot gnu.org 2014-10-17 10:55 ` jakub at gcc dot gnu.org 2014-10-17 11:20 ` jakub at gcc dot gnu.org 2014-10-17 11:49 ` ubizjak at gmail dot com 2015-01-16 17:14 ` jakub at gcc dot gnu.org 2015-01-16 17:28 ` jakub 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-63464-4-hRvOKfZDG1@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).