From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69872 invoked by alias); 17 Jun 2015 12:59:13 -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 69839 invoked by uid 48); 17 Jun 2015 12:59:10 -0000 From: "alalaw01 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65952] [AArch64] Will not vectorize storing induction of pointer addresses for LP64 Date: Wed, 17 Jun 2015 12:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.1.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: alalaw01 at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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: 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-06/txt/msg01512.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65952 --- Comment #5 from alalaw01 at gcc dot gnu.org --- So the above example tends to get fully unrolled, but even on an example with 32 ptrs rather than 4, yes the vectorizer fails because of the multiplication - but the multiplication is gone by the final tree stage, as it's strength reduced down to an add; I believe this -fdump-tree-optimized would be perfectly vectorizable: loop () { unsigned long ivtmp.12; unsigned long ivtmp.10; void * _4; struct my_struct * _7; struct my_struct * pretmp_11; unsigned long _20; : pretmp_11 = array; ivtmp.10_16 = (unsigned long) pretmp_11; ivtmp.12_2 = (unsigned long) &ptrs; _20 = (unsigned long) &MEM[(void *)&ptrs + 256B]; : # ivtmp.10_10 = PHI # ivtmp.12_15 = PHI _7 = (struct my_struct *) ivtmp.10_10; _4 = (void *) ivtmp.12_15; MEM[base: _4, offset: 0B] = _7; ivtmp.10_1 = ivtmp.10_10 + 16; ivtmp.12_14 = ivtmp.12_15 + 8; if (ivtmp.12_14 != _20) goto ; else goto ; : return; }