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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jiu Fu Guo <guoji...@gcc.gnu.org>:

https://gcc.gnu.org/g:97a8e88cd7d22562c0ea4f73687d3c93c21e12fb

commit r13-4771-g97a8e88cd7d22562c0ea4f73687d3c93c21e12fb
Author: Jiufu Guo <guoji...@linux.ibm.com>
Date:   Mon Dec 19 16:40:01 2022 +0800

    rs6000: use li;x?oris to build constant

    For constant C:
    If '(c & 0xFFFFFFFF00008000ULL) == 0xFFFFFFFF00008000ULL' or say:
    32(1) || 16(x) || 1(1) || 15(x), using "li; xoris" would be ok.

    If '(c & 0xFFFFFFFF80008000ULL) == 0x80000000ULL' or say:
    32(0) || 1(1) || 15(x) || 1(0) || 15(x), we could use "li; oris" to
    build constant 'C'.

    Here N(M) means N continuous bit M, x for M means it is ok for either
    1 or 0; '||' means concatenation.

    This patch update rs6000_emit_set_long_const to support those constants.

            PR target/106708

    gcc/ChangeLog:

            * config/rs6000/rs6000.cc (rs6000_emit_set_long_const): Add using
            "li; x?oris" to build constant.

    gcc/testsuite/ChangeLog:

            * gcc.target/powerpc/pr106708.c: New test.

Reply via email to