On 9/30/25 17:40, Vineet Gupta wrote:
>> rtx end_label = gen_label_rtx ();
>> rtx abs_reg = gen_reg_rtx (<ANYF:MODE>mode);
>> rtx coeff_reg = gen_reg_rtx (<ANYF:MODE>mode);
>> rtx tmp_reg = gen_reg_rtx (<ANYF:MODE>mode);
>> - rtx fflags = gen_reg_rtx (SImode);
>>
>> riscv_emit_move (tmp_reg, operands[1]);
>> +
>> + if (flag_trapping_math)
>> + {
>> + /* Check if the input is a NaN */
>> + riscv_expand_conditional_branch (label1, EQ, operands[1],
>> operands[1]);
> I'm not sure of this part: glibc first calls isnan() on input, don't we need
> to
> do the same.
> Otherwise this is just comparing op1 to op1, an FP one sure, but that's not
> same
> as isnan() ?
Clearly I wrote above while being half-asleep.
Per documentation it does the right thing already, sorry for the noise.
Thx,
-Vineet