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

--- Comment #9 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 9 Mar 2018, linux at carewolf dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84777
> 
> --- Comment #8 from Allan Jensen <linux at carewolf dot com> ---
> Yes, those I say are missing are compared to -O2. I was investigating this in
> relation to Qt. We either build these files with -O3, or with -Os for customer
> that are binary size sensitive. Since some of the image handling routines are
> quite heavy and have been written for auto-vectorization I was just checking 
> if
> I could get it to work and the results with your patch are quite good:
> 
> Normal sizes of qdrawhelper.o with -O3/-O2/-Os: 
> 277704 / 198984 / 168440
> 
> With -O2 -ftree-vectorize: 242224
> With -O2 -fopenmp: 219536
> With -Os -ftree-loop-vectorize: 168440 (no change)
> With -Os -fopenmp: 177144 (with your patch)
> 
> So most of the -Os benefit and still many of the central draw loops
> auto-vectorized.

That looks indeed good.  We have enough infrastructure already to
support a #pragma GCC vectorize as well (it was added for Ada) just
nobody bothered to add C/C++ support.

> Haven't benchmarked it yet though.

I will test and post the patch, I think it makes sense.

Reply via email to