[Bug middle-end/110472] 60% slowdown with fwrapv when using openmp

2023-06-29 Thread ryanpholt at me dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110472

--- Comment #2 from Ryan Holt  ---
(In reply to Andrew Pinski from comment #1)
> I think it is just wrong iv-opt choices.
> 
> Works just fine on aarch64-linux-gnu too:
> ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ~/upstream-gcc/bin/gcc t4.c -O2
> -fopenmp
> ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo
> time: 15.191220
> ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ~/upstream-gcc/bin/gcc t4.c -O2
> -fopenmp -fwrapv
> ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo
> time: 18.854280
> ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo
> time: 16.705876
> ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ~/upstream-gcc/bin/gcc t4.c -O2
> -fopenmp
> ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo
> time: 17.491387
> ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo
> time: 17.519264

I forgot to explicitly call out that I can only reproduce the big speedup
without fwrapv when compiling with -O3. I noticed you were using O2 on
aarch64-linux-gnu.

[Bug middle-end/110472] 60% slowdown with fwrapv when using openmp

2023-06-28 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110472

Andrew Pinski  changed:

   What|Removed |Added

 Target||x86_64-linux-gnu

--- Comment #1 from Andrew Pinski  ---
I think it is just wrong iv-opt choices.

Works just fine on aarch64-linux-gnu too:
ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ~/upstream-gcc/bin/gcc t4.c -O2
-fopenmp
ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo
time: 15.191220
ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ~/upstream-gcc/bin/gcc t4.c -O2
-fopenmp -fwrapv
ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo
time: 18.854280
ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo
time: 16.705876
ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ~/upstream-gcc/bin/gcc t4.c -O2
-fopenmp
ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo
time: 17.491387
ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo
time: 17.519264