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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <[email protected]>:

https://gcc.gnu.org/g:dacd72c18fe6470601f59c70415df111871fbbd7

commit r17-5359-gdacd72c18fe6470601f59c70415df111871fbbd7
Author: Uros Bizjak <[email protected]>
Date:   Mon Oct 19 14:31:59 2026 +0200

    i386: Fix extendhfdf2 expander with -mgeneral-regs-only [PR127957]

    Without TARGET_AVX512FP16, the extendhfdf2 expander converts HF to DF
    in two steps: extendhfsf2 followed by extendsfdf2.  The expander's
    condition only checked for the availability of the first step
    (F16C or AVX512VL), but not for the second.  With -mgeneral-regs-only
    on ia32 there is neither x87 nor SSE math, so extendsfdf2 is not
    available and expansion fails.

    Require the conditions of extendsfdf2 whenever the two-step sequence
    is used.

            PR target/127957

    gcc/ChangeLog:

            * config/i386/i386.md (extendhfdf2): Require TARGET_80387
            or TARGET_SSE2 && TARGET_SSE_MATH when not using
            TARGET_AVX512FP16.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr127957.c: New test.

Reply via email to