http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18557
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 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 ***