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] Improve var_bound range test opt (PR tree-optimization/81655)


On Thu, 3 Aug 2017, Jeff Law wrote:

> On 08/03/2017 03:32 AM, Jakub Jelinek wrote:
> > On Thu, Aug 03, 2017 at 10:58:07AM +0200, Richard Biener wrote:
> >>> The reason why we punt is the unexpected _4 != 1 condition, the code
> >>> is prepared to handle just _4 == 0 (or _4 != 0) where _4 == 0 is equivalent
> >>> to _4 != 1 for boolean type.
> >>
> >> Hmm, I thought we had code to canonicalize boolean compares (but I can't 
> >> find that right now).  Some is in 
> > 
> > I was looking for that too, but didn't find anything that would be done
> > always.
> I can recall looking for that kind of canonicalization as well, but not
> finding it.  Furthermore instrumentation showed the different forms
> could show up in the IL, but forms such as != 1 were relatively rare.

We have foldings that canonicalize to some extent but further 
canonicalization requires switching edges which means even if we'd
do that in CFG cleanup it would be delayed until the next such run.

Richard.


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