public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/50328] New: loop interchange confuses vectorizer
@ 2011-09-08 13:30 rguenth at gcc dot gnu.org
  2011-09-08 13:37 ` [Bug tree-optimization/50328] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-09-08 13:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50328

             Bug #: 50328
           Summary: loop interchange confuses vectorizer
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org
                CC: irar@gcc.gnu.org


For

double dvec[256];

void test (void)
{
  long i, j;
  for (j = 0; j < 131072; ++j)
    for (i = 0; i < 256; ++i)
      dvec[i] *= 1.0000001;
}

the loops are interchanged with -Ofast -floop-interchange but the vectorizer
is confused by the extra IV lim inserts:

<bb 4>:
  # graphite_IV.6_21 = PHI <0(3), graphite_IV.6_22(5)>
  # dvec_I_lsm.7_26 = PHI <dvec_I_lsm.7_10(3), D.2732_25(5)>
  # ivtmp.9_19 = PHI <131072(3), ivtmp.9_29(5)>
  D.2732_25 = dvec_I_lsm.7_26 *
1.0000001000000000583867176828789524734020233154296875e+0;
  graphite_IV.6_22 = graphite_IV.6_21 + 1;
  ivtmp.9_29 = ivtmp.9_19 - 1;
  if (ivtmp.9_29 != 0)
    goto <bb 5>;
  else
    goto <bb 6>;

<bb 5>:
  goto <bb 4>;

this isn't detected as reduction for some reason.


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

end of thread, other threads:[~2011-09-09 12:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-08 13:30 [Bug tree-optimization/50328] New: loop interchange confuses vectorizer rguenth at gcc dot gnu.org
2011-09-08 13:37 ` [Bug tree-optimization/50328] " rguenth at gcc dot gnu.org
2011-09-08 13:42 ` rguenth at gcc dot gnu.org
2011-09-08 13:55 ` rguenth at gcc dot gnu.org
2011-09-08 14:09 ` [Bug tree-optimization/50328] reduction with constant or invariant not vectorized rguenth at gcc dot gnu.org
2011-09-08 14:22 ` rguenth at gcc dot gnu.org
2011-09-09  9:07 ` rguenth at gcc dot gnu.org
2011-09-09 12:37 ` rguenth at gcc dot gnu.org
2011-09-09 12:57 ` 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).