How to make parallelizing loops and vectorization work at the same time?

2023-09-15 Thread Hanke Zhang via Gcc
Hi I'm trying to accelerate my program with -ftree-vectorize and -ftree-parallelize-loops. Here are my test results using the different options (based on gcc10.3.0 on i9-12900KF): gcc-10 test.c -O3 -flto > time: 29000 ms gcc-10 test.c -O3 -flto -mavx2 -ftree-vectorize > time: 17000 ms gcc-10 test.

Re: How to make parallelizing loops and vectorization work at the same time?

2023-09-15 Thread Richard Biener via Gcc
On Fri, Sep 15, 2023 at 1:21 PM Hanke Zhang via Gcc wrote: > > Hi I'm trying to accelerate my program with -ftree-vectorize and > -ftree-parallelize-loops. > > Here are my test results using the different options (based on > gcc10.3.0 on i9-12900KF): > gcc-10 test.c -O3 -flto > > time: 29000 ms >

Re: How to make parallelizing loops and vectorization work at the same time?

2023-09-15 Thread Hanke Zhang via Gcc
Richard Biener 于2023年9月15日周五 19:59写道: > > On Fri, Sep 15, 2023 at 1:21 PM Hanke Zhang via Gcc wrote: > > > > Hi I'm trying to accelerate my program with -ftree-vectorize and > > -ftree-parallelize-loops. > > > > Here are my test results using the different options (based on > > gcc10.3.0 on i9-1

Re: How to make parallelizing loops and vectorization work at the same time?

2023-09-15 Thread Richard Biener via Gcc
On Fri, Sep 15, 2023 at 3:09 PM Hanke Zhang wrote: > > Richard Biener 于2023年9月15日周五 19:59写道: > > > > > On Fri, Sep 15, 2023 at 1:21 PM Hanke Zhang via Gcc wrote: > > > > > > Hi I'm trying to accelerate my program with -ftree-vectorize and > > > -ftree-parallelize-loops. > > > > > > Here are my t

Re: How to make parallelizing loops and vectorization work at the same time?

2023-09-15 Thread Hanke Zhang via Gcc
I get it. It's a `lto` problem. If I remove `-flto`, both work. Thanks for your help again! Richard Biener 于2023年9月15日周五 21:13写道: > > On Fri, Sep 15, 2023 at 3:09 PM Hanke Zhang wrote: > > > > Richard Biener 于2023年9月15日周五 19:59写道: > > > > > > > > On Fri, Sep 15, 2023 at 1:21 PM Hanke Zhang via

gcc-12-20230915 is now available

2023-09-15 Thread GCC Administrator via Gcc
Snapshot gcc-12-20230915 is now available on https://gcc.gnu.org/pub/gcc/snapshots/12-20230915/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 12 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch