------- Comment #17 from rakdver at kam dot mff dot cuni dot cz  2010-02-05 
13:58 -------
Subject: Re:  Inefficient loop unrolling

>  But if I adjust the cost to make
> "index" cost only 1 or 2, I get this:
> 
> <bb 2>:
>   pretmp.11_26 = (int) s_11(D);
>   ivtmp.25_28 = (long unsigned int) b_inout_5(D);
> 
> <bb 3>:
>   # i_20 = PHI <i_14(4), 0(2)>
>   # ivtmp.25_25 = PHI <ivtmp.25_24(4), ivtmp.25_28(2)>
>   D.1846_29 = (void *) ivtmp.25_25;
>   D.1814_10 = MEM[base: D.1846_29]{*D.1813};
>   D.1816_13 = D.1814_10 * pretmp.11_26;
>   D.1847_30 = (void *) ivtmp.25_25;
>   MEM[base: D.1847_30]{*D.1813} = D.1816_13;
>   ivtmp.25_24 = ivtmp.25_25 + 4;
>   i_14 = i_20 + 1;
>   if (i_14 != 64)
>     goto <bb 4>;
>   else
>     goto <bb 5>;
> 
> <bb 4>:
>   goto <bb 3>;
> 
> <bb 5>:
>   return;

what configuration and flags are you using?  For me, replacing
arm_arm_address_cost with return 1 resulted
in

<bb 3>:
  # ivtmp.25_25 = PHI <ivtmp.25_24(3), ivtmp.25_28(2)>
  D.1816_29 = (void *) ivtmp.25_25;
  D.1784_10 = MEM[base: D.1816_29]{*D.1783};
  D.1786_13 = pretmp.11_26 * D.1784_10;
  MEM[base: D.1816_29]{*D.1783} = D.1786_13;
  ivtmp.25_24 = ivtmp.25_25 + 4;
  if (ivtmp.25_24 != D.1819_32)

Zdenek


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36712

Reply via email to