Patchwork [committed] Fix lower-subreg cost calculation

login
register
mail settings
Submitter Richard Sandiford
Date May 8, 2012, 9:42 p.m.
Message ID <878vh2pcy0.fsf@talisman.home>
Download mbox | patch
Permalink /patch/157823/
State New
Headers show

Comments

Richard Sandiford - May 8, 2012, 9:42 p.m.
Richard Earnshaw <rearnsha@arm.com> writes:
> FTR, this caused
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53278

Well, this really has been a brown-paper-bag patch.  Fixed as below.
Tested on x86_64-linux-gnu and applied as obvious.

Richard


gcc/
	PR rtl-optimization/53278
	* lower-subreg.c (decompose_multiword_subregs): Remove left-over
	speed_p code from earlier patch.
Richard Earnshaw - May 9, 2012, 9:47 a.m.
On 08/05/12 22:42, Richard Sandiford wrote:
> Richard Earnshaw <rearnsha@arm.com> writes:
>> FTR, this caused
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53278
> 
> Well, this really has been a brown-paper-bag patch.  Fixed as below.
> Tested on x86_64-linux-gnu and applied as obvious.
> 
> Richard
> 
> 
> gcc/
> 	PR rtl-optimization/53278
> 	* lower-subreg.c (decompose_multiword_subregs): Remove left-over
> 	speed_p code from earlier patch.
> 
> Index: gcc/lower-subreg.c
> ===================================================================
> --- gcc/lower-subreg.c	2012-05-08 19:45:31.000000000 +0100
> +++ gcc/lower-subreg.c	2012-05-08 19:45:31.793855523 +0100
> @@ -1487,9 +1487,7 @@ decompose_multiword_subregs (void)
>        FOR_EACH_BB (bb)
>  	{
>  	  rtx insn;
> -	  bool speed_p;
>  
> -	  speed_p = optimize_bb_for_speed_p (bb);
>  	  FOR_BB_INSNS (bb, insn)
>  	    {
>  	      rtx pat;
> 


Which begs the question as to why -wshadow didn't pick this up...

R.

Patch

Index: gcc/lower-subreg.c
===================================================================
--- gcc/lower-subreg.c	2012-05-08 19:45:31.000000000 +0100
+++ gcc/lower-subreg.c	2012-05-08 19:45:31.793855523 +0100
@@ -1487,9 +1487,7 @@  decompose_multiword_subregs (void)
       FOR_EACH_BB (bb)
 	{
 	  rtx insn;
-	  bool speed_p;
 
-	  speed_p = optimize_bb_for_speed_p (bb);
 	  FOR_BB_INSNS (bb, insn)
 	    {
 	      rtx pat;