[Bug rtl-optimization/97421] aarch64: Wrong code with -O2 -fmodulo-sched

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 24 16:44:00 GMT 2020


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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Roman Zhuykov
<zhroma@gcc.gnu.org>:

https://gcc.gnu.org/g:0963fa93dcc47d290d1597ff88ff162f5bdd1b13

commit r10-9171-g0963fa93dcc47d290d1597ff88ff162f5bdd1b13
Author: Roman Zhuykov <zhroma@ispras.ru>
Date:   Thu Dec 24 19:43:40 2020 +0300

    modulo-sched: Carefully process loop counter initialization [PR97421]

    Do not allow direct adjustment of pre-header initialization instruction for
    count register if is read in some instruction below in that basic block.

    gcc/ChangeLog:

            PR rtl-optimization/97421
            * modulo-sched.c (generate_prolog_epilog): Remove forward
            declaration, adjust last argument name and type.
            (const_iteration_count): Add bool pointer parameter to return
            whether count register is read in pre-header after its
            initialization.
            (sms_schedule): Fix count register initialization adjustment
            procedure according to what const_iteration_count said.

    gcc/testsuite/ChangeLog:

            PR rtl-optimization/97421
            * gcc.c-torture/execute/pr97421-1.c: New test.
            * gcc.c-torture/execute/pr97421-2.c: New test.
            * gcc.c-torture/execute/pr97421-3.c: New test.

    (cherry picked from commit 4eb8f93d026eaa1de9b4820337069f3ce3465cd0)


More information about the Gcc-bugs mailing list