On Fri, Apr 16, 2021 at 10:17:10AM +0100, Richard Sandiford via Gcc-patches wrote: > gcc/ > PR rtl-optimization/99596 > * rtlanal.c (rtx_properties::try_to_add_insn): Don't add global > register accesses for const calls. Assume that pure functions > can only read from global registers. Ignore cases in which > the stack pointer has been marked global. > > gcc/testsuite/ > PR rtl-optimization/99596 > * gcc.target/arm/pr99596.c: New test.
LGTM, thanks. Jakub