This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/6883] Fails to optimize temporary objects.
- From: "rguenth at tat dot physik dot uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Mar 2004 10:06:59 -0000
- Subject: [Bug optimization/6883] Fails to optimize temporary objects.
- References: <20020531030602.6883.rguenth@tat.physik.uni-tuebingen.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2004-03-03 10:06 -------
Subject: Re: Fails to optimize temporary objects.
On Wed, 3 Mar 2004, pinskia at gcc dot gnu dot org wrote:
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-03 07:42 -------
> Stupid me copied and pasted the tree dump worng, it should have been:
> if (T.4_164 > T.6_165) goto <L24>; else goto <L25>;
>
> <L24>:;
> <D1819>_176 = 0;
> goto <bb 9> (<L26>);
>
> <L25>:;
> <D1819>_175 = 1;
>
> # <D1819>_2 = PHI <1(8), 0(7)>;
> <L26>:;
> T.31_166 = (bool)<D1819>_2;
> T.31_167 = T.31_166;
> if (T.31_166) goto <L15>; else goto <L27>;
which results in:
movl $1, %ecx #, i$m_i
movl $1081081856, 4(%eax) #,
jmp .L2 #
.p2align 4,,7
.L18:
movl %edx, %ecx # T.1, i$m_i
.L2:
leal 1(%ecx), %edx #, T.1
leal 0(,%ecx,8), %eax #, tmp90
cmpl $254, %edx #, T.1
fldl (%ebx,%edx,8) #* <anonymous>
faddl -8(%ebx,%ecx,8) #
fmull (%esi,%eax) #
fstpl (%edi,%eax) #
jle .L18 #,
note that the loop optimizer is not noticing the second BIV it could
eliminate. Also the first loop dump is not exactly helpful - not either
GIV is mentioned. The second loop dump tells the loop optimizer is not
able to prove that the loop iterates constant times... possibly due to the
strange loop entry.
Still work to do ;)
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6883