This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [lno] copy header and vectorization
- From: Richard Henderson <rth at redhat dot com>
- To: Devang Patel <dpatel at apple dot com>
- Cc: "gcc at gcc dot gnu dot org list" <gcc at gcc dot gnu dot org>
- Date: Tue, 17 Feb 2004 21:29:28 -0800
- Subject: Re: [lno] copy header and vectorization
- References: <14410F46-61C9-11D8-B714-000393A91CAA@apple.com>
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~