> Am 06.09.2019 um 12:34 schrieb Segher Boessenkool 
> <seg...@kernel.crashing.org>:
> 
> Hi Ilya,
> 
> On Thu, Sep 05, 2019 at 01:10:14PM +0200, Ilya Leoshkevich wrote:
>> z13 supports only non-signaling vector comparisons.  This means we
>> cannot vectorize LT, LE, GT, GE and LTGT when compiling for z13.  Notify
>> middle-end about this using more restrictive operator predicate in
>> vcond<V_HW:mode><V_HW2:mode>.
> 
>> +(define_predicate "vcond_comparison_operator"
>> +  (match_operand 0 "comparison_operator")
>> +{
>> +  if (!HONOR_NANS (GET_MODE (XEXP (op, 0)))
>> +      && !HONOR_NANS (GET_MODE (XEXP (op, 1))))
>> +    return true;
>> +  switch (GET_CODE (op))
>> +    {
>> +    case LE:
>> +    case LT:
>> +    case GE:
>> +    case GT:
>> +    case LTGT:
>> +      /* Signaling vector comparisons are supported only on z14+.  */
>> +      return TARGET_Z14;
>> +    default:
>> +      return true;
>> +    }
>> +})
> 
> Should you handle -fsignaling-nans here as well?

Do you mean disabling vectorisation of LE/LT/GE/GT/LTGT when
-fsignaling-nans is in effect?  This makes sense to me.  I could do that
here, but wouldn't common code (e.g. expand_vec_cond_expr_p) be a better
place?

Reply via email to