diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 640674a830b7..b1f391f27ee6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,27 @@ +2004-12-21 Janis Johnson + + * lib/target-supports.exp + (check_effective_target_vect_no_max, + check_effective_target_vect_no_bitwise, + check_effective_target_vect_no_align): New. + * gcc.dg/vect/vect-13.c: Use them. + * gcc.dg/vect/vect-17.c: Ditto. + * gcc.dg/vect/vect-18.c: Ditto. + * gcc.dg/vect/vect-19.c: Ditto. + * gcc.dg/vect/vect-20.c: Ditto. + * gcc.dg/vect/vect-27.c: Ditto. + * gcc.dg/vect/vect-29.c: Ditto. + * gcc.dg/vect/vect-44.c: Ditto. + * gcc.dg/vect/vect-48.c: Ditto. + * gcc.dg/vect/vect-50.c: Ditto. + * gcc.dg/vect/vect-52.c: Ditto. + * gcc.dg/vect/vect-54.c: Ditto. + * gcc.dg/vect/vect-56.c: Ditto. + * gcc.dg/vect/vect-58.c: Ditto. + * gcc.dg/vect/vect-60.c: Ditto. + * gcc.dg/vect/vect-72.c: Ditto. + * gcc.dg/vect/vect-80.c: Ditto. + 2004-12-21 Nathan Sidwell PR c++/14075 diff --git a/gcc/testsuite/gcc.dg/vect/vect-13.c b/gcc/testsuite/gcc.dg/vect/vect-13.c index 94048276ccb6..0cec89bc2c62 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-13.c +++ b/gcc/testsuite/gcc.dg/vect/vect-13.c @@ -36,6 +36,4 @@ int main (void) return main1 (); } -/* These fail to vectorize on targets that don't have or model a vector - max operation. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* sparc*-*-* alpha*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_max } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-17.c b/gcc/testsuite/gcc.dg/vect/vect-17.c index 50f11331c0be..210e31486bea 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-17.c +++ b/gcc/testsuite/gcc.dg/vect/vect-17.c @@ -124,6 +124,4 @@ int main (void) return main1 (); } -/* These fail to vectorize on targets that don't have or model vector - bitwise operations. */ -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {xfail i?86-*-* x86_64-*-* alpha*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-18.c b/gcc/testsuite/gcc.dg/vect/vect-18.c index 991deb44bb4d..2f9f20158465 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-18.c +++ b/gcc/testsuite/gcc.dg/vect/vect-18.c @@ -123,6 +123,4 @@ int main (void) return main1 (); } -/* These fail to vectorize on targets that don't have or model vector - bitwise operations. */ -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {xfail i?86-*-* x86_64-*-* alpha*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-19.c b/gcc/testsuite/gcc.dg/vect/vect-19.c index 49c8a5ce8ba5..681e5866ab42 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-19.c +++ b/gcc/testsuite/gcc.dg/vect/vect-19.c @@ -123,6 +123,4 @@ int main (void) return main1 (); } -/* These fail to vectorize on targets that don't have or model vector - bitwise operations. */ -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {xfail i?86-*-* x86_64-*-* alpha*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-20.c b/gcc/testsuite/gcc.dg/vect/vect-20.c index e2674af3b00d..73df78d9386d 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-20.c +++ b/gcc/testsuite/gcc.dg/vect/vect-20.c @@ -95,6 +95,4 @@ int main (void) return main1 (); } -/* These fail to vectorize on targets that don't have or model vector - bitwise operations. */ -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {xfail i?86-*-* x86_64-*-* alpha*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-27.c b/gcc/testsuite/gcc.dg/vect/vect-27.c index 7f020cfd67c1..1c77877814a9 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-27.c +++ b/gcc/testsuite/gcc.dg/vect/vect-27.c @@ -40,7 +40,5 @@ int main (void) return main1 (); } -/* These are not yet vectorized on targets that do not model alignment-handling - mechanisms. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* sparc*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-29.c b/gcc/testsuite/gcc.dg/vect/vect-29.c index 379e16526ddf..4d71bca7c760 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-29.c +++ b/gcc/testsuite/gcc.dg/vect/vect-29.c @@ -43,7 +43,5 @@ int main (void) return 0; } -/* These are not yet vectorized on targets that do not model alignment-handling - mechanisms. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* sparc*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-44.c b/gcc/testsuite/gcc.dg/vect/vect-44.c index f1e4aae2d362..b14a3a3835f5 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-44.c +++ b/gcc/testsuite/gcc.dg/vect/vect-44.c @@ -54,6 +54,4 @@ int main (void) return 0; } -/* These are not yet vectorized on targets that do not model alignment-handling - mechanisms. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-48.c b/gcc/testsuite/gcc.dg/vect/vect-48.c index dee986efddea..48c569648b0d 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-48.c +++ b/gcc/testsuite/gcc.dg/vect/vect-48.c @@ -52,6 +52,4 @@ int main (void) return 0; } -/* These are not yet vectorized on targets that do not model alignment-handling - mechanisms. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-50.c b/gcc/testsuite/gcc.dg/vect/vect-50.c index 9076b40cb1b1..feac1c59baf4 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-50.c +++ b/gcc/testsuite/gcc.dg/vect/vect-50.c @@ -49,7 +49,4 @@ int main (void) return 0; } -/* These are not yet vectorized on targets that do not model alignment-handling - mechanisms. They also fail to vectorize for 64-bit powerpc but there's no - way to specify that in an xfail list. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-52.c b/gcc/testsuite/gcc.dg/vect/vect-52.c index 5ba0992b956f..745f36204b59 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-52.c +++ b/gcc/testsuite/gcc.dg/vect/vect-52.c @@ -51,7 +51,4 @@ int main (void) return 0; } -/* These are not yet vectorized on targets that do not model alignment-handling - mechanisms. They also fail to vectorize for 64-bit powerpc but there's no - way to specify that in an xfail list. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-54.c b/gcc/testsuite/gcc.dg/vect/vect-54.c index f7deb174e75f..86f2cdfe6c9d 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-54.c +++ b/gcc/testsuite/gcc.dg/vect/vect-54.c @@ -50,6 +50,4 @@ int main (void) return 0; } -/* These are not yet vectorized on targets that do not model alignment-handling - mechanisms. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-56.c b/gcc/testsuite/gcc.dg/vect/vect-56.c index 40b62b450f3b..e3cb64101dde 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-56.c +++ b/gcc/testsuite/gcc.dg/vect/vect-56.c @@ -50,6 +50,4 @@ int main (void) return 0; } -/* These are not yet vectorized on targets that do not model alignment-handling - mechanisms. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-58.c b/gcc/testsuite/gcc.dg/vect/vect-58.c index 73faab3874c2..feb8ab364e61 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-58.c +++ b/gcc/testsuite/gcc.dg/vect/vect-58.c @@ -51,7 +51,4 @@ int main (void) return 0; } -/* These are not yet vectorized on targets that do not model alignment-handling - mechanisms. They also fail to vectorize for 64-bit powerpc but there's no - way to specify that in an xfail list. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-60.c b/gcc/testsuite/gcc.dg/vect/vect-60.c index 06684e7001c4..d3225e125912 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-60.c +++ b/gcc/testsuite/gcc.dg/vect/vect-60.c @@ -51,6 +51,4 @@ int main (void) return 0; } -/* These are not yet vectorized on targets that do not model alignment-handling - mechanisms. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-72.c b/gcc/testsuite/gcc.dg/vect/vect-72.c index 694e5ad8603d..12a88099935b 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-72.c +++ b/gcc/testsuite/gcc.dg/vect/vect-72.c @@ -40,7 +40,5 @@ int main (void) return main1 (); } -/* These are not yet vectorized on targets that do not model alignment-handling - mechanisms. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* sparc*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-80.c b/gcc/testsuite/gcc.dg/vect/vect-80.c index 404c7c79bccc..3b6869259fbd 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-80.c +++ b/gcc/testsuite/gcc.dg/vect/vect-80.c @@ -42,6 +42,4 @@ int main (void) return 0; } -/* These are not yet vectorized on targets that do not model alignment-handling - mechanisms. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index d1d94f0f2c9e..7987680ffe6d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -526,6 +526,74 @@ proc check_effective_target_vect_double { } { return $et_vect_double_saved } +# Return 1 if the target plus current options does not support a vector +# max instruction, 0 otherwise. +# +# This won't change for different subtargets so cache the result. + +proc check_effective_target_vect_no_max { } { + global et_vect_no_max_saved + + if [info exists et_vect_no_max_saved] { + verbose "check_effective_target_vect_no_max: using cached result" 2 + } else { + set et_vect_no_max_saved 0 + if { [istarget i?86-*-*] + || [istarget x86_64-*-*] + || [istarget sparc*-*-*] + || [istarget alpha*-*-*] } { + set et_vect_no_max_saved 1 + } + } + verbose "check_effective_target_vect_no_max: returning $et_vect_no_max_saved" 2 + return $et_vect_no_max_saved +} + +# Return 1 if the target plus current options does not support vector +# bitwise instructions, 0 otherwise. +# +# This won't change for different subtargets so cache the result. + +proc check_effective_target_vect_no_bitwise { } { + global et_vect_no_bitwise_saved + + if [info exists et_vect_no_bitwise_saved] { + verbose "check_effective_target_vect_no_bitwise: using cached result" 2 + } else { + set et_vect_no_bitwise_saved 0 + if { [istarget i?86-*-*] + || [istarget x86_64-*-*] + || [istarget alpha-*-*] } { + set et_vect_no_bitwise_saved 1 + } + } + verbose "check_effective_target_vect_no_bitwise: returning $et_vect_no_bitwise_saved" 2 + return $et_vect_no_bitwise_saved +} + +# Return 1 if the target plus current options does not support a vector +# alignment mechanism, 0 otherwise. +# +# This won't change for different subtargets so cache the result. + +proc check_effective_target_vect_no_align { } { + global et_vect_no_align_saved + + if [info exists et_vect_no_align_saved] { + verbose "check_effective_target_vect_no_align: using cached result" 2 + } else { + set et_vect_no_align_saved 0 + if { [istarget i?86-*-*] + || [istarget x86_64-*-*] + || [istarget mipsisa64*-*-*] + || [istarget sparc*-*-*] } { + set et_vect_no_align_saved 1 + } + } + verbose "check_effective_target_vect_no_align: returning $et_vect_no_align_saved" 2 + return $et_vect_no_align_saved +} + # Return 1 if the target matches the effective target 'arg', 0 otherwise. # This can be used with any check_* proc that takes no argument and # returns only 1 or 0. It could be used with check_* procs that take