https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112525
--- Comment #3 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> --- One possible method is fixing DSE to let is able to remove those 'store's. (but need to take care of the case that is using 'arg_pointer' to pass parameters.) Another method: there is a patch https://gcc.gnu.org/pipermail/gcc-patches/2023-October/634500.html which introduces lighter-expander-sra (this patch is only for struct parameter now). We may enhance this patch to avoid storing the unused parameters.