2005-08-19 Uros Bizjak * mode-switching.c (create_pre_exit): Skip assignments to EH_RETURN_STACKADJ_RTX when searching for return_copy insn. Add comment regarding use insn and simplify check for insns, generated by builtin_apply_return. --- gcc/gcc/mode-switching.c 2005-07-05 18:20:07.000000000 +0200 +++ gcc/gcc/mode-switching.c 2005-08-19 10:28:41.000000000 +0200 @@ -250,6 +250,8 @@ create_pre_exit (int n_entities, int *en if (INSN_P (return_copy)) { + /* Skip USE patterns inserted by + builtin_apply_return. */ if (GET_CODE (PATTERN (return_copy)) == USE && GET_CODE (XEXP (PATTERN (return_copy), 0)) == REG && (FUNCTION_VALUE_REGNO_P @@ -270,6 +272,15 @@ create_pre_exit (int n_entities, int *en break; } copy_reg = SET_DEST (return_copy_pat); + +#ifdef EH_RETURN_STACKADJ_RTX + /* Skip assignments to EH_RETURN_STACKADJ_RTX. */ + if (rtx_equal_p (copy_reg, EH_RETURN_STACKADJ_RTX)) + { + last_insn = return_copy; + continue; + } +#endif if (GET_CODE (copy_reg) == REG) copy_start = REGNO (copy_reg); else if (GET_CODE (copy_reg) == SUBREG @@ -311,8 +322,8 @@ create_pre_exit (int n_entities, int *en if (copy_start >= ret_start && copy_start + copy_num <= ret_end) nregs -= copy_num; - else if (!maybe_builtin_apply - || !FUNCTION_VALUE_REGNO_P (copy_start)) + else if (!(maybe_builtin_apply + && FUNCTION_VALUE_REGNO_P (copy_start))) break; last_insn = return_copy; }