> @@ -5569,7 +5571,9 @@ riscv_avoid_multi_push (const struct riscv_frame_info > *frame) > { > if (!TARGET_ZCMP || crtl->calls_eh_return || frame_pointer_needed > || cfun->machine->interrupt_handler_p || cfun->machine->varargs_size > != 0 > - || crtl->args.pretend_args_size != 0 || flag_shrink_wrap_separate > + || crtl->args.pretend_args_size != 0 > + || (use_shrink_wrapping_separate () > + && !riscv_avoid_shrink_wrapping_separate ())
I think we should also check "!optimize_function_for_size_p (cfun)" here, otherwise that does not really match what we claim in the commit message. e.g. it still will enable with -O2 -fno-shrink-wrap-separate > || (frame->mask & ~MULTI_PUSH_GPR_MASK)) > return true; >