Hi,

On 2/6/2022 上午 5:01, Segher Boessenkool wrote:
> Hi!
> 
> Some more nitpicking...
> 
> On Wed, May 18, 2022 at 04:52:26PM +0800, HAO CHEN GUI wrote:
>>    const double __builtin_vsx_xsmaxdp (double, double);
>> -    XSMAXDP smaxdf3 {}
>> +    XSMAXDP fmaxdf3 {}
>>
>>    const double __builtin_vsx_xsmindp (double, double);
>> -    XSMINDP smindf3 {}
>> +    XSMINDP fmindf3 {}
> 
> Are s{min,max}df3 still used after this?

Expands reduc_s[min|max]_scal are still using s[min|max]df3.

OPTAB_D (reduc_smax_scal_optab, "reduc_smax_scal_$a")
OPTAB_D (reduc_smin_scal_optab, "reduc_smin_scal_$a")

Also we could implement reduc_f[min|max]_scal after committing
this patch.

Thanks.
Gui Haochen

> 
>> +   UNSPEC_FMAX
>> +   UNSPEC_FMIN
> 
> Pity we have to do this as an unspec still, this should be handled by
> some generic code, with some new operator (fmin/fmax would be obvious
> names :-) )
> 
>> +(define_insn "f<minmax_op><mode>3"
>> +  [(set (match_operand:SFDF 0 "vsx_register_operand" "=wa")
>> +    (unspec:SFDF [(match_operand:SFDF 1 "vsx_register_operand" "wa")
>> +                  (match_operand:SFDF 2 "vsx_register_operand" "wa")]
>> +                  FMINMAX))]
>> +"TARGET_VSX"
>> +"xs<minmax_op>dp %x0,%x1,%x2"
>> +[(set_attr "type" "fp")]
>> +)
> 
> Indentation is broken here, correct is
> 
> (define_insn "f<minmax_op><mode>3"
>   [(set (match_operand:SFDF 0 "vsx_register_operand" "=wa")
>       (unspec:SFDF [(match_operand:SFDF 1 "vsx_register_operand" "wa")
>                     (match_operand:SFDF 2 "vsx_register_operand" "wa")]
>                    FMINMAX))]
>   "TARGET_VSX"
>   "xs<minmax_op>dp %x0,%x1,%x2"
>   [(set_attr "type" "fp")])
> 
> (FMINMAX has the same indent as the preceding [, its sibling;
> "TARGET_VSX" and the next two lines are indented like the same thing
> before it at the same level (the "[(set"); the finishing ) does never
> start a new line).
> 
> 
> Segher

Reply via email to