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]

Re: optimization/6822: GCC 3.1.1 - Internal compiler error in extract_insn, at recog.c:2132


> Previously, unsigned X < 128 would be converted to unsigned X <= 127 and
> then optimized to signed X >= 0.  After changing the order of the
> transformations, the compiler only reduces the expression to X <= 127 ???
> The result is the reported ICE.  This could very well be a latent bug
> in other parts of the compiler, but it seems the change results in missed
> opportunities to simplify expressions.  I'll post an alternative patch
> in my next message...

I was almost sure to have checked the cross-dependencies between the various
blocks of code, but I overlooked this 'unsigned <= 0x7fffffff' thing... Your
patch is obviously better than mine in order to fix this chicken-and-egg
problem.

May I suggest you to add thorough cross-comments to the code ? I see you did
so for the second optimization and I think it would be nice to do it for the
first one too (saying that the current location of the optimization causes
the second one to be altered).

It looks like this doesn't fit with the GCC policy on the matter, but it
could also be worth leaving the original code inside an #if 0/#endif or a
comment.

--
Eric Botcazou
ebotcazou@multimania.com


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