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

--- Comment #12 from CVS 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:9407058a430316db5299bc7867e4a31f900cd197

commit r12-6122-g9407058a430316db5299bc7867e4a31f900cd197
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Sun Dec 19 08:47:03 2021 -0800

    ix86: Don't use the 'm' constraint for x86_64_general_operand

    The 'm' constraint is defined with define_memory_constraint which allows
    LRA to convert the operand to the form '(mem (reg X))', where X is a
    base register.  To prevent LRA from generating '(mem (reg X))' from a
    register:

    1. Add a 'BM' constraint which is similar to the 'm' constraint, but
    is defined with define_constraint.
    2. Add a 'm' mode attribute which is mapped to the 'm' constraint for
    general_operand and the 'BM' constraint for x86_64_general_operand.
    3. Replace the 'm' constraint on <general_operand> with the '<m>'
    constraint.
    4. Replace the 'm' constraint on x86_64_general_operand with the 'BM'
    constraint.

    gcc/

            PR target/103762
            * config/i386/constraints.md (BM): New constraint.
            * config/i386/i386.md (m): New mode attribute.
            Replace the 'm' constraint on <general_operand> with the '<m>'
            constraint.
            Replace the 'm' constraint on x86_64_general_operand with the
            'BM' constraint.

    gcc/testsuite/

            * gcc.target/i386/pr103762-1a.c: New test.
            * gcc.target/i386/pr103762-1b.c: Likewise.
            * gcc.target/i386/pr103762-1c.c: Likewise.

Reply via email to