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

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

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

commit r12-5647-gf5e2f2d0ad1b293c534338a72094926313e12039
Author: liuhongt <hongtao....@intel.com>
Date:   Tue Nov 30 16:24:39 2021 +0800

    Fix ICE in ix86_attr_length_immediate_default.

    ix86_attr_length_immediate_default assume TYPE ishift only have 1
    constant operand,
    but *x86_64_shld_1/*x86_shld_1/*x86_64_shrd_1/*x86_shrd_1 has 2, with
    condition: INTVAL (operands[3]) == 32 - INTVAL (operands[2]) or
    INTVAL (operands[3]) == 64 - INTVAL (operands[2]), and hit
    gcc_assert.
    Explicitly set_attr length_immediate for these patterns.

    gcc/ChangeLog:

            PR target/103463
            PR target/103484
            * config/i386/i386.md (*x86_64_shld_1): Set_attr
            length_immediate to 1.
            (*x86_shld_1): Ditto.
            (*x86_64_shrd_1): Ditto.
            (*x86_shrd_1): Ditto.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr103463.c: New test.
            * gcc.target/i386/pr103463-2.c: New test.

Reply via email to