From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2406 invoked by alias); 7 Jun 2013 14:45:22 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2365 invoked by uid 48); 7 Jun 2013 14:45:19 -0000 From: "ysrumyan at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/57558] New: Issue with number of iterations calculation Date: Fri, 07 Jun 2013 14:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ysrumyan at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00365.txt.bz2 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