[PATCH][vect] Disable vectorization of epilogues for loops with SIMDUID set

Richard Biener rguenther@suse.de
Tue Nov 5 07:07:00 GMT 2019


On Mon, 4 Nov 2019, Andre Vieira (lists) wrote:

> Hi,
> 
> I was using loop->simdlen to detect whether it was a SIMD loop and I don't
> believe that was correct, as can be witnessed by the mass failures in libgomp.
> My apologies for not running this, didn't think of it!
> 
> I found that these were failing because we do not handle vectorization of
> epilogues correctly when SIMDUID is set. For now Jakub and I agreed to disable
> epilogue vectorization for loops where SIMDUID is set until we have fixed
> this. See further comments inline.
> 
> I bootstrapped it on aarch64 and x86_64, ran libgomp on both.
> 
> This OK for trunk?

OK.  Can you remove the simdlen == 0 check as a followup?

Thanks,
Richard.

> Cheers,
> Andre
> 
> gcc/ChangeLog:
> 2019-11-04  Andre Vieira  <andre.simoesdiasvieira@arm.com>
> 
>         * tree-vect-loop.c (vect_analyze_loop): Disable epilogue
>         vectorization if loop->simduid is non null.
> 
> On 31/10/2019 16:58, Jakub Jelinek wrote:
> 
> > FAIL: libgomp.c/../libgomp.c-c++-common/loop-1.c execution test
> > FAIL: libgomp.c/examples-4/simd-3.c execution test
> > FAIL: libgomp.c/pr58392.c execution test
> > FAIL: libgomp.c/scan-13.c execution test
> > FAIL: libgomp.c/scan-17.c execution test
> > FAIL: libgomp.c/scan-19.c execution test
> > FAIL: libgomp.c/scan-20.c execution test
> > FAIL: libgomp.c/simd-10.c execution test
> > FAIL: libgomp.c/simd-12.c execution test
> > FAIL: libgomp.c/simd-13.c execution test
> > FAIL: libgomp.c/simd-6.c execution test
> > FAIL: libgomp.c++/../libgomp.c-c++-common/loop-1.c execution test
> > FAIL: libgomp.c++/simd-8.C execution test
> > FAIL: libgomp.fortran/examples-4/simd-3.f90   -O1  execution test
> > FAIL: libgomp.fortran/examples-4/simd-3.f90   -O2  execution test
> > FAIL: libgomp.fortran/examples-4/simd-3.f90   -O3 -fomit-frame-pointer
> > FAIL: -funroll-loops -fpeel-loops -ftracer -finline-functions  execution
> > FAIL: test
> > FAIL: libgomp.fortran/examples-4/simd-3.f90   -O3 -g  execution test
> > FAIL: libgomp.fortran/examples-4/simd-3.f90   -Os  execution test
> > FAIL: libgomp.fortran/nestedfn5.f90   -O1  execution test
> > FAIL: libgomp.fortran/nestedfn5.f90   -O2  execution test
> > FAIL: libgomp.fortran/nestedfn5.f90   -O3 -fomit-frame-pointer
> > FAIL: -funroll-loops -fpeel-loops -ftracer -finline-functions  execution
> > FAIL: test
> > FAIL: libgomp.fortran/nestedfn5.f90   -O3 -g  execution test
> > FAIL: libgomp.fortran/nestedfn5.f90   -Os  execution test
> 
> These should go away now, but we should revisit SIMDUID and epilogue
> vectorization later.  I tried to look into it, but I am afraid I know very
> little about SIMD loops to figure out how to make this work.
> > 
> > On i686-linux, I also see newly
> > FAIL: gcc.dg/vect/vect-epilogues.c -flto -ffat-lto-objects  scan-tree-dump
> > FAIL: vect "LOOP EPILOGUE VECTORIZED"
> > FAIL: gcc.dg/vect/vect-epilogues.c scan-tree-dump vect "LOOP EPILOGUE
> > FAIL: VECTORIZED"
> > and in libgomp just
> 
> These, just like for arm should be skipped for i686, I suspect it doesn't know
> how to vectorize for lower VF's.  Could someone add the appropriate skip
> target triple for i686?
> 
> > FAIL: libgomp.c/examples-4/simd-3.c execution test
> > FAIL: libgomp.c/scan-13.c execution test
> > FAIL: libgomp.c/scan-17.c execution test
> > FAIL: libgomp.fortran/examples-4/simd-3.f90   -O1  execution test
> > FAIL: libgomp.fortran/examples-4/simd-3.f90   -O2  execution test
> > FAIL: libgomp.fortran/examples-4/simd-3.f90   -O3 -fomit-frame-pointer
> > FAIL: -funroll-loops -fpeel-loops -ftracer -finline-functions  execution
> > FAIL: test
> > FAIL: libgomp.fortran/examples-4/simd-3.f90   -O3 -g  execution test
> > FAIL: libgomp.fortran/examples-4/simd-3.f90   -Os  execution test
> 
> Same as the other libgomp tests. Should go away now.
> 
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)


More information about the Gcc-patches mailing list