[Bug rtl-optimization/108132] Wrong instruction scheduling around function call with longjmp on aarch64 at O2
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 13 18:33:38 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108132
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexander Monakov <amonakov@gcc.gnu.org>:
https://gcc.gnu.org/g:733a1b777f16cd397b43a242d9c31761f66d3da8
commit r13-5154-g733a1b777f16cd397b43a242d9c31761f66d3da8
Author: Alexander Monakov <amonakov@ispras.ru>
Date: Fri Jan 13 21:04:02 2023 +0300
sched-deps: do not schedule pseudos across calls [PR108117]
Scheduling across calls in the pre-RA scheduler is problematic: we do
not take liveness info into account, and are thus prone to extending
lifetime of a pseudo over the loop, requiring a callee-saved hardreg
or causing a spill.
If current function called a setjmp, lifting an assignment over a call
may be incorrect if a longjmp would happen before the assignment.
Thanks to Jose Marchesi for testing on AArch64.
gcc/ChangeLog:
PR rtl-optimization/108117
PR rtl-optimization/108132
* sched-deps.cc (deps_analyze_insn): Do not schedule across
calls before reload.
gcc/testsuite/ChangeLog:
PR rtl-optimization/108117
PR rtl-optimization/108132
* gcc.dg/pr108117.c: New test.
More information about the Gcc-bugs
mailing list