diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 131 |
2 files changed, 106 insertions, 29 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6401706..72cf8c3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-09-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + + * lib/target-supports.exp: Enable tests for S/390. + 2017-09-26 Richard Biener <rguenther@suse.de> PR tree-optimization/82320 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 7834c30..8b25797 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3066,7 +3066,9 @@ proc check_effective_target_vect_int { } { || [is-effective-target arm_neon] || ([istarget mips*-*-*] && ([et-is-effective-target mips_loongson] - || [et-is-effective-target mips_msa])) } { + || [et-is-effective-target mips_msa])) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_int_saved($et_index) 1 } } @@ -5069,7 +5071,9 @@ proc check_effective_target_vect_shift { } { || [is-effective-target arm_neon] || ([istarget mips*-*-*] && ([et-is-effective-target mips_msa] - || [et-is-effective-target mips_loongson])) } { + || [et-is-effective-target mips_loongson])) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_shift_saved($et_index) 1 } } @@ -5087,7 +5091,9 @@ proc check_effective_target_whole_vector_shift { } { || ([is-effective-target arm_neon] && [check_effective_target_arm_little_endian]) || ([istarget mips*-*-*] - && [et-is-effective-target mips_loongson]) } { + && [et-is-effective-target mips_loongson]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set answer 1 } else { set answer 0 @@ -5133,7 +5139,9 @@ proc check_effective_target_vect_shift_char { } { && ![istarget powerpc-*-linux*paired*]) || [is-effective-target arm_neon] || ([istarget mips*-*-*] - && [et-is-effective-target mips_msa]) } { + && [et-is-effective-target mips_msa]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_shift_char_saved($et_index) 1 } } @@ -5156,7 +5164,9 @@ proc check_effective_target_vect_long { } { || ([istarget sparc*-*-*] && [check_effective_target_ilp32]) || [istarget aarch64*-*-*] || ([istarget mips*-*-*] - && [et-is-effective-target mips_msa]) } { + && [et-is-effective-target mips_msa]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set answer 1 } else { set answer 0 @@ -5219,7 +5229,9 @@ proc check_effective_target_vect_double { } { || [istarget spu-*-*] || ([istarget powerpc*-*-*] && [check_vsx_hw_available]) || ([istarget mips*-*-*] - && [et-is-effective-target mips_msa]) } { + && [et-is-effective-target mips_msa]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_double_saved($et_index) 1 } } @@ -5243,7 +5255,9 @@ proc check_effective_target_vect_long_long { } { set et_vect_long_long_saved($et_index) 0 if { [istarget i?86-*-*] || [istarget x86_64-*-*] || ([istarget mips*-*-*] - && [et-is-effective-target mips_msa]) } { + && [et-is-effective-target mips_msa]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_long_long_saved($et_index) 1 } } @@ -5343,7 +5357,9 @@ proc check_effective_target_vect_perm { } { || [istarget i?86-*-*] || [istarget x86_64-*-*] || ([istarget mips*-*-*] && ([et-is-effective-target mpaired_single] - || [et-is-effective-target mips_msa])) } { + || [et-is-effective-target mips_msa])) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_perm_saved($et_index) 1 } } @@ -5372,7 +5388,9 @@ proc check_effective_target_vect_perm_byte { } { || [istarget powerpc*-*-*] || [istarget spu-*-*] || ([istarget mips-*.*] - && [et-is-effective-target mips_msa]) } { + && [et-is-effective-target mips_msa]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_perm_byte_saved($et_index) 1 } } @@ -5401,7 +5419,9 @@ proc check_effective_target_vect_perm_short { } { || [istarget powerpc*-*-*] || [istarget spu-*-*] || ([istarget mips*-*-*] - && [et-is-effective-target mips_msa]) } { + && [et-is-effective-target mips_msa]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_perm_short_saved($et_index) 1 } } @@ -5560,7 +5580,9 @@ proc check_effective_target_vect_widen_mult_qi_to_hi { } { } if { [istarget powerpc*-*-*] || [istarget aarch64*-*-*] - || [is-effective-target arm_neon] } { + || [is-effective-target arm_neon] + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_widen_mult_qi_to_hi_saved($et_index) 1 } } @@ -5597,7 +5619,9 @@ proc check_effective_target_vect_widen_mult_hi_to_si { } { || [istarget ia64-*-*] || [istarget aarch64*-*-*] || [istarget i?86-*-*] || [istarget x86_64-*-*] - || [is-effective-target arm_neon] } { + || [is-effective-target arm_neon] + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_widen_mult_hi_to_si_saved($et_index) 1 } } @@ -5622,7 +5646,9 @@ proc check_effective_target_vect_widen_mult_qi_to_hi_pattern { } { set et_vect_widen_mult_qi_to_hi_pattern_saved($et_index) 0 if { [istarget powerpc*-*-*] || ([is-effective-target arm_neon] - && [check_effective_target_arm_little_endian]) } { + && [check_effective_target_arm_little_endian]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_widen_mult_qi_to_hi_pattern_saved($et_index) 1 } } @@ -5650,7 +5676,9 @@ proc check_effective_target_vect_widen_mult_hi_to_si_pattern { } { || [istarget ia64-*-*] || [istarget i?86-*-*] || [istarget x86_64-*-*] || ([is-effective-target arm_neon] - && [check_effective_target_arm_little_endian]) } { + && [check_effective_target_arm_little_endian]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_widen_mult_hi_to_si_pattern_saved($et_index) 1 } } @@ -5674,7 +5702,9 @@ proc check_effective_target_vect_widen_mult_si_to_di_pattern { } { } else { set et_vect_widen_mult_si_to_di_pattern_saved($et_index) 0 if {[istarget ia64-*-*] - || [istarget i?86-*-*] || [istarget x86_64-*-*] } { + || [istarget i?86-*-*] || [istarget x86_64-*-*] + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_widen_mult_si_to_di_pattern_saved($et_index) 1 } } @@ -5847,7 +5877,9 @@ proc check_effective_target_vect_pack_trunc { } { || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok] && [check_effective_target_arm_little_endian]) || ([istarget mips*-*-*] - && [et-is-effective-target mips_msa]) } { + && [et-is-effective-target mips_msa]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_pack_trunc_saved($et_index) 1 } } @@ -5877,7 +5909,9 @@ proc check_effective_target_vect_unpack { } { || ([istarget mips*-*-*] && [et-is-effective-target mips_msa]) || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok] - && [check_effective_target_arm_little_endian]) } { + && [check_effective_target_arm_little_endian]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_unpack_saved($et_index) 1 } } @@ -5947,7 +5981,9 @@ proc check_effective_target_vect_hw_misalign { } { if { [istarget i?86-*-*] || [istarget x86_64-*-*] || ([istarget powerpc*-*-*] && [check_p8vector_hw_available]) || [istarget aarch64*-*-*] - || ([istarget mips*-*-*] && [et-is-effective-target mips_msa]) } { + || ([istarget mips*-*-*] && [et-is-effective-target mips_msa]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_hw_misalign_saved($et_index) 1 } if { [istarget arm*-*-*] } { @@ -6121,7 +6157,9 @@ proc check_effective_target_vect_condition { } { || ([istarget mips*-*-*] && [et-is-effective-target mips_msa]) || ([istarget arm*-*-*] - && [check_effective_target_arm_neon_ok]) } { + && [check_effective_target_arm_neon_ok]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_cond_saved($et_index) 1 } } @@ -6146,7 +6184,9 @@ proc check_effective_target_vect_cond_mixed { } { || [istarget aarch64*-*-*] || [istarget powerpc*-*-*] || ([istarget mips*-*-*] - && [et-is-effective-target mips_msa]) } { + && [et-is-effective-target mips_msa]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_cond_mixed_saved($et_index) 1 } } @@ -6172,7 +6212,9 @@ proc check_effective_target_vect_char_mult { } { || [check_effective_target_arm32] || [check_effective_target_powerpc_altivec] || ([istarget mips*-*-*] - && [et-is-effective-target mips_msa]) } { + && [et-is-effective-target mips_msa]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_char_mult_saved($et_index) 1 } } @@ -6200,7 +6242,9 @@ proc check_effective_target_vect_short_mult { } { || [check_effective_target_arm32] || ([istarget mips*-*-*] && ([et-is-effective-target mips_msa] - || [et-is-effective-target mips_loongson])) } { + || [et-is-effective-target mips_loongson])) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_short_mult_saved($et_index) 1 } } @@ -6227,7 +6271,9 @@ proc check_effective_target_vect_int_mult { } { || [istarget aarch64*-*-*] || ([istarget mips*-*-*] && [et-is-effective-target mips_msa]) - || [check_effective_target_arm32] } { + || [check_effective_target_arm32] + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_int_mult_saved($et_index) 1 } } @@ -6256,7 +6302,9 @@ proc check_effective_target_vect_extract_even_odd { } { || [istarget spu-*-*] || ([istarget mips*-*-*] && ([et-is-effective-target mips_msa] - || [et-is-effective-target mpaired_single])) } { + || [et-is-effective-target mpaired_single])) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_extract_even_odd_saved($et_index) 1 } } @@ -6284,7 +6332,9 @@ proc check_effective_target_vect_interleave { } { || [istarget spu-*-*] || ([istarget mips*-*-*] && ([et-is-effective-target mpaired_single] - || [et-is-effective-target mips_msa])) } { + || [et-is-effective-target mips_msa])) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_interleave_saved($et_index) 1 } } @@ -6401,7 +6451,9 @@ proc check_effective_target_sqrt_insn { } { if { [istarget i?86-*-*] || [istarget x86_64-*-*] || [istarget powerpc*-*-*] || [istarget aarch64*-*-*] - || ([istarget arm*-*-*] && [check_effective_target_arm_vfp_ok]) } { + || ([istarget arm*-*-*] && [check_effective_target_arm_vfp_ok]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_sqrt_insn_saved 1 } } @@ -6422,7 +6474,9 @@ proc check_effective_target_vect_call_sqrtf { } { set et_vect_call_sqrtf_saved($et_index) 0 if { [istarget aarch64*-*-*] || [istarget i?86-*-*] || [istarget x86_64-*-*] - || ([istarget powerpc*-*-*] && [check_vsx_hw_available]) } { + || ([istarget powerpc*-*-*] && [check_vsx_hw_available]) + || ([istarget s390*-*-*] + && [check_effective_target_s390_vx]) } { set et_vect_call_sqrtf_saved($et_index) 1 } } @@ -8027,6 +8081,25 @@ proc check_vect_support_and_set_flags { } { } } elseif [istarget "aarch64*-*-*"] { set dg-do-what-default run + } elseif [istarget s390*-*-*] { + # The S/390 backend set a default of 2 for that value. + # Override it to have the same situation as with other + # targets. + lappend DEFAULT_VECTCFLAGS "--param" "min-vect-loop-bound=1" + lappend DEFAULT_VECTCFLAGS "--param" "max-unrolled-insns=200" + lappend DEFAULT_VECTCFLAGS "--param" "max-unroll-times=8" + lappend DEFAULT_VECTCFLAGS "--param" "max-completely-peeled-insns=200" + lappend DEFAULT_VECTCFLAGS "--param" "max-completely-peel-times=16" + if [check_effective_target_s390_vxe] { + lappend DEFAULT_VECTCFLAGS "-march=z14" "-mzarch" + set dg-do-what-default run + } elseif [check_effective_target_s390_vx] { + lappend DEFAULT_VECTCFLAGS "-march=z13" "-mzarch" + set dg-do-what-default run + } else { + lappend DEFAULT_VECTCFLAGS "-march=z14" "-mzarch" + set dg-do-what-default compile + } } else { return 0 } @@ -8453,7 +8526,7 @@ proc check_effective_target_s390_vx { } { } "-march=z13 -mzarch" ] } -# Same as above but for the arch12 vector enhancement facility. Test +# Same as above but for the z14 vector enhancement facility. Test # is performed with the vector nand instruction. proc check_effective_target_s390_vxe { } { if ![istarget s390*-*-*] then { @@ -8466,7 +8539,7 @@ proc check_effective_target_s390_vxe { } { asm ("vnn %%v24, %%v26, %%v28" : : : "v24", "v26", "v28"); return 0; } - } "-march=arch12 -mzarch" ] + } "-march=z14 -mzarch" ] } #For versions of ARM architectures that have hardware div insn, |