[Bug middle-end/31263] Misoptimization of constant function expressions
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Mar 19 16:47:00 GMT 2007
------- Comment #2 from rguenth at gcc dot gnu dot org 2007-03-19 16:47 -------
On x86 different addressing modes and induction variables are used. Good:
.L2:
movq %r12, 8(%rsp)
addl $1, %ebp
movsd 8(%rsp), %xmm0
call Square
movsd %xmm0, (%rbx)
addq $8, %rbx
cmpl $50000000, %ebp
jne .L2
bad:
.L2:
movq %r12, 8(%rsp)
movsd 8(%rsp), %xmm0
call Square
movsd %xmm0, (%rbp,%rbx,8)
addq $1, %rbx
cmpq $50000000, %rbx
jne .L2
this is because we retain the complex expression until the last DOM run
after loop optimization (for 4.1.2 at least).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31263
More information about the Gcc-bugs
mailing list