This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Fri, Jul 23, 2010 at 8:18 AM, Uros Bizjak <ubizjak@gmail.com> wrote: >>>> -# Return 1 if avx instructions can be compiled. >>>> +# Return 1 if avx instructions can be compiled and run. >>> >>> The corresponding sse/sse2 effective-target tests used separate sse and >>> sse_runtime. ?AVX should be the same for symmetry. >> >> check_effective_target_avx is used on runtime tests. >> >> /* { dg-do run } */ >> /* { dg-require-effective-target avx } */ >> >> -- >> /* { dg-do run } */ >> /* { dg-require-effective-target avx } */ >> /* { dg-require-effective-target avx-runt-time } */ >> -- >> >> is redundant. > > No, it isn't. > > "dg-require-effective-target avx" means that the toolchain can compile > avx assembly, so executable can be produced. > "dg-require-effective-target avx-runtime" means that the OS can run > produced executable. OTOH, we _can_ add check_effective_target_* to check_effective_target_*_runtime, since we obviously need toolchain support for runtime tests. However, putting everything together the way you did was a bad approach. We still need separate check for toolchain support. Think about LTO tests. Please note that compile tests don't need effective-target check. Attached patch implements all this and changes all tests outside gcc.target/i386 directory to new syntax. 2010-06-22 Uros Bizjak <ubizjak@gmail.com> * lib/target-supports.exp (check_avx_hw_available): New procedure. (check_effective_target_avx_runtime): New procedure. (check_effective_target_sse2_runtime): Add check_effective_target_sse2. (check_effective_target_sse_runtime): Add check_effective_target_sse. * gcc.dg/compat/pr38736_main.c: Use avx_runtime effective target. * gcc.dg/compat/vector-1b_main.c: Ditto. Remove cpuid.h include and __get_cpuid test. * gcc.dg/compat/vector-2b_main.c: Ditto. * gcc.target/i386/avx-check.h (main): Also check bit_OSXSAVE. * gcc.dg/20020418-1.c: Do not require sse2 effective target for compile-time only test. * gcc.dg/pr32716.c: Ditto. * gcc.dg/pr34856.c: Ditto. * gcc.dg/pr36997.c: Ditto. * gcc.dg/prefetch-loop-arrays-1.c: Ditto. * gfortran.dg/pr28158.f90: Ditto. * gfortran.dg/pr30667.f: Ditto. * gcc.dg/vect/vect.exp: Use check_effective_target_sse2_runtime for i?86-*-* and x86_64-*-* targets to disable execution on targets without sse2 runtime support. * g++.dg/vect/vect.exp: Ditto. * gfortran.dg/vect/vect.exp: Ditto. * gcc.dg/pr36584.c: Remove now redundant sse2 effective target check. * gcc.dg/pr37544.c: Ditto. * gcc.dg/pr40550.c: Ditto. * gcc.dg/compat/union-m128-1_main.c: Ditto. * gcc.dg/compat/vector-1a_main.c: Ditto. * gcc.dg/compat/vector-2a_main.c: Ditto. * gcc.dg/torture/pr16104-1.c: Ditto. * gcc.dg/torture/pr35771-1.c: Ditto. * gcc.dg/torture/pr35771-2.c: Ditto. * gcc.dg/torture/pr35771-3.c: Ditto. * gcc.dg/torture/stackalign/alloca-2.c: Ditto. * gcc.dg/torture/stackalign/alloca-3.c: Ditto. * gcc.dg/torture/stackalign/push-1.c: Ditto. * gcc.dg/torture/stackalign/vararg-3.c: Ditto. * g++.dg/other/pr40446.C: Ditto. * g++.dg/other/i386-1.C: Ditto. Patch is currently in testing, will be committed as soon as tests finish. Uros.
Attachment:
p.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |