Add support to run auto-vectorization tests for multiple effective targets.
gcc/testsuite/ * g++.dg/vect/vect.exp: Add and set new global EFFECTIVE_TARGETS. Call g++-dg-runtest via et-dg-runtest. * gcc.dg/graphite/graphite.exp: Likewise, but for dg-runtest. * gcc.dg/vect/vect.exp: Likewise. * gfortran.dg/graphite/graphite.exp: Likewise, but for gfortran-dg-runtest. * gfortran.dg/vect/vect.exp: Likewise. * lib/target-supports.exp (check_mpaired_single_hw_available): New. (check_mips_loongson_hw_available): Likewise. (check_effective_target_mpaired_single_runtime): Likewise. (check_effective_target_mips_loongson_runtime): Likewise. (add_options_for_mpaired_single): Likewise. (check_effective_target_vect_int): Add global et_index. Check and save the supported feature for a target selected by the et_index target. Break long lines where appropriate. Call et-is-effective-target for MIPS with an argument instead of check_effective_target_* where appropriate. (check_effective_target_vect_intfloat_cvt): Likewise. (check_effective_target_vect_uintfloat_cvt): Likewise. (check_effective_target_vect_floatint_cvt): Likewise. (check_effective_target_vect_floatuint_cvt): Likewise. (check_effective_target_vect_simd_clones): Likewise. (check_effective_target_vect_shift): ewise. (check_effective_target_whole_vector_shift): Likewise. (check_effective_target_vect_bswap): Likewise. (check_effective_target_vect_shift_char): Likewise. (check_effective_target_vect_long): Likewise. (check_effective_target_vect_float): Likewise. (check_effective_target_vect_double): Likewise. (check_effective_target_vect_long_long): Likewise. (check_effective_target_vect_no_int_max): Likewise. (check_effective_target_vect_no_int_add): Likewise. (check_effective_target_vect_no_bitwise): Likewise. (check_effective_target_vect_widen_shift): Likewise. (check_effective_target_vect_no_align): Likewise. (check_effective_target_vect_hw_misalign): Likewise. (check_effective_target_vect_element_align): Likewise. (check_effective_target_vect_condition): Likewise. (check_effective_target_vect_cond_mixed): Likewise. (check_effective_target_vect_char_mult): Likewise. (check_effective_target_vect_short_mult): Likewise. (check_effective_target_vect_int_mult): Likewise. (check_effective_target_vect_extract_even_odd): Likewise. (check_effective_target_vect_interleave): Likewise. (check_effective_target_vect_stridedN): Likewise. (check_effective_target_vect_multiple_sizes): Likewise. (check_effective_target_vect64): Likewise. (check_effective_target_vect_call_copysignf): Likewise. (check_effective_target_vect_call_sqrtf): Likewise. (check_effective_target_vect_call_btrunc): Likewise. (check_effective_target_vect_call_btruncf): Likewise. (check_effective_target_vect_call_ceil): Likewise. (check_effective_target_vect_call_ceilf): Likewise. (check_effective_target_vect_call_floor): Likewise. (check_effective_target_vect_call_floorf): Likewise. (check_effective_target_vect_call_lceil): Likewise. (check_effective_target_vect_call_lfloor): Likewise. (check_effective_target_vect_call_nearbyint): Likewise. (check_effective_target_vect_call_nearbyintf): Likewise. (check_effective_target_vect_call_round): Likewise. (check_effective_target_vect_call_roundf): Likewise. (check_effective_target_vect_perm): Likewise, but also append *_saved to the existing global name to properly cache the result. (check_effective_target_vect_perm_byte): Likewise. (check_effective_target_vect_perm_short): Likewise. (check_effective_target_vect_widen_sum_hi_to_si_pattern): Likewise. (check_effective_target_vect_widen_sum_hi_to_si): Likewise. (check_effective_target_vect_widen_sum_qi_to_hi): Likewise. (check_effective_target_vect_widen_sum_qi_to_si): Likewise. (check_effective_target_vect_widen_mult_qi_to_hi_pattern): Likewise. (check_effective_target_vect_widen_mult_qi_to_hi): Likewise. (check_effective_target_vect_widen_mult_hi_to_si_pattern): Likewise. (check_effective_target_vect_widen_mult_si_to_di_pattern): Likewise. (check_effective_target_vect_sdot_qi): Likewise. (check_effective_target_vect_udot_qi): Likewise. (check_effective_target_vect_sdot_hi): Likewise. (check_effective_target_vect_udot_hi): Likewise. (check_effective_target_vect_usad_char): Likewise. (check_effective_target_vect_pack_trunc): Likewise. (check_effective_target_vect_unpack): Likewise. (check_effective_target_vect_aligned_arrays): Likewise. (check_effective_target_vect_natural_alignment): Likewise. (check_effective_target_vector_alignment_reachable): Likewise. (check_effective_target_vector_alignment_reachable_for_64bit): Likewise. (is-effective-target): Initialize et_index if undefined. (et-dg-runtest): New. (et-is-effective-target): Likewise. (check_vect_support_and_set_flags): Add supported MIPS targets to EFFECTIVE_TARGETS list. Return the number of supported targets. From-SVN: r238755
This commit is contained in:
parent
8f63caf682
commit
9b7937cf8a
|
@ -1,3 +1,95 @@
|
|||
2016-07-26 Robert Suchanek <robert.suchanek@imgtec.com>
|
||||
|
||||
* g++.dg/vect/vect.exp: Add and set new global EFFECTIVE_TARGETS. Call
|
||||
g++-dg-runtest via et-dg-runtest.
|
||||
* gcc.dg/graphite/graphite.exp: Likewise, but for dg-runtest.
|
||||
* gcc.dg/vect/vect.exp: Likewise.
|
||||
* gfortran.dg/graphite/graphite.exp: Likewise, but for
|
||||
gfortran-dg-runtest.
|
||||
* gfortran.dg/vect/vect.exp: Likewise.
|
||||
* lib/target-supports.exp (check_mpaired_single_hw_available): New.
|
||||
(check_mips_loongson_hw_available): Likewise.
|
||||
(check_effective_target_mpaired_single_runtime): Likewise.
|
||||
(check_effective_target_mips_loongson_runtime): Likewise.
|
||||
(add_options_for_mpaired_single): Likewise.
|
||||
(check_effective_target_vect_int): Add global et_index.
|
||||
Check and save the supported feature for a target selected by
|
||||
the et_index target. Break long lines where appropriate. Call
|
||||
et-is-effective-target for MIPS with an argument instead of
|
||||
check_effective_target_* where appropriate.
|
||||
(check_effective_target_vect_intfloat_cvt): Likewise.
|
||||
(check_effective_target_vect_uintfloat_cvt): Likewise.
|
||||
(check_effective_target_vect_floatint_cvt): Likewise.
|
||||
(check_effective_target_vect_floatuint_cvt): Likewise.
|
||||
(check_effective_target_vect_simd_clones): Likewise.
|
||||
(check_effective_target_vect_shift): ewise.
|
||||
(check_effective_target_whole_vector_shift): Likewise.
|
||||
(check_effective_target_vect_bswap): Likewise.
|
||||
(check_effective_target_vect_shift_char): Likewise.
|
||||
(check_effective_target_vect_long): Likewise.
|
||||
(check_effective_target_vect_float): Likewise.
|
||||
(check_effective_target_vect_double): Likewise.
|
||||
(check_effective_target_vect_long_long): Likewise.
|
||||
(check_effective_target_vect_no_int_max): Likewise.
|
||||
(check_effective_target_vect_no_int_add): Likewise.
|
||||
(check_effective_target_vect_no_bitwise): Likewise.
|
||||
(check_effective_target_vect_widen_shift): Likewise.
|
||||
(check_effective_target_vect_no_align): Likewise.
|
||||
(check_effective_target_vect_hw_misalign): Likewise.
|
||||
(check_effective_target_vect_element_align): Likewise.
|
||||
(check_effective_target_vect_condition): Likewise.
|
||||
(check_effective_target_vect_cond_mixed): Likewise.
|
||||
(check_effective_target_vect_char_mult): Likewise.
|
||||
(check_effective_target_vect_short_mult): Likewise.
|
||||
(check_effective_target_vect_int_mult): Likewise.
|
||||
(check_effective_target_vect_extract_even_odd): Likewise.
|
||||
(check_effective_target_vect_interleave): Likewise.
|
||||
(check_effective_target_vect_stridedN): Likewise.
|
||||
(check_effective_target_vect_multiple_sizes): Likewise.
|
||||
(check_effective_target_vect64): Likewise.
|
||||
(check_effective_target_vect_call_copysignf): Likewise.
|
||||
(check_effective_target_vect_call_sqrtf): Likewise.
|
||||
(check_effective_target_vect_call_btrunc): Likewise.
|
||||
(check_effective_target_vect_call_btruncf): Likewise.
|
||||
(check_effective_target_vect_call_ceil): Likewise.
|
||||
(check_effective_target_vect_call_ceilf): Likewise.
|
||||
(check_effective_target_vect_call_floor): Likewise.
|
||||
(check_effective_target_vect_call_floorf): Likewise.
|
||||
(check_effective_target_vect_call_lceil): Likewise.
|
||||
(check_effective_target_vect_call_lfloor): Likewise.
|
||||
(check_effective_target_vect_call_nearbyint): Likewise.
|
||||
(check_effective_target_vect_call_nearbyintf): Likewise.
|
||||
(check_effective_target_vect_call_round): Likewise.
|
||||
(check_effective_target_vect_call_roundf): Likewise.
|
||||
(check_effective_target_vect_perm): Likewise, but also append *_saved
|
||||
to the existing global name to properly cache the result.
|
||||
(check_effective_target_vect_perm_byte): Likewise.
|
||||
(check_effective_target_vect_perm_short): Likewise.
|
||||
(check_effective_target_vect_widen_sum_hi_to_si_pattern): Likewise.
|
||||
(check_effective_target_vect_widen_sum_hi_to_si): Likewise.
|
||||
(check_effective_target_vect_widen_sum_qi_to_hi): Likewise.
|
||||
(check_effective_target_vect_widen_sum_qi_to_si): Likewise.
|
||||
(check_effective_target_vect_widen_mult_qi_to_hi_pattern): Likewise.
|
||||
(check_effective_target_vect_widen_mult_qi_to_hi): Likewise.
|
||||
(check_effective_target_vect_widen_mult_hi_to_si_pattern): Likewise.
|
||||
(check_effective_target_vect_widen_mult_si_to_di_pattern): Likewise.
|
||||
(check_effective_target_vect_sdot_qi): Likewise.
|
||||
(check_effective_target_vect_udot_qi): Likewise.
|
||||
(check_effective_target_vect_sdot_hi): Likewise.
|
||||
(check_effective_target_vect_udot_hi): Likewise.
|
||||
(check_effective_target_vect_usad_char): Likewise.
|
||||
(check_effective_target_vect_pack_trunc): Likewise.
|
||||
(check_effective_target_vect_unpack): Likewise.
|
||||
(check_effective_target_vect_aligned_arrays): Likewise.
|
||||
(check_effective_target_vect_natural_alignment): Likewise.
|
||||
(check_effective_target_vector_alignment_reachable): Likewise.
|
||||
(check_effective_target_vector_alignment_reachable_for_64bit): Likewise.
|
||||
(is-effective-target): Initialize et_index if undefined.
|
||||
(et-dg-runtest): New.
|
||||
(et-is-effective-target): Likewise.
|
||||
(check_vect_support_and_set_flags): Add supported MIPS targets to
|
||||
EFFECTIVE_TARGETS list. Return the number of supported targets.
|
||||
|
||||
2016-07-26 Richard Biener <rguenther@suse.de>
|
||||
Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
|
||||
|
||||
|
|
|
@ -39,6 +39,11 @@ set save-dg-do-what-default ${dg-do-what-default}
|
|||
global DEFAULT_VECTCFLAGS
|
||||
set DEFAULT_VECTCFLAGS ""
|
||||
|
||||
# Set up a list of effective targets to run vector tests for all supported
|
||||
# targets.
|
||||
global EFFECTIVE_TARGETS
|
||||
set EFFECTIVE_TARGETS ""
|
||||
|
||||
# These flags are used for all targets.
|
||||
lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fno-vect-cost-model"
|
||||
|
||||
|
@ -58,10 +63,10 @@ lappend VECT_SLP_CFLAGS "-fdump-tree-slp-details"
|
|||
dg-init
|
||||
|
||||
# Main loop.
|
||||
g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/{pr,simd}*.{c,cc,S} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-pr*.{c,cc,S} ]] \
|
||||
"" $VECT_SLP_CFLAGS
|
||||
et-dg-runtest g++-dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/{pr,simd}*.{c,cc,S} ]] "" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest g++-dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/slp-pr*.{c,cc,S} ]] "" $VECT_SLP_CFLAGS
|
||||
|
||||
#### Tests with special options
|
||||
global SAVED_DEFAULT_VECTCFLAGS
|
||||
|
@ -70,8 +75,8 @@ set SAVED_DEFAULT_VECTCFLAGS $DEFAULT_VECTCFLAGS
|
|||
# --param max-aliased-vops=0
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "--param max-aliased-vops=0"
|
||||
g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/param-max-aliased*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest g++-dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/param-max-aliased*.\[cS\]]] "" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# Clean up.
|
||||
set dg-do-what-default ${save-dg-do-what-default}
|
||||
|
|
|
@ -37,6 +37,11 @@ set save-dg-do-what-default ${dg-do-what-default}
|
|||
# Initialize `dg'.
|
||||
dg-init
|
||||
|
||||
# Set up a list of effective targets to run vector tests for all supported
|
||||
# targets.
|
||||
global EFFECTIVE_TARGETS
|
||||
set EFFECTIVE_TARGETS ""
|
||||
|
||||
set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.c ] ]
|
||||
set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.c ] ]
|
||||
set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.c ] ]
|
||||
|
@ -69,7 +74,7 @@ global DEFAULT_VECTCFLAGS
|
|||
set DEFAULT_VECTCFLAGS "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -ffast-math"
|
||||
|
||||
if [check_vect_support_and_set_flags] {
|
||||
dg-runtest $vect_files "" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest $vect_files "" $DEFAULT_VECTCFLAGS
|
||||
}
|
||||
|
||||
# The default action for the rest of the files is 'compile'.
|
||||
|
|
|
@ -24,6 +24,11 @@ load_lib clearcap.exp
|
|||
global DEFAULT_VECTCFLAGS
|
||||
set DEFAULT_VECTCFLAGS ""
|
||||
|
||||
# Set up a list of effective targets to run vector tests for all supported
|
||||
# targets.
|
||||
global EFFECTIVE_TARGETS
|
||||
set EFFECTIVE_TARGETS ""
|
||||
|
||||
# If the target system supports vector instructions, the default action
|
||||
# for a test is 'run', otherwise it's 'compile'. Save current default.
|
||||
# Executing vector instructions on a system without hardware vector support
|
||||
|
@ -62,13 +67,15 @@ lappend O_VECTCFLAGS "-fdump-tree-vect-details"
|
|||
lappend DEFAULT_VECTCFLAGS "-O2"
|
||||
|
||||
# Tests that should be run without generating dump info
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/nodump-*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/nodump-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# "-O -fdump-tree-veclower2"
|
||||
lappend VEC_FLAGS "-O" "-fdump-tree-veclower2"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vec-scal-*.\[cS\]]] \
|
||||
"" $VEC_FLAGS
|
||||
et-dg-runtest dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/vec-scal-*.\[cS\]]] \
|
||||
"" $VEC_FLAGS
|
||||
|
||||
set VECT_SLP_CFLAGS $DEFAULT_VECTCFLAGS
|
||||
|
||||
|
@ -81,14 +88,18 @@ if { [check_effective_target_lto] } {
|
|||
lappend VECT_ADDITIONAL_FLAGS "-flto -ffat-lto-objects"
|
||||
}
|
||||
foreach flags $VECT_ADDITIONAL_FLAGS {
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]] \
|
||||
$flags $DEFAULT_VECTCFLAGS
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]] \
|
||||
$flags $DEFAULT_VECTCFLAGS
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]] \
|
||||
$flags $DEFAULT_VECTCFLAGS
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]] \
|
||||
$flags $VECT_SLP_CFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]] \
|
||||
$flags $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]] \
|
||||
$flags $VECT_SLP_CFLAGS
|
||||
}
|
||||
|
||||
#### Tests with special options
|
||||
|
@ -99,141 +110,164 @@ set SAVED_VECT_SLP_CFLAGS $VECT_SLP_CFLAGS
|
|||
# --param vect-max-version-for-alias-checks=0 tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "--param" "vect-max-version-for-alias-checks=0"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-vfa-*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-vfa-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -ffast-math tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-ffast-math"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/fast-math-\[ipsv\]*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/fast-math-\[ipsv\]*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -ffast-math SLP tests
|
||||
set VECT_SLP_CFLAGS $SAVED_VECT_SLP_CFLAGS
|
||||
lappend VECT_SLP_CFLAGS "-ffast-math"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/fast-math-bb-slp-*.\[cS\]]] \
|
||||
"" $VECT_SLP_CFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/fast-math-bb-slp-*.\[cS\]]] \
|
||||
"" $VECT_SLP_CFLAGS
|
||||
|
||||
# -fno-fast-math tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-fast-math"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-fast-math-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-fast-math-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-math-errno tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-math-errno"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-math-errno-*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-math-errno-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fwrapv tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fwrapv"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/wrapv-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/wrapv-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -ftrapv tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-ftrapv"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/trapv-*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/trapv-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-tree-dce tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-tree-dce"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-tree-dce-*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-tree-dce-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fsection-anchors tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fsection-anchors"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/section-anchors-*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/section-anchors-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# alignment-sensitive -fsection-anchors tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fsection-anchors" \
|
||||
"-fdump-ipa-increase_alignment-details"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/aligned-section-anchors-*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/aligned-section-anchors-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-section-anchors tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-section-anchors"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-section-anchors-*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-section-anchors-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -funswitch-loops tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-funswitch-loops"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/unswitch-loops-*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/unswitch-loops-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-trapping-math tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-trapping-math"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-trapping-math-*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-trapping-math-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-tree-scev-cprop
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-tree-scev-cprop"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-scevccp-vect-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-scevccp-vect-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-tree-scev-cprop
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-tree-scev-cprop"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-scevccp-pr*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-scevccp-pr*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-tree-scev-cprop
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-tree-scev-cprop"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-scevccp-outer-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-scevccp-outer-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-tree-scev-cprop -fno-tree-reassoc
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-tree-scev-cprop" "-fno-tree-reassoc"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-scevccp-noreassoc-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-scevccp-noreassoc-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-tree-scev-cprop
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-tree-scev-cprop"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-scevccp-slp-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-scevccp-slp-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-tree-dominator-opts
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-tree-dominator-opts"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-tree-dom-*.\[cS\]]] \
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-tree-dom-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-tree-pre
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-tree-pre"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-tree-pre-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-tree-pre-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# With -Os
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-Os"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/Os-vect-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/Os-vect-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# With --param ggc-min-expand=0 --param ggc-min-heapsize=0
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "--param" "ggc-min-expand=0" "--param" "ggc-min-heapsize=0"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/ggc-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/ggc-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -ftree-loop-if-convert-stores
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-ftree-loop-if-convert-stores"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/if-cvt-stores-vect-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/if-cvt-stores-vect-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# With -O3.
|
||||
# Don't allow IPA cloning, because it throws our counts out of whack.
|
||||
|
@ -242,40 +276,48 @@ lappend DEFAULT_VECTCFLAGS "-O3" "-fno-ipa-cp-clone"
|
|||
if [istarget "spu-*-*"] {
|
||||
lappend DEFAULT_VECTCFLAGS "-funroll-loops"
|
||||
}
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O3-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/O3-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# With -O1
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O1-*.\[cS\]]] \
|
||||
"" $O1_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/O1-*.\[cS\]]] \
|
||||
"" $O1_VECTCFLAGS
|
||||
|
||||
# With -O
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O-*.\[cS\]]] \
|
||||
"" $O_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/O-*.\[cS\]]] \
|
||||
"" $O_VECTCFLAGS
|
||||
|
||||
# -fno-tree-reassoc
|
||||
set VECT_SLP_CFLAGS $SAVED_VECT_SLP_CFLAGS
|
||||
lappend VECT_SLP_CFLAGS "-fno-tree-reassoc"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-tree-reassoc-bb-slp-*.\[cS\]]] \
|
||||
"" $VECT_SLP_CFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-tree-reassoc-bb-slp-*.\[cS\]]] \
|
||||
"" $VECT_SLP_CFLAGS
|
||||
|
||||
# -fno-tree-fre
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-tree-fre"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-tree-fre-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-tree-fre-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-tree-fre -fno-tree-pre
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-tree-fre" "-fno-tree-pre"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-fre-pre*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-fre-pre*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-tree-sra
|
||||
set VECT_SLP_CFLAGS $SAVED_VECT_SLP_CFLAGS
|
||||
lappend VECT_SLP_CFLAGS "-fno-tree-sra"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-tree-sra-bb-slp-*.\[cS\]]] \
|
||||
"" $VECT_SLP_CFLAGS
|
||||
et-dg-runtest dg-runtest [lsort \
|
||||
[glob -nocomplain $srcdir/$subdir/no-tree-sra-bb-slp-*.\[cS\]]] \
|
||||
"" $VECT_SLP_CFLAGS
|
||||
|
||||
|
||||
# Clean up.
|
||||
|
|
|
@ -51,9 +51,15 @@ gfortran-dg-runtest $scop_files "" "-O2 -fgraphite -fdump-tree-graphite-a
|
|||
gfortran-dg-runtest $id_files "" "-O2 -fgraphite-identity -ffast-math"
|
||||
gfortran-dg-runtest $opt_files "" "-O2 -floop-nest-optimize -ffast-math -fdump-tree-graphite-all"
|
||||
|
||||
# Set up a list of effective targets to run vector tests for all supported
|
||||
# targets.
|
||||
global EFFECTIVE_TARGETS
|
||||
set EFFECTIVE_TARGETS ""
|
||||
|
||||
# Vectorizer tests, to be run or compiled, depending on target capabilities.
|
||||
if [check_vect_support_and_set_flags] {
|
||||
gfortran-dg-runtest $vect_files "" "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -ffast-math"
|
||||
et-dg-runtest gfortran-dg-runtest $vect_files "" \
|
||||
"-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -ffast-math"
|
||||
}
|
||||
|
||||
# Tests to be run.
|
||||
|
|
|
@ -24,6 +24,11 @@ load_lib target-supports.exp
|
|||
global DEFAULT_VECTCFLAGS
|
||||
set DEFAULT_VECTCFLAGS ""
|
||||
|
||||
# Set up a list of effective targets to run vector tests for all supported
|
||||
# targets.
|
||||
global EFFECTIVE_TARGETS
|
||||
set EFFECTIVE_TARGETS ""
|
||||
|
||||
# These flags are used for all targets.
|
||||
lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fvect-cost-model=unlimited" \
|
||||
"-fdump-tree-vect-details"
|
||||
|
@ -47,8 +52,10 @@ if ![check_vect_support_and_set_flags] {
|
|||
dg-init
|
||||
|
||||
# Main loop.
|
||||
gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[fF\]{,90,95,03,08} ]] "" $DEFAULT_VECTCFLAGS
|
||||
gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[fF\]{,90,95,03,08} ]] "" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest gfortran-dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/vect-*.\[fF\]{,90,95,03,08} ]] "" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest gfortran-dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/pr*.\[fF\]{,90,95,03,08} ]] "" $DEFAULT_VECTCFLAGS
|
||||
|
||||
#### Tests with special options
|
||||
global SAVED_DEFAULT_VECTCFLAGS
|
||||
|
@ -57,44 +64,51 @@ set SAVED_DEFAULT_VECTCFLAGS $DEFAULT_VECTCFLAGS
|
|||
# -ffast-math tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-ffast-math"
|
||||
gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/fast-math-*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest gfortran-dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/fast-math-*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -ffast-math tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-ffast-math" "-fdefault-real-8"
|
||||
gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/fast-math-real8*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest gfortran-dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/fast-math-real8*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fvect-cost-model tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fvect-cost-model=dynamic"
|
||||
gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/cost-model-*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest gfortran-dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/cost-model-*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# --param vect-max-version-for-alias-checks=0 tests
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "--param" "vect-max-version-for-alias-checks=0"
|
||||
gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-vfa-*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest gfortran-dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/no-vfa-*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# With -O3
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-O3"
|
||||
gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O3-*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest gfortran-dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/O3-*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# With -Ofast
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-Ofast"
|
||||
gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/Ofast-*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest gfortran-dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/Ofast-*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# With -fno-tree-copy-prop -fno-tree-fre -O3
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-tree-copy-prop" "-fno-tree-fre" "-O3"
|
||||
gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-fre-no-copy-prop-O3-*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
et-dg-runtest gfortran-dg-runtest [lsort [glob -nocomplain \
|
||||
$srcdir/$subdir/no-fre-no-copy-prop-O3-*.\[fF\]{,90,95,03,08} ]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# Clean up.
|
||||
set dg-do-what-default ${save-dg-do-what-default}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue