This is the mail archive of the gcc-patches@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]

Re: [PATCH] Fix PR 29715, fold produces &a - 4


On 3/1/07, Richard Guenther <richard.guenther@gmail.com> wrote:
This optimization doesn't look too useful at all now that we gimplify all this
post/preinc/decrement anyway.  This is actually the only place where we look
at this operators in fold, so I suggest removing the whole
transformation instead.

Like this? I agree that this is no longer needed as we do gimplification and then optimize it later if we can (though sometimes we don't because we don't recombined the PLUS with the comparision but that is not actually tested :) ).

This is not the first time this code has bought troubles:
http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00582.html
http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00575.html
http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02369.html


This was bootstrapped and tested many times on powerpc64-linux-gnu with no regressions and built and tested for spu-elf with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
 * fold-const.c (fold_comparision): Remove the "foo++ == CONST" transformation.

Attachment: fixfold.diff.txt
Description: Text document


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