public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/66036] New: strided group loads are not vectorized @ 2015-05-06 12:41 rguenth at gcc dot gnu.org 2015-05-06 12:41 ` [Bug tree-optimization/66036] " rguenth at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-05-06 12:41 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66036 Bug ID: 66036 Summary: strided group loads are not vectorized Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- For example struct Xd { double x; double y; }; double testd (struct Xd *x, int stride, int n) { int i; double sum = 0.; for (i = 0; i < n; ++i) { sum += x[i*stride].x; sum += x[i*stride].y; } return sum; } or similar cases without reduction (simple case) int testi (int *p, short *q, int stride, int n) { int i; for (i = 0; i < n; ++i) { q[i*4+0] = p[i*stride+0]; q[i*4+1] = p[i*stride+1]; q[i*4+2] = p[i*stride+2]; q[i*4+3] = p[i*stride+3]; } } or the more complex case int testi2 (int *q, short *p, int stride, int n) { int i; for (i = 0; i < n; ++i) { q[i*4+0] = p[i*stride+0]; q[i*4+1] = p[i*stride+1]; q[i*4+2] = p[i*stride+2]; q[i*4+3] = p[i*stride+3]; } } because here the SLP group has smaller-than-vector size and thus requires two "scalar" loads and a vector build from them (x86_64 movhlps/movulps). The more complex form happens in SPEC CPUv6. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/66036] strided group loads are not vectorized 2015-05-06 12:41 [Bug tree-optimization/66036] New: strided group loads are not vectorized rguenth at gcc dot gnu.org @ 2015-05-06 12:41 ` rguenth at gcc dot gnu.org 2015-05-06 12:42 ` rguenth at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-05-06 12:41 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66036 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2015-05-06 Blocks| |53947 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 Severity|normal |enhancement --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Mine. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947 [Bug 53947] [meta-bug] vectorizer missed-optimizations ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/66036] strided group loads are not vectorized 2015-05-06 12:41 [Bug tree-optimization/66036] New: strided group loads are not vectorized rguenth at gcc dot gnu.org 2015-05-06 12:41 ` [Bug tree-optimization/66036] " rguenth at gcc dot gnu.org @ 2015-05-06 12:42 ` rguenth at gcc dot gnu.org 2015-05-08 15:14 ` rguenth at gcc dot gnu.org 2015-05-08 15:14 ` rguenth at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-05-06 12:42 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66036 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Reduction case with unrolling struct Xf { float x; float y; }; float testf (struct Xf *x, int stride, int n) { int i; float sum = 0.; for (i = 0; i < n; ++i) { sum += x[i*stride].x; sum += x[i*stride].y; } return sum; } ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/66036] strided group loads are not vectorized 2015-05-06 12:41 [Bug tree-optimization/66036] New: strided group loads are not vectorized rguenth at gcc dot gnu.org 2015-05-06 12:41 ` [Bug tree-optimization/66036] " rguenth at gcc dot gnu.org 2015-05-06 12:42 ` rguenth at gcc dot gnu.org @ 2015-05-08 15:14 ` rguenth at gcc dot gnu.org 2015-05-08 15:14 ` rguenth at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-05-08 15:14 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66036 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Fri May 8 15:13:55 2015 New Revision: 222914 URL: https://gcc.gnu.org/viewcvs?rev=222914&root=gcc&view=rev Log: 2015-05-08 Richard Biener <rguenther@suse.de> PR tree-optimization/66036 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Handle strided group loads. (vect_verify_datarefs_alignment): Likewise. (vect_enhance_data_refs_alignment): Likewise. (vect_analyze_group_access): Likewise. (vect_analyze_data_ref_access): Likewise. (vect_analyze_data_ref_accesses): Likewise. * tree-vect-stmts.c (vect_model_load_cost): Likewise. (vectorizable_load): Likewise. * gcc.dg/vect/slp-41.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/vect/slp-41.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-data-refs.c trunk/gcc/tree-vect-stmts.c ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/66036] strided group loads are not vectorized 2015-05-06 12:41 [Bug tree-optimization/66036] New: strided group loads are not vectorized rguenth at gcc dot gnu.org ` (2 preceding siblings ...) 2015-05-08 15:14 ` rguenth at gcc dot gnu.org @ 2015-05-08 15:14 ` rguenth at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-05-08 15:14 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66036 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Fixed. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-08 15:14 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-05-06 12:41 [Bug tree-optimization/66036] New: strided group loads are not vectorized rguenth at gcc dot gnu.org 2015-05-06 12:41 ` [Bug tree-optimization/66036] " rguenth at gcc dot gnu.org 2015-05-06 12:42 ` rguenth at gcc dot gnu.org 2015-05-08 15:14 ` rguenth at gcc dot gnu.org 2015-05-08 15:14 ` rguenth at gcc dot gnu.org
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).