From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19194 invoked by alias); 13 Jul 2012 13:53:07 -0000 Received: (qmail 19150 invoked by uid 22791); 13 Jul 2012 13:53:03 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED,TW_CP,TW_DD,TW_SR X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Jul 2012 13:52:48 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/18557] Inefficient code generated by -ftree-vectorize on Alpha Date: Fri, 13 Jul 2012 13:53: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-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Resolution Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-07/txt/msg01059.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18557 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #13 from Richard Guenther 2012-07-13 13:52:25 UTC --- At -O3 we now get calls to memset for the original testcase, changing it to store 1 instead we get $f..ng: f: .frame $30,0,$26,0 .prologue 0 and $16,4,$1 cmpult $31,$1,$1 lda $7,64($31) addl $31,$1,$2 mov $31,$22 beq $2,$L2 lda $7,63($31) lda $22,1($31) lda $3,1($31) stl $3,0($16) $L2: lda $3,64($31) subl $3,$2,$2 zapnot $2,15,$8 lda $5,1($31) srl $8,1,$6 sll $5,32,$5 addl $6,$6,$2 s4addq $1,$16,$1 mov $31,$3 zapnot $6,15,$6 lda $5,1($5) .align 4 $L6: addl $3,1,$3 stq $5,0($1) zapnot $3,15,$4 lda $1,8($1) cmpult $4,$6,$4 bne $4,$L6 zapnot $2,15,$3 addl $22,$2,$1 cmpeq $8,$3,$8 cpys $f31,$f31,$f31 subl $7,$2,$2 bne $8,$L8 s4addq $1,0,$1 lda $4,1($31) .align 4 $L5: addq $16,$1,$3 subl $2,1,$2 stl $4,0($3) lda $1,4($1) bne $2,$L5 $L8: ret $31,($26),1 .end f which seems to be reasonable. We still run into the issue that we do not recognize that the epilogue loop may at most iterate once. The vectorizer makes a mess out of induction variables for the prologue/epilogue loops. See PR53355 for where I track this general issue. *** This bug has been marked as a duplicate of bug 53355 ***