public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/57558] New: Issue with number of iterations calculation
@ 2013-06-07 14:45 ysrumyan at gmail dot com
  2013-06-10  8:48 ` [Bug tree-optimization/57558] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ysrumyan at gmail dot com @ 2013-06-07 14:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57558
           Summary: Issue with number of iterations calculation
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ysrumyan at gmail dot com

For the following simple test-case extracted from 254.gap (spec2000):

typedef unsigned long ul;
void foo (ul* __restrict x, ul* __restrict y, ul n)
{
  ul i;
  for (i=1; i<=n; i++, x++, y++)
    *x ^= *y;
}

gcc cannot determine number of iterations and failed to vectorize loop:

t1.c:5: note: === get_loop_niters ===Analyzing # of iterations of loop 1
  exit condition [2, + , 1] <= n_8(D)
  bounds on difference of bases: -1 ... 4294967293
  result:
    under assumptions n_8(D) != 4294967295
    # of iterations n_8(D) + 4294967295, bounded by 4294967294

t1.c:5: note: not vectorized: number of iterations cannot be computed.

Note that if we change for-stmt to
  for (i=0; i<n; i++, x++, y++)

it will be vectorized.


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

end of thread, other threads:[~2015-09-25 13:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-07 14:45 [Bug tree-optimization/57558] New: Issue with number of iterations calculation ysrumyan at gmail dot com
2013-06-10  8:48 ` [Bug tree-optimization/57558] " rguenth at gcc dot gnu.org
2013-10-04 11:09 ` a.sinyavin at samsung dot com
2015-05-06 15:16 ` alalaw01 at gcc dot gnu.org
2015-09-25 13:49 ` [Bug tree-optimization/57558] Loop not vectorized if iteration count could be infinite alalaw01 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).