Re: [PATCH PR45098, 9/10] Cheap shift-add.

2011-05-22 Thread Eric Botcazou
> I didn't manage to reproduce the breakage, but I think this patch will fix > it. You need a 32-bit host. > The patch makes sure cst_and_fits_in_hwi is tested before using > int_cst_value. This should be sufficient indeed, thanks. > 2011-05-22 Tom de Vries > > PR target/45098 >

Re: [PATCH PR45098, 9/10] Cheap shift-add.

2011-05-22 Thread Richard Guenther
On Sun, May 22, 2011 at 6:06 PM, Tom de Vries wrote: > On 05/21/2011 09:40 AM, Eric Botcazou wrote: >>> 2011-05-05  Tom de Vries   >>> >>>      PR target/45098 >>>      * tree-ssa-loop-ivopts.c: Include expmed.h. >>>      (get_shiftadd_cost): New function. >>>      (force_expr_to_var_cost): Declar

Re: [PATCH PR45098, 9/10] Cheap shift-add.

2011-05-22 Thread Tom de Vries
On 05/21/2011 09:40 AM, Eric Botcazou wrote: >> 2011-05-05 Tom de Vries >> >> PR target/45098 >> * tree-ssa-loop-ivopts.c: Include expmed.h. >> (get_shiftadd_cost): New function. >> (force_expr_to_var_cost): Declare forward. Use get_shiftadd_cost. > > This breaks the Ada co

Re: [PATCH PR45098, 9/10] Cheap shift-add.

2011-05-21 Thread Eric Botcazou
> 2011-05-05 Tom de Vries > > PR target/45098 > * tree-ssa-loop-ivopts.c: Include expmed.h. > (get_shiftadd_cost): New function. > (force_expr_to_var_cost): Declare forward. Use get_shiftadd_cost. This breaks the Ada compiler on x86: /home/eric/build/gcc/native32/./gcc

Re: [PATCH PR45098, 9/10] Cheap shift-add.

2011-05-20 Thread Zdenek Dvorak
Hi, > On 05/18/2011 11:20 PM, Zdenek Dvorak wrote: > >> + sa_cost = (TREE_CODE (expr) != MINUS_EXPR > >> + ? shiftadd_cost[speed][mode][m] > >> + : (mult == op1 > >> +? shiftsub1_cost[speed][mode][m] > >> +: shiftsub0_cost[speed][mode][m]));

Re: [PATCH PR45098, 9/10] Cheap shift-add.

2011-05-20 Thread Tom de Vries
Hi, On 05/18/2011 11:20 PM, Zdenek Dvorak wrote: >> + sa_cost = (TREE_CODE (expr) != MINUS_EXPR >> + ? shiftadd_cost[speed][mode][m] >> + : (mult == op1 >> +? shiftsub1_cost[speed][mode][m] >> +: shiftsub0_cost[speed][mode][m])); >> + res =

Re: [PATCH PR45098, 9/10] Cheap shift-add.

2011-05-18 Thread Zdenek Dvorak
Hi, > + sa_cost = (TREE_CODE (expr) != MINUS_EXPR > + ? shiftadd_cost[speed][mode][m] > + : (mult == op1 > +? shiftsub1_cost[speed][mode][m] > +: shiftsub0_cost[speed][mode][m])); > + res = new_cost (sa_cost, 0); > + res = add_costs (res,