Re: [PATCH] rtlanal: Don't assume that calls write to a global SP [PR99596]

2021-04-16 Thread Richard Biener via Gcc-patches
On Fri, Apr 16, 2021 at 12:01 PM Richard Sandiford via Gcc-patches wrote: > > This patch is a GCC 11 regression caused by the rtl-ssa code. > Normally we treat calls as containing a potential set of a global > register, but DF makes a sensible exception for the stack pointer: > > if (i == ST

Re: [PATCH] rtlanal: Don't assume that calls write to a global SP [PR99596]

2021-04-16 Thread Jakub Jelinek via Gcc-patches
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 glob

[PATCH] rtlanal: Don't assume that calls write to a global SP [PR99596]

2021-04-16 Thread Richard Sandiford via Gcc-patches
This patch is a GCC 11 regression caused by the rtl-ssa code. Normally we treat calls as containing a potential set of a global register, but DF makes a sensible exception for the stack pointer: if (i == STACK_POINTER_REGNUM) /* The stack ptr is used (honorarily) by a CALL insn. */