This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Optimization failure
- To: "Doug Semler" <doug at seaspace dot com>
- Subject: Re: Optimization failure
- From: Jeffrey A Law <law at hurl dot cygnus dot com>
- Date: Sun, 28 Feb 1999 16:31:02 -0700
- cc: egcs-bugs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <01ef01be6367$8da402f0$237196c0@seaspace.com>you write:
> >I believe the way to fix this is to
> >
>
> So, you just gonna leave us hanging???? :)
Did it get cut off?
Hmmm, apparently so.
I believe the way to fix this problem is to perform reassociations on the
tree of comparisons.
ie, given:
((A || (c == 0x7f)) || (c == 0x80))
That can be reassociated into
(A) || ((c == 0x7f)) || (c == 0x80))
Which then turns into
(A) || (c >= 0x7f || c <= 0x80)
And so on for the entire comparison.
I believe it would need to be structured similar to simplify_plus_minus,
except that it would work on trees instead of rtl and would have to hook
into the range checking code.
jeff