https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112993

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kewen Lin <li...@gcc.gnu.org>:

https://gcc.gnu.org/g:3f6e6d4b408a26f69816f18d88dde4d983677488

commit r15-2083-g3f6e6d4b408a26f69816f18d88dde4d983677488
Author: Kewen Lin <li...@linux.ibm.com>
Date:   Wed Jul 17 00:14:18 2024 -0500

    expr: Allow same precision modes conversion between {ibm_extended,
ieee_quad}_format

    With some historical reasons, rs6000 defines KFmode, TFmode
    and IFmode to have different mode precisions, but it causes
    some issues and needs some workarounds such as PR112993.
    So we are going to make all rs6000 128 bit scalar FP modes
    have 128 bit precision.  Be prepared for that, this patch
    is to make function convert_mode_scalar allow same precision
    FP modes conversion if their underlying formats are
    ibm_extended_format and ieee_quad_format respectively, just
    like the existing special treatment on arm_bfloat_half_format
    <-> ieee_half_format.  It also factors out all the relevant
    checks into a lambda function.  Besides, similar to ieee fp16
    -> bfloat conversion, it adopts trunc_optab rather than
    sext_optab for ibm128 to ieee128 conversion.

            PR target/112993

    gcc/ChangeLog:

            * expr.cc (convert_mode_scalar): Allow same precision conversion
            between scalar floating point modes if whose underlying format is
            ibm_extended_format or ieee_quad_format, and refactor assertion
            with new lambda function acceptable_same_precision_modes.  Use
            trunc_optab rather than sext_optab for ibm128 to ieee128
conversion.
            * optabs-libfuncs.cc (gen_trunc_conv_libfunc): Use trunc_optab
rather
            than sext_optab for ibm128 to ieee128 conversion.

Reply via email to