On Fri, Feb 07, 2025 at 05:51:19PM -0600, Peter Bergner wrote:
> On 2/7/25 4:02 PM, Michael Meissner wrote:
> >  (define_predicate "invert_fpmask_comparison_operator"
> > -  (match_code "ne,unlt,unle"))
> > +  (ior (match_code "ne")
> > +       (and (match_code "unlt,unle")
> > +       (match_test "!HONOR_NANS (DFmode) || !TARGET_P9_VECTOR"))))
> 
> Is it always safe to use DFmode here in the HONOR_NANS macro?
> Meaning does it always give the same answer as using SFmode, TFmode,
> IFmore and KFmode?  Ditto for the other use of HONOR_NANS (DFmode).

I forgot to mention that rs6000_reverse_condition is called in several
contexts.

One is the case that ifcvt.cc calls REVERSE_CONDITION, and that is the case
that we don't want UNLT to be converted to GE or UNLE to be converted to GT,
because that is the place we we are creating floating point conditional moves.

The second case is around line 13454 of rs6000.md where we are reversing a
branch after setting a CR register.  In this case, we explicitly want to
reverse UNLT to GE because we used FCMPU or XSCMPUDP to set the condition code,
and that does not cause traps.

The third case is rs6000_emit_sCOND in rs6000.cc.  There we do not want ordered
comparisons converted to floating point conditional moves.

-- 
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meiss...@linux.ibm.com

Reply via email to