This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [lno] copy header and vectorization


On Tue, Feb 17, 2004 at 08:15:26PM -0800, Devang Patel wrote:
>   for (i = 0; i < N; i++){
>     a[i] = i;
>   }
[...]
> <bb 0>:
>   i_2 = 0;
>   a[i_2] = i_2;
>   i_15 = i_2 + 1;
>   if (i_15 <= 15) goto <L0>; else goto <L9>;
> 
>   # i_1 = PHI <i_15(0), i_18(1)>;
> <L0>:;
>   a[i_1] = i_1;
>   i_18 = i_1 + 1;
>   if (i_18 <= 15) goto <L0>; else goto <L9>;

Indeed, I would assert that the loop header copy phase is broken for
this case.  There is absolutely no reason to copy anything for a loop
known to be executed at least once.



r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]