https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93341

--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 
---
(In reply to Richard Earnshaw from comment #5)
> (In reply to Andrew Pinski from comment #3)
> >               /* We should be able to reverse all conditions.  */
> >               gcc_assert (inv_cond_code != UNKNOWN);
> > 
> > Obvious this code is broken because The quiet UN* was converted into the an
> > unordered-signalling comparison which was bad.
> > 
> > Quote from the recent change:
> > And it would do the same in reverse: convert a quiet UN* into an
> > unordered-signalling comparison.
> > 
> > So obvious this code in aarch64_do_track_speculation was broken when it was
> > added, just the aarch64 back-end was broken to do the wrong thing in the
> > first place so we never able to hit the assert before hand.
> 
> At least as far as Arm hardware is concerned, there is no such thing as an
> unreversible comparison.  The Arm condition codes (except AL, which isn't
> really a condition) are all 100% reversisble.
> 
> The problem here is GCC's insane convolution of the comparison phase with
> the final condition and hence its insistance that reversing, say LT to UNGE
> is not possible because the associated comparison must change.  This is
> frankly bonkers.  If we want to force the choice of a trapping/non-trapping
> comparison, it really, Really, REALLY should be described independently of
> the condition under which the branch is taken.

Agreed.  Like I said in the commit message, I think we should just
add an rtx comparison code for each IEEE comparison predicate,
rather than leave some cases with no direct representation.

Reply via email to