Hello, yes the underlying issue is the same as for PR/46219. Nevertheless the patch doesn't solve this mentioned PR as I used for know a pretty conservative checking of allowed memories. By extending x86_sibcall_memory_p_1 function about allowing register-arguments too for memory, this problem can be solved.
Kai ----- Original Message ----- > Hello, > > Does this touch or address the problem raised in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46219#c3 ? > > [Uros Bizjak] > >> For some reason, memory operand is prohibited in a sibcall, see > >> predicates.md [...] > > [Richard Henderson] > > That would be because we have no good way to say: global memory is fine, > > but > > the on-stack memory that we just deallocated is not. > > > In addition for this case, we have to ensure that the registers used to do > > the indexing are still valid after call-saved registers have been restored, > > and avoid any call-clobbered registers that might be needed to execute the > > epilogue. > > > In general I don't think this is solvable, but for this specific case we > > could add a peephole. > > > Thanks. > Alexander >