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

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by hongtao Liu
<liuho...@gcc.gnu.org>:

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

commit r10-11105-gac30c91a1002ae4049a4773d07d5da41e7bd3138
Author: liuhongt <hongtao....@intel.com>
Date:   Mon Nov 28 09:59:47 2022 +0800

    Fix unrecognizable insn due to illegal immediate_operand (const_int 255) of
QImode.

    For __builtin_ia32_vec_set_v16qi (a, -1, 2) with
    !flag_signed_char. it's transformed to
    __builtin_ia32_vec_set_v16qi (_4, 255, 2) in the gimple,
    and expanded to (const_int 255) in the rtl. But for immediate_operand,
    it expects (const_int 255) to be signed extended to
    (const_int -1). The mismatch caused an unrecognizable insn error.

    The patch converts (const_int 255) to (const_int -1) in the backend
    expander.

    gcc/ChangeLog:

            PR target/107863
            * config/i386/i386-expand.c (ix86_expand_vec_set_builtin):
            Convert op1 to target mode whenever mode mismatch.

    gcc/testsuite/ChangeLog:

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

Reply via email to