public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/57796] AVX2 gather vectorization: code bloat and reduction of performance Date: Fri, 10 Apr 2015 11:16:00 -0000 [thread overview] Message-ID: <bug-57796-4-F3rwKlf2qy@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-57796-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57796 --- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- Another use-case for gathers is that of strided loads where we do for (j = 0; ; j += VF*stride) tmp1 = array[j]; tmp2 = array[j + stride]; ... vectemp = {tmp1, tmp2, ...} but could as well do off = { 0, stride, ..., stride * N }; for (j = 0; ; j += VF*stride) vectemp = gather (&array[j], off, -1); still need a separate IV. Currently the cost of strided loads is /* N scalar loads plus gathering them into a vector. */ tree vectype = STMT_VINFO_VECTYPE (stmt_info); inside_cost += record_stmt_cost (body_cost_vec, ncopies * TYPE_VECTOR_SUBPARTS (vectype), scalar_load, stmt_info, 0, vect_body); inside_cost += record_stmt_cost (body_cost_vec, ncopies, vec_construct, stmt_info, 0, vect_body); where a good(?) approximation for gather loads could be just omitting the vec_construct cost? (well, a new target cost for gather would be most appropriate I guess)
prev parent reply other threads:[~2015-04-10 11:16 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-07-03 8:56 [Bug tree-optimization/57796] New: " vincenzo.innocente at cern dot ch 2013-07-03 9:33 ` [Bug tree-optimization/57796] " jakub at gcc dot gnu.org 2013-07-05 13:31 ` [Bug target/57796] " ysrumyan at gmail dot com 2013-07-05 13:49 ` jakub at gcc dot gnu.org 2013-07-05 14:14 ` ysrumyan at gmail dot com 2014-06-19 8:17 ` vincenzo.innocente at cern dot ch 2015-04-10 11:16 ` rguenth at gcc dot gnu.org [this message]
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-57796-4-F3rwKlf2qy@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).