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]

Re: Small update to reversed_comparison_code


> On Tue, Mar 13, 2001 at 11:16:07AM +0100, Jan Hubicka wrote:
> > I've just sent patch to the list that handles part of the problem.  Real
> > problem is, that ifcvt is completely unaware of the danger of reversing fp
> > comparisons in the integer way.
> 
> That's what the calls to can_reverse_comparison_p were supposed
> to prevent.  Are you suggesting that those are faulty?  Yes, I
> know that exact function call is gone from mainline, but you put
> in an equivalent did you not?
There are no can_reverse_comparison_p tests on the conexec path
of ifcvt - just the noce functions (where I did placed the equivalents).
> 
> > Fixing the problem seems to be quite nontrivial, so I would like to ask you
> > how to proceed in release branch. I would like to disable conditional move
> > generation for floating point in release branch.
> 
> I'd like to see an example of failure on the release branch before
> we touch that code at all.
OK, I will build the crosscompiler and try what I can.
> 
> > So I would suggest concentrating on the real problem and re-installing the
> > patch to the tree soon.
> 
> The thing I don't like about the patch, even with all other problems
> solved, is that reversing a branch can turn one jump into two.  And
> it could happen that we decide to reverse again resulting in three
> jumps, etc.
Why exactly?
The reversing is mostly done by the passes manipulating with RTL representation,
so if target has no single branch version of the reversed expression, the
matching will fail.

Also we don't complette the round of reversal, since in first round we
reverse trapping expression to nontrapping and then we can't return.
I was trying to address this by adding new set of conditional codes - the
trapping/nontrapping pairs for each test.
> 
> The passes that are asking about reversing these jumps want to know
> if it can be done for free.  Fibbing about this will only cause
> problems.
In many cases we just reverse internally - this is done by loop/ifcvt
and many passes just to canonicalize condition. Thats where we derive
most benefits from.
Actually only way where reversal can lead to emitting instruction is the
conditional move in ifcvt.c.

Honza
> 
> 
> r~


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