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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

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

commit r15-2473-gdf2b444a233e93b987adec76655ab89589b3fa10
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Thu Aug 1 10:32:54 2024 +0200

    i386: Fix up *<extract_type>_vinsert<shuffletype><extract_suf>_0 [PR115981]

    The r14-537 change started canonicalizing VEC_MERGE operands based on
    swap_commutative_operands_p or if they have the same precedence least
    significant bit of the third operand.
    The *<extract_type>_vinsert<shuffletype><extract_suf>_0 pattern was
    added for combine matching and no longer triggers after that change,
    as it used the reg_or_0_operand as the first operand and VEC_DUPLICATE
    as the second.
    Now, reg_or_0_operand could be a REG, SUBREG of object or CONST_VECTOR.
    REG has commutative_operand_precedence -1 or -2, SUBREG of object -3,
    CONST_VECTOR -4, while VEC_DUPLICATE has 0, so VEC_DUPLICATE will always
    go first and REG, SUBREG or CONST_VECTOR second.

    This patch swaps the operands so that it matches again.

    2024-08-01  Jakub Jelinek  <ja...@redhat.com>

            PR target/115981
            * config/i386/sse.md
            (*<extract_type>_vinsert<shuffletype><extract_suf>_0): Swap the
            first two VEC_MERGE operands, renumber match_operands and test
            for 0xF or 0x3 rather than 0xFFF0 or 0xFC immediate.

            * gcc.target/i386/avx512dq-pr90991-1.c: Add tests for no separate
            zero extension instructions.
            * gcc.target/i386/avx512dq-pr90991-2.c: Likewise.

Reply via email to