This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/29789] Missed optimization in libquantum
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Nov 2006 22:07:05 -0000
- Subject: [Bug tree-optimization/29789] Missed optimization in libquantum
- References: <bug-29789-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2006-11-09 22:07 -------
If the fold transformation is disabled we can force lim to move the shifts out
of the loop by specifying --param lim-expensive=1 (it considers the shifts
being of cost one). The default of the param is 20 though.
PRE thinks the shifts are loop induction variables, so it doesn't move them out
of the loop.
With the above "fixes" we get
.L4:
movl (%edi,%ecx,4), %edx
testl %edx, %ebx
je .L5
testl %edx, %esi
je .L5
xorl %eax, %edx
movl %edx, (%edi,%ecx,4)
.p2align 4,,7
.L5:
addl $1, %ecx
cmpl 24(%ebp), %ecx
jne .L4
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29789