]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Disable shrink-wrap for locally-streaming functions [PR 123624]
authorAlice Carlotti <alice.carlotti@arm.com>
Wed, 14 Jan 2026 13:48:35 +0000 (13:48 +0000)
committerAlice Carlotti <alice.carlotti@arm.com>
Tue, 10 Feb 2026 16:42:06 +0000 (16:42 +0000)
commit1ced019ad9de965971d6fafe0d6fa4af2ddf54ac
tree78f8dbf5d3c51a990a63f1455ffccb36c0cf906f
parentf591c0cb2c7d7fe52be780004ec793cffc82296a
aarch64: Disable shrink-wrap for locally-streaming functions [PR 123624]

The meaning of poly_int values changes depending on whether we are in
streaming or non-streaming mode, but this dependency is not explicitly
tracked.  Locally-streaming functions can change streaming state in the
prologue and epilogue, so it is unsafe to apply shrink wrapping to these
functions, as doing so could change the mode seen by instructions like
cntd.

gcc/ChangeLog:

PR target/123624
* config/aarch64/aarch64-protos.h
(aarch64_use_simple_return_insn_p): New.
* config/aarch64/aarch64.cc
(aarch64_use_simple_return_insn_p): New, used...
* config/aarch64/aarch64.md (simple_return): ...here.

gcc/testsuite/ChangeLog:

PR target/123624
* gcc.target/aarch64/sme/sme-shrinkwrap.c: New test.
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64.cc
gcc/config/aarch64/aarch64.md
gcc/testsuite/gcc.target/aarch64/sme/sme-shrinkwrap.c [new file with mode: 0644]