From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13259 invoked by alias); 18 Feb 2015 23:34:43 -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 13192 invoked by uid 55); 18 Feb 2015 23:34:40 -0000 From: "mircea.namolaru at inria dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/62630] [5 regression] gcc.dg/graphite/vect-pr43423.c FAILs Date: Wed, 18 Feb 2015 23:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: mircea.namolaru at inria dot fr X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: 2015-02/txt/msg02078.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62630 --- Comment #14 from Mircea Namolaru --- It seems to me that scalar evolution succeeds to determine the number of iterations for the case of signed longs. Looking in vectorization dump, first a symbolic expression for the number of iterations of a loop is found, and then vect_analyze_refs is entered. The problem is that the code expect an offset of a load to be an induction variable, but in our case an offset is only a cast of an induction variable, like below: _56 = (intD.6) graphite_IV.5_53; _55 = aD.1830[_56]; The offset is found not to be an affine expression, and vectorization don't succeed. But as the offset is a cast of an induction variable, it has the same behaviour as an induction variable even if formally is not one. It seems to me that somehow extending the code to support casts of induction variables will solve our this problem.