Re: How do I run SIMD Testcases on PPC64?
‐‐‐ Original Message ‐‐‐ On Thursday, March 5, 2020 6:59 PM, Segher Boessenkool wrote: > On Thu, Mar 05, 2020 at 05:04:16PM +, GT wrote: > > > At the top of that file is dejagnu directive: > > /* { dg-require-effective-target vect_int } */ > > > > 1. How do I check to see if vect_int is defined? I suspect it as the reason > > the test isn't run. > > > > https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/testsuite/lib/target-supports.exp;h=ca3895c22690dc15b6c2beffb53ea6f39ad80b38;hb=HEAD#l3258 > > (It is always true for powerpc, since we no longer support the > linuxpaired target). > > You can look in the generated gcc.log, and if what you are looking for > isn't there, you can pass --debug to runtest as well, and look in the > relevant dbg.log . But first look in target-supports.exp if it is > something trivial ;-) Thanks. target-supports.exp needed to set vect_simd_clones for the PPC64 system we are adding support for. After that change, results of < make check RUNTESTFLAGS="vect.exp=*simd*" > improve. Prior to change: 36 tests come back as UNSUPPORTED. Post change: There are no longer any UNSUPPORTED. However, 16 tests now FAIL. Line 8070 in gcc/expr.c is causing ICE. The assertion is 'gcc_assert (MEM_P (result))'. Just above it is a comment explaining the assertion's failure as being either a front-end bug or a tree optimizer bug. The bug being failure to mark a DECL as TREE_ADDRESSABLE. I am attempting to compare results in gdb sessions: the first on an x86_64 system where a SIMD testcase passes, the 2nd on a PPC64 system where the same testcase fails. I'm looking to identify the point at which the implementations diverge. It's been a slog so far. Does anyone have a better idea of how to proceed? Perhaps the comment explaining the assertion is less cryptic to you? Bert.
Re: How do I run SIMD Testcases on PPC64?
‐‐‐ Original Message ‐‐‐ On Thursday, March 5, 2020 6:59 PM, Segher Boessenkool wrote: > On Thu, Mar 05, 2020 at 05:04:16PM +, GT wrote: > > > At the top of that file is dejagnu directive: > > /* { dg-require-effective-target vect_int } */ > > > > 1. How do I check to see if vect_int is defined? I suspect it as the reason > > the test isn't run. > > > > https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/testsuite/lib/target-supports.exp;h=ca3895c22690dc15b6c2beffb53ea6f39ad80b38;hb=HEAD#l3258 > > (It is always true for powerpc, since we no longer support the > linuxpaired target). > > You can look in the generated gcc.log, and if what you are looking for > isn't there, you can pass --debug to runtest as well, and look in the > relevant dbg.log . But first look in target-supports.exp if it is > something trivial ;-) > Thanks. target-supports.exp needed to set vect_simd_clones for the PPC64 system we are adding support for. After that change, results of < make check RUNTESTFLAGS="vect.exp=*simd*" > improve. Prior to change: 36 tests come back as UNSUPPORTED. Post change: There are no longer any UNSUPPORTED. However, 16 tests now FAIL. 20 now PASS. Progress, I believe. Line 8070 in gcc/expr.c is causing ICE. The assertion is 'gcc_assert (MEM_P (result))'. Just above it is a comment explaining the assertion's failure as being either a front-end bug or a tree optimizer bug. The bug being failure to mark a DECL as TREE_ADDRESSABLE. I am attempting to compare results in gdb sessions: the first on an x86_64 system where a SIMD testcase passes, the 2nd on a PPC64 system where the same testcase fails. I'm looking to identify the point at which the implementations diverge. It's been a slog so far. Does anyone have a better idea of how to proceed? Perhaps that comment explaining the assertion is more suggestive of where to look than I understand? Bert.
Re: How do I run SIMD Testcases on PPC64?
‐‐‐ Original Message ‐‐‐ On Thursday, March 5, 2020 6:59 PM, Segher Boessenkool wrote: > On Thu, Mar 05, 2020 at 05:04:16PM +, GT wrote: > > > 2. Multiple other testcases in testsuite/gcc.dg/vect/ have this line at > > the top: > > /* { dg-additional-options "-mavx" { target avx_runtime } } */ > > An example is vect-simd-16.c > > > > > > 2.1 Should not these testcases be in directory testsuite/gcc.target/i386/ ? > > 2.2 To run vect-simd-16.c on PPC64, is it enough to put a copy of the file > > in testsuite/gcc.target/powerpc/ ? (After modifying target appropriately.) > > > It certainly would be nice if generic tests did not often have target- > specific stuff in them. In this case, it could be hidden in vect.exp, > perhaps? I got all the tests from RUNTESTFLAGS="vect.exp=*simd*" to PASS. The ICE errors I was getting came from simdlen clauses of #pragma omp declare simd directives. The vectorization code currently assumes that simdlen(n) is always valid and does not check whether the hardware supports n vectors. The tests assume a 256-bit wide vector unit. VSX width is 128-bit and hence the failures. We need to selectively change the simdlen clauses depending on the target on which the tests are being run. The typical test which needs this feature is gcc/testsuite/gcc.dg/vect/vect-simd-clone-1.c. Should I conditionally select #pragma omp directives using #ifdefs in the source files? Or is there a dejagnu feature which is preferred? Bert.