This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/18557] Inefficient code generated by -ftree-vectorize on Alpha


------- Additional Comments From falk at debian dot org  2004-11-19 20:16 -------
(In reply to comment #6)
> I expect these would go away with this patch:
> http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01512.html

Not quite. Code looks like this:

f:
	and $16,4,$1
	mov $31,$7
	lda $6,64($31)
	cmpult $31,$1,$1
	cmpeq $1,0,$8
	lda $8,1($8)
	zapnot $8,15,$5
	beq $5,$L4
	mov $31,$3
	mov $31,$4
	.align 4
$L12:
	lda $3,1($3)
	s4addq $4,$16,$2
	addl $31,$3,$4
	stl $31,0($2)
	zapnot $4,15,$1
	cmpule $5,$1,$1
	beq $1,$L12
	lda $1,64($31)
	addl $31,$4,$7
	subl $1,$4,$6
$L4:
	cmpeq $5,64,$1
	bne $1,$L15
	lda $1,64($31)
	subq $1,$8,$1
	zapnot $1,15,$23
	srl $23,1,$1
	addl $1,$1,$8
	zapnot $8,15,$22
	beq $22,$L8
	s4addq $5,$16,$2
	zapnot $1,15,$4
	mov $31,$3
	.align 4
$L10:
	lda $3,1($3)
	stq $31,0($2)
	lda $2,8($2)
	zapnot $3,15,$1
	cmpule $4,$1,$1
	beq $1,$L10
	subl $6,$8,$6
	addl $7,$8,$7
$L8:
	cmpeq $23,$22,$1
	bne $1,$L15
	mov $31,$2
	.align 4
$L14:
	addl $2,$7,$1
	subl $6,1,$6
	lda $2,1($2)
	s4addq $1,$16,$1
	stl $31,0($1)
	bne $6,$L14
$L15:
	ret

The first branch can never be taken, and all sign extensions (sextl) and zero
extensions (zapnot 15) are useless.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18557


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]