From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13275 invoked by alias); 21 Jul 2013 09:15:51 -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 10815 invoked by uid 48); 21 Jul 2013 09:13:47 -0000 From: "spop at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/14741] graphite with loop blocking and interchanging doesn't optimize a matrix multiplication loop Date: Sun, 21 Jul 2013 09:15: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: tree-ssa X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: spop at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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: 2013-07/txt/msg00934.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14741 --- Comment #21 from Sebastian Pop --- Scop detection does not detect this loop because we now require the scev of the data references to be analyzable in all the loops around: commit e97c4b0daa932558eae4d9b9794cdd549e6d40bd Author: rguenth Date: Tue Jan 10 09:14:51 2012 +0000 2012-01-10 Richard Guenther PR tree-optimization/50913 * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Require data-refs to be representable by Graphite with respect to any loop nest. * gcc.dg/graphite/interchange-16.c: New testcase. * gcc.dg/graphite/scop-20.c: XFAIL. * gfortran.dg/graphite/interchange-1.f: Likewise. * gfortran.dg/graphite/block-1.f90: Likewise. * gfortran.dg/graphite/block-2.f: Likewise. So for this gimple stmt: # VUSE <.MEM_6> _29 = *a_28(D)[_27]; the data reference when analyzed in the innermost loop is: {(stride.12_14 + offset.13_15) + _19, +, stride.12_14}_3 and that cannot be represented in graphite as it has a non constant (parametric) stride. Note that this data reference can be represented in an outer loop, as the stride is then a multidimensional access with constant strides.