Re: [PATCH] Fix up get_reload_reg (PR rtl-optimization/56195)

2013-02-08 Thread Vladimir Makarov
On 13-02-07 7:27 PM, Jakub Jelinek wrote: Hi! As the following testcase shows, get_reload_reg could sometimes return a reused reg in a wrong mode. If curr_insn_input_reloads[i].input and original have VOIDmode, they could compare equal (same integer constant), yet mode might be different from G

Re: [PATCH] Fix up get_reload_reg (PR rtl-optimization/56195)

2013-02-08 Thread Jakub Jelinek
On Thu, Feb 07, 2013 at 09:01:15PM -0500, David Miller wrote: > From: Jakub Jelinek > Date: Fri, 8 Feb 2013 01:27:02 +0100 > > > +void > > +fn (void) > > +{ > > + if (b) > > +{ > > + int *p, *q; > > + char g; > > + > > + if (f++) > > + for (;; e++); > > +lbl: > > +

Re: [PATCH] Fix up get_reload_reg (PR rtl-optimization/56195)

2013-02-07 Thread David Miller
From: Jakub Jelinek Date: Fri, 8 Feb 2013 01:27:02 +0100 > +void > +fn (void) > +{ > + if (b) > +{ > + int *p, *q; > + char g; > + > + if (f++) > + for (;; e++); > +lbl: > + for (b = 0; b < 2; b++) > + t /= d + 1 ? : i || a < c < (d = f) ? : 1 | (j = 2); > + >

[PATCH] Fix up get_reload_reg (PR rtl-optimization/56195)

2013-02-07 Thread Jakub Jelinek
Hi! As the following testcase shows, get_reload_reg could sometimes return a reused reg in a wrong mode. If curr_insn_input_reloads[i].input and original have VOIDmode, they could compare equal (same integer constant), yet mode might be different from GET_MODE (curr_insn_input_reloads[i].reg). If