https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66626

--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> ---
ix86_static_chain_on_stack is incompatible with LRA since

1. nonlocal_goto generates:

          lab = copy_to_reg (lab);

          emit_clobber (gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode)));
          emit_clobber (gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx));

          emit_move_insn (hard_frame_pointer_rtx, fp);
          emit_stack_restore (SAVE_NONLOCAL, stack);

          emit_use (hard_frame_pointer_rtx);
          emit_use (stack_pointer_rtx);
          emit_indirect_jump (lab);

2. ix86_static_chain_on_stack uses arg_pointer_rtx to store static
chain on stack.

3. LRA must use the hard fame pointer for elimination.

These simply won't work to together.  Since we must keep LRA, we
should remove ix86_static_chain_on_stack.

Reply via email to