public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/50374] Support vectorization of min/max location pattern Date: Thu, 22 Sep 2011 15:32:00 -0000 [thread overview] Message-ID: <bug-50374-4-E0ezbnJD46@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-50374-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50374 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #25333|0 |1 is obsolete| | --- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-09-22 15:10:34 UTC --- Created attachment 25341 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25341 gcc47-pr50374.patch Thanks. Here is an updated patch, with hopefully fixed backend part, which passes the whole newly added testsuite. Unfortunately, even with -fno-tree-pre -fno-vect-cost-model, on the *-12.c testcase it vectorizes just 12 loops (f_*_[fiu]_u), not even with -mavx2 where e.g. I'd expect f_*_{d,ll,ull}_ull to be vectorized too, or e.g. the [fiu]_i etc. Seems the pattern recognizer is just too restrictive in finding the IV. On the other side as I wrote earlier, the check whether the index is strigly increasing through the whole loop is missing (if the loop bounds are known, I guess we could check its POLYNOMIAL_CHREC whether it has the expected form and whether it won't wrap/overflow, and if the loop bound is unknown, if there is addition done in a signed type, assume it won't wrap, and for unsigned if the increment is 1 and it has the size bigger or equal to pointer size and init 0/1, then it won't wrap either. BTW, I think on i?86/x86_64 we could in theory support even mixed size reductions, e.g. when the index is long long (64-bit) and comparison int or float, then I think we could use {,v}pmovsxdq instruction to extend the mask where extremes are present from vector of 4 ints or floats to a vector of 4 long longs.
next prev parent reply other threads:[~2011-09-22 15:10 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-09-13 7:55 [Bug tree-optimization/50374] New: " vincenzo.innocente at cern dot ch 2011-09-13 8:01 ` [Bug tree-optimization/50374] " irar at il dot ibm.com 2011-09-13 8:39 ` jakub at gcc dot gnu.org 2011-09-13 8:52 ` vincenzo.innocente at cern dot ch 2011-09-19 13:08 ` jakub at gcc dot gnu.org 2011-09-19 16:37 ` jakub at gcc dot gnu.org 2011-09-20 10:00 ` irar at il dot ibm.com 2011-09-20 12:05 ` irar at il dot ibm.com 2011-09-20 12:18 ` irar at il dot ibm.com 2011-09-20 12:20 ` vincenzo.innocente at cern dot ch 2011-09-20 12:28 ` irar at il dot ibm.com 2011-09-20 12:30 ` irar at il dot ibm.com 2011-09-20 14:00 ` vincenzo.innocente at cern dot ch 2011-09-20 14:57 ` jakub at gcc dot gnu.org 2011-09-21 12:21 ` jakub at gcc dot gnu.org 2011-09-21 12:51 ` irar at il dot ibm.com 2011-09-21 16:58 ` jakub at gcc dot gnu.org 2011-09-21 17:37 ` jakub at gcc dot gnu.org 2011-09-22 8:51 ` irar at il dot ibm.com 2011-09-22 15:32 ` jakub at gcc dot gnu.org [this message] 2011-09-22 16:27 ` jakub at gcc dot gnu.org 2011-11-29 9:59 ` vincenzo.innocente at cern dot ch 2011-11-29 10:03 ` jakub at gcc dot gnu.org 2011-11-29 10:27 ` vincenzo.innocente at cern dot ch 2011-11-29 15:27 ` jakub at gcc dot gnu.org 2011-11-29 15:54 ` vincenzo.innocente at cern dot ch 2011-11-30 10:52 ` vincenzo.innocente at cern dot ch 2014-08-23 17:37 ` vincenzo.innocente at cern dot ch 2014-08-24 10:30 ` Joost.VandeVondele at mat dot ethz.ch
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-50374-4-E0ezbnJD46@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).