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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Jakub Jelinek
<[email protected]>:

https://gcc.gnu.org/g:4c662fc1a18220b92b193260bfbbc317bf8b5e4b

commit r15-10694-g4c662fc1a18220b92b193260bfbbc317bf8b5e4b
Author: Jakub Jelinek <[email protected]>
Date:   Fri Jan 9 12:19:26 2026 +0100

    i386: Add OPTION_MASK_ISA_64BIT to 4 non-ia32 builtins [PR123489]

    The following 4 builtins have corresponding insns guarded with TARGET_64BIT
    and are only used in #ifdef __x86_64__ ... #endif section of an intrin
    header, so when used by hand with -m32 they ICE.

    Fixed thusly.

    I've additionally verified all the #ifdef __x86_64__ ... #endif guarded
    builtins used in intrinsic headers and checked whether they have
    OPTION_MASK_ISA_64BIT, the only other exception was
__builtin_ia32_prefetchi
    but I think that one is fine, as expansion in that case has
                if (TARGET_64BIT && TARGET_PREFETCHI
                    && local_func_symbolic_operand (op0, GET_MODE (op0)))
                  emit_insn (gen_prefetchi (op0, op2));
                else
                  {
                    warning (0, "instruction prefetch applies when in 64-bit
mode"
                                " with RIP-relative addressing and"
                                " option %<-mprefetchi%>;"
                                " they stay NOPs otherwise");
                    emit_insn (gen_nop ());
                  }

    2026-01-09  Jakub Jelinek  <[email protected]>

            PR target/123489
            * config/i386/i386-builtin.def (__builtin_ia32_cvttsd2sis64_round,
            __builtin_ia32_cvttsd2usis64_round,
__builtin_ia32_cvttss2sis64_round,
            __builtin_ia32_cvttss2usis64_round): Require OPTION_MASK_ISA_64BIT.

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

    (cherry picked from commit 671382d0ac71ae808a10f3cee1bb521a32b9406b)

Reply via email to