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

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Xi Ruoyao <xry...@gcc.gnu.org>:

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

commit r14-6746-gc7eefea622e70bd63b0e00e896f67cf9ee9916bc
Author: Xi Ruoyao <xry...@xry111.site>
Date:   Tue Dec 19 04:48:03 2023 +0800

    LoongArch: Use force_reg instead of gen_reg_rtx + emit_move_insn in
vec_init expander [PR113033]

    Jakub says:

        Then that seems like a bug in the loongarch vec_init pattern(s).
        Those really don't have a predicate in any of the backends on the
        input operand, so they need to force_reg it if it is something it
        can't handle. I've looked e.g. at i386 vec_init and that is exactly
        what it does, see the various tests + force_reg calls in
        ix86_expand_vector_init*.

    So replace gen_reg_rtx + emit_move_insn with force_reg to fix PR 113033.

    gcc/ChangeLog:

            PR target/113033
            * config/loongarch/loongarch.cc
            (loongarch_expand_vector_init_same): Replace gen_reg_rtx +
            emit_move_insn with force_reg.
            (loongarch_expand_vector_init): Likewise.

    gcc/testsuite/ChangeLog:

            PR target/113033
            * gcc.target/loongarch/pr113033.c: New test.

Reply via email to