https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70729

--- Comment #37 from Yuri Rumyantsev <ysrumyan at gmail dot com> ---
Jakub,

I assume that yoour #C33 test-case is not correct, i.e. it can not be
marked with pragma omp simd. For example, even if we turn off lim
phase it will be aborted:
my_g++ -O3  -m64 t33.cpp -o t33.exe.1 -fopenmp -fno-tree-loop-im
/users/ysrumyan/70729$ ./t33.exe.1
Aborted (core dumped)


2016-07-04 19:47 GMT+03:00 Yuri Rumyantsev <ysrum...@gmail.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-bugzi...@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.

Reply via email to