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] REG_EQUAL notes on floatlib comparison libcalls


Damn!  I posted an earlier version of the patch :<
The logic describing the UNORDERED comparison operator should have
read:

> + 	  if (comparison == UNORDERED)
> + 	    {
> + 	      rtx temp = simplify_gen_relational (NE, word_mode,
> + 						  mode, x, x);
> + 	      equiv = simplify_gen_relational (NE, word_mode,
> + 					       mode, y, y);
                                                     ^^^^
> + 	      equiv = simplify_gen_ternary (IF_THEN_ELSE, word_mode,
> + 					    word_mode, temp,
> + 					    const_true_rtx, equiv);
> + 	    }


I.e. we annotate the REG_EQUAL note with the RTL equivalent of
"(x != x) ? 1 : (y != y)", which is also "(x  != x) || (y != y)".
The typo in my earlier attempt, tested x for NaN twice ignoring
the value of y.  My apologies for any inconvenience.

Roger
--


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