From 84e81e84adc59d4a0ed070b49f4f888c191acb98 Mon Sep 17 00:00:00 2001 From: hubicka Date: Mon, 4 Jun 2001 18:04:36 +0000 Subject: * rtlanal.c (operand_preference): Fix preference for objects. * gcse.c (handle_avail_expr): Be prepared to handle single_set parallels. * combine.c (if_then_else_cond): Use simplify_subreg instead of operand_subword. * integreate.c (sub_constants): Likewise. * emit-rtl.c (constant_subword): Deprecate; remove most of code and use simplify_gen_subreg. Mon Jun 4 19:55:23 CEST 2001 Lars Brinkhoff * sibcall.c (skip_copy_to_return_value): recognize the situation when the called function's return value is copied into an intermediate pseudo, and then into the calling functions return value register. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42864 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/sibcall.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'gcc/sibcall.c') diff --git a/gcc/sibcall.c b/gcc/sibcall.c index 13f9c1f0069..53ce4317c96 100644 --- a/gcc/sibcall.c +++ b/gcc/sibcall.c @@ -169,6 +169,30 @@ skip_copy_to_return_value (orig_insn) && SET_SRC (set) == softret) return insn; + /* Recognize the situation when the called function's return value + is copied in two steps: first into an intermediate pseudo, then + the into the calling functions return value register. */ + + if (REG_P (SET_DEST (set)) + && SET_SRC (set) == softret) + { + rtx x = SET_DEST (set); + + insn = next_nonnote_insn (insn); + if (! insn) + return orig_insn; + + set = single_set (insn); + if (! set) + return orig_insn; + + if (SET_DEST (set) == current_function_return_rtx + && REG_P (SET_DEST (set)) + && OUTGOING_REGNO (REGNO (SET_DEST (set))) == REGNO (hardret) + && SET_SRC (set) == x) + return insn; + } + /* It did not look like a copy of the return value, so return the same insn we were passed. */ return orig_insn; -- cgit v1.2.1