Re: SH: PR target/24445

2005-11-02 Thread Kaz Kojima
Ian Lance Taylor wrote: > In general, yes. But looking at it we should probably only call > copy_to_reg if TARGET is not itself a pseudo-register. > > And I think I would put the new code before the "TARGET and VALREG > cannot be equal" comment. > > That patch is OK if it works and passes testi

Re: SH: PR target/24445

2005-11-02 Thread Ian Lance Taylor
Kaz Kojima <[EMAIL PROTECTED]> writes: > Like this? > > @@ -2861,6 +2861,12 @@ expand_call (tree exp, rtx target, int i > >If they refer to the same register, this move will be a no-op, >except when function inlining is being done. */ > + /* We have to copy a retu

Re: SH: PR target/24445

2005-11-02 Thread Kaz Kojima
Ian Lance Taylor wrote: > I don't see what this has to do with pure functions. > > It seems to me that instead you want to put something here: > > else if (target > && GET_MODE (target) == TYPE_MODE (TREE_TYPE (exp)) > && GET_MODE (target) == GET_MODE (valreg)) >

Re: SH: PR target/24445

2005-11-02 Thread Andrew Pinski
> > Kaz Kojima <[EMAIL PROTECTED]> writes: > > > --- ORIG/trunk/gcc/calls.c 2005-10-29 06:52:11.0 +0900 > > +++ LOCAL/trunk/gcc/calls.c 2005-11-03 09:15:47.0 +0900 > > @@ -2774,6 +2774,17 @@ expand_call (tree exp, rtx target, int i > > emit_insn (insns); > > valreg =

Re: SH: PR target/24445

2005-11-02 Thread Ian Lance Taylor
Kaz Kojima <[EMAIL PROTECTED]> writes: > --- ORIG/trunk/gcc/calls.c2005-10-29 06:52:11.0 +0900 > +++ LOCAL/trunk/gcc/calls.c 2005-11-03 09:15:47.0 +0900 > @@ -2774,6 +2774,17 @@ expand_call (tree exp, rtx target, int i > emit_insn (insns); > valreg = temp; >

Re: SH: PR target/24445

2005-11-02 Thread Kaz Kojima
Joern RENNECKE <[EMAIL PROTECTED]> wrote: >>[.expand after the patch] >>(set (reg/f:SI 160) (const:SI (unspec [(symbol_ref:SI ("baz"))] 7))) >>(set (reg:SI 161) (plus:SI (reg:SI 12 r12) (reg/f:SI 160))) >>(set (reg/f:SI 159) (mem/u/c:SI (reg:SI 161))) >>(set (reg:SI 0 r0) (call (mem:SI (symbol_ref:

Re: SH: PR target/24445

2005-11-02 Thread Joern RENNECKE
Kaz Kojima wrote: [.expand after the patch] (set (reg/f:SI 160) (const:SI (unspec [(symbol_ref:SI ("baz"))] 7))) (set (reg:SI 161) (plus:SI (reg:SI 12 r12) (reg/f:SI 160))) (set (reg/f:SI 159) (mem/u/c:SI (reg:SI 161))) (set (reg:SI 0 r0) (call (mem:SI (symbol_ref:SI ("bar") (set (mem/c/i:S

SH: PR target/24445

2005-11-02 Thread Kaz Kojima
Hi, I've tried to see what is gonig on for PR target/24445 which is a 4.1 regression of SH. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24445 Comparing rtl dumps for the reduced testcase in the audit trail #4 of that PR with and without Jan's patch in #10, there is no return value copy in the rt