On 9/3/2022 7:48 AM, Aldy Hernandez via Gcc-patches wrote:
There are 6 idioms of the same check and I'd like to add more.

It seems there are macros as well as functions for things like
REAL_VALUE_ISINF and REAL_VALUE_NEGATIVE.  I don't know if there was
historical need for this duplicity, but I think it's cleaner if we
start gravitating towards inline functions only.

OK?

gcc/ChangeLog:

        * real.cc (encode_ieee_single): Use real_isdenormal.
        (encode_ieee_double): Same.
        (encode_ieee_extended): Same.
        (encode_ieee_quad): Same.
        (encode_ieee_half): Same.
        (encode_arm_bfloat_half): Same.
        * real.h (real_isdenormal): New.
OK.  And if there's any followups where you're doing similar kinds of factoring of duplicated real.* code, consider such changes pre-approved.

jeff

Reply via email to