This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/70729] Loop marked with omp simd pragma is not vectorized
- From: "ysrumyan at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Jul 2016 16:48:10 +0000
- Subject: [Bug tree-optimization/70729] Loop marked with omp simd pragma is not vectorized
- Auto-submitted: auto-generated
- References: <bug-70729-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70729
--- Comment #36 from Yuri Rumyantsev <ysrumyan at gmail dot com> ---
#c33 testcase was not tested since I have some doubts about it. Note
that original problem was
#pragma omp simd
for (int i=0; i<S_n; i++)
{
float w1 = C2[S_n + i] * w;
v1.v_i[i] += (int)w1;
C1[S_n + i] += w1;
}
and we must hoist S_n out of loop to vectorize it.
2016-07-04 19:40 GMT+03:00 jakub at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70729
>
> --- Comment #35 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Doesn't it still miscompile the #c33 testcase?
> Say with __attribute__((noinline, noclone)) on baz and
> int v[2048];
>
> int
> main ()
> {
> v[1023] = 5;
> baz (v, v + 1023, v + 1024, v + 1023);
> int i;
> for (i = 0; i < 1024; i++)
> if (v[i] != 5 * 6 || v[1024 + i] != (i == 1023 ? 5 * 6 : 5) * 9)
> __builtin_abort ();
> return 0;
> }
> (untested)?
>
> --
> You are receiving this mail because:
> You reported the bug.