public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/65962] New: Missed vectorization of strided stores
@ 2015-05-01 11:45 alalaw01 at gcc dot gnu.org
  2015-05-01 11:46 ` [Bug middle-end/65962] " alalaw01 at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: alalaw01 at gcc dot gnu.org @ 2015-05-01 11:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65962

            Bug ID: 65962
           Summary: Missed vectorization of strided stores
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alalaw01 at gcc dot gnu.org
  Target Milestone: ---

This does not vectorize at -O3 on x86_64/-mavx or aarch64:
int
loop (int *data)
{
  int tot = 0;
  for (int i = 0; i < 256; i++)
    data[i * 2] += 7;
  return tot;
}

-fdump-tree-vect-details reveals:

loadstore.c:6:3: note: === vect_analyze_data_ref_accesses ===
loadstore.c:6:3: note: Detected single element interleaving *_8 step 8
loadstore.c:6:3: note: Data access with gaps requires scalar epilogue loop
loadstore.c:6:3: note: not consecutive access *_8 = _10;

loadstore.c:6:3: note: not vectorized: complicated access pattern.
loadstore.c:6:3: note: bad data access.

However, a similar testcase that only reads from those locations, vectorizes
ok:
int
loop_12 (int *data)
{
  int tot = 0;
  for (int i = 0; i < 256; i++)
    tot += data[i * 2];
  return tot;
}
blocksort.c:6:3: note: === vect_analyze_data_ref_accesses ===
blocksort.c:6:3: note: Detected single element interleaving *_7 step 8
blocksort.c:6:3: note: Data access with gaps requires scalar epilogue loop


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-10-30  9:49 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-01 11:45 [Bug middle-end/65962] New: Missed vectorization of strided stores alalaw01 at gcc dot gnu.org
2015-05-01 11:46 ` [Bug middle-end/65962] " alalaw01 at gcc dot gnu.org
2015-05-04 11:19 ` rguenth at gcc dot gnu.org
2015-10-22 10:28 ` rguenth at gcc dot gnu.org
2015-10-22 13:33 ` rguenth at gcc dot gnu.org
2015-10-22 13:34 ` rguenth at gcc dot gnu.org
2015-10-23 22:32 ` wschmidt at gcc dot gnu.org
2015-10-26 11:51 ` rguenth at gcc dot gnu.org
2015-10-26 16:51 ` wschmidt at gcc dot gnu.org
2015-10-26 16:52 ` wschmidt at gcc dot gnu.org
2015-10-26 16:52 ` wschmidt at gcc dot gnu.org
2015-10-27 11:16 ` rguenth at gcc dot gnu.org
2015-10-27 13:17 ` wschmidt at gcc dot gnu.org
2015-10-28 10:10 ` rguenth at gcc dot gnu.org
2015-10-28 16:47 ` clyon at gcc dot gnu.org
2015-10-29  9:48 ` rguenther at suse dot de
2015-10-29 14:57 ` clyon at gcc dot gnu.org
2015-10-29 14:58 ` clyon at gcc dot gnu.org
2015-10-29 14:59 ` clyon at gcc dot gnu.org
2015-10-29 15:14 ` rguenth at gcc dot gnu.org
2015-10-30  9:49 ` clyon 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).