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]

Re: Optimization failure



  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




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