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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <h...@gcc.gnu.org>:

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

commit r16-436-gb8c4b6aa8e0521770c6f9fd48dd13dd85e3a2fc9
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Thu May 1 06:30:41 2025 +0800

    x86: Insert extra move for mode size smaller than natural size

    When generating a SUBREG from V16QI to V2HF, validate_subreg fails since
    V2HF is a floating point vector and its size (4 bytes) is smaller than its
    natural size (word size).  Insert an extra move with a QI vector SUBREG of
    the same size to avoid validate_subreg failure.

    gcc/

            PR target/120036
            * config/i386/i386-features.cc (ix86_get_vector_load_mode):
            Handle 8/4/2 bytes.
            (remove_redundant_vector_load): If the mode size is smaller than
            its natural size, first insert an extra move with a QI vector
            SUBREG of the same size to avoid validate_subreg failure.

    gcc/testsuite/

            PR target/120036
            * g++.target/i386/pr120036.C: New test.
            * gcc.target/i386/pr117839-3a.c: Likewise.
            * gcc.target/i386/pr117839-3b.c: Likewise.

    Signed-off-by: H.J. Lu <hjl.to...@gmail.com>

Reply via email to