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 ifcvt (PR tree-optimization/79389)


On 02/23/2017 02:36 PM, Jakub Jelinek wrote:
and both UNLT and GE can be reversed.  But if the arguments of the condition
are canonicalized, we run into:
  /* Test for an integer condition, or a floating-point comparison
     in which NaNs can be ignored.  */
  if (CONST_INT_P (arg0)
      || (GET_MODE (arg0) != VOIDmode
          && GET_MODE_CLASS (mode) != MODE_CC
          && !HONOR_NANS (mode)))
    return reverse_condition (code);
and thus always return UNKNOWN.

So... do you think we could add (in gcc-8, probably, although if it fixes this regression...)

   else if (GET_MODE (arg0) != VOIDmode
            && GET_MODE_CLASS (mode) != MODE_CC
            && HONOR_NANS (mode))
     return reverse_condition_maybe_unordered (code);

to make this work?


Bernd


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