From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24260 invoked by alias); 12 Aug 2013 11:59:56 -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 24246 invoked by uid 48); 12 Aug 2013 11:59:55 -0000 From: "ysrumyan at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/58135] New: [x86] Missed opportunities for partial SLP Date: Mon, 12 Aug 2013 11:59: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-08/txt/msg00635.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58135 Bug ID: 58135 Summary: [x86] Missed opportunities for partial SLP 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 If we consider the following simple test-case int a[100]; void foo() { a[0] = a[1] = a[2] = a[3] = 0; } SLP vectorization of basic block takes place: gcc -S -O3 -m32 t.c -ftree-vectorizer-verbose=1 t.c:4: note: Vectorized basic-block but if we add at least one more assignment it won't be vectorized: a[0] = a[1] = a[2] = a[3] = a[4] = 0; t11.c:4: note: Build SLP failed: unrolling required in basic block SLP It is clear that gcc can do partial BB vectorization, i.e. vectorize the first 4 assignments only.