diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2018-01-23 10:42:32 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-01-23 10:42:32 +0000 |
commit | ef57eeb23260872cb601a848493488c24cb309c1 (patch) | |
tree | 98b0c0d20b46c58cf03d997254c1bb7c56b28b7a | |
parent | 97e52238b292ca744368f66980533c578838e94c (diff) | |
download | gcc-ef57eeb23260872cb601a848493488c24cb309c1.zip gcc-ef57eeb23260872cb601a848493488c24cb309c1.tar.gz gcc-ef57eeb23260872cb601a848493488c24cb309c1.tar.bz2 |
Fix vect_float markup for a couple of tests (PR 83888)
vect_float is true for arm*-*-* targets, but the support is only
available when -funsafe-math-optimizations is on. This caused
failures in two tests that disable fast-math.
The easiest fix seemed to be to add a new target selector for
"vect_float without special options".
2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
PR testsuite/83888
* doc/sourcebuild.texi (vect_float): Say that the selector
only describes the situation when -funsafe-math-optimizations is on.
(vect_float_strict): Document.
gcc/testsuite/
PR testsuite/83888
* lib/target-supports.exp (check_effective_target_vect_float): Say
that the result only holds when -funsafe-math-optimizations is on.
(check_effective_target_vect_float_strict): New procedure.
* gcc.dg/vect/no-fast-math-vect16.c: Use vect_float_strict instead
of vect_float.
* gcc.dg/vect/vect-reduc-6.c: Likewise.
From-SVN: r256977
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/doc/sourcebuild.texi | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-reduc-6.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 11 |
6 files changed, 36 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bf5743b..94f2ad7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org> + PR testsuite/83888 + * doc/sourcebuild.texi (vect_float): Say that the selector + only describes the situation when -funsafe-math-optimizations is on. + (vect_float_strict): Document. + +2018-01-23 Richard Sandiford <richard.sandiford@linaro.org> + PR tree-optimization/83965 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function. (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 69fbf6a..bf44d15 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1403,7 +1403,13 @@ The target's preferred vector alignment is the same as the element alignment. @item vect_float -Target supports hardware vectors of @code{float}. +Target supports hardware vectors of @code{float} when +@option{-funsafe-math-optimizations} is in effect. + +@item vect_float_strict +Target supports hardware vectors of @code{float} when +@option{-funsafe-math-optimizations} is not in effect. +This implies @code{vect_float}. @item vect_int Target supports hardware vectors of @code{int}. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b42031b..b684430 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,15 @@ 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org> + PR testsuite/83888 + * lib/target-supports.exp (check_effective_target_vect_float): Say + that the result only holds when -funsafe-math-optimizations is on. + (check_effective_target_vect_float_strict): New procedure. + * gcc.dg/vect/no-fast-math-vect16.c: Use vect_float_strict instead + of vect_float. + * gcc.dg/vect/vect-reduc-6.c: Likewise. + +2018-01-23 Richard Sandiford <richard.sandiford@linaro.org> + PR tree-optimization/83965 * gcc.dg/vect/pr83965.c: New test. diff --git a/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c b/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c index 2445d60..7a148e4 100644 --- a/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c +++ b/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c @@ -1,4 +1,4 @@ -/* { dg-require-effective-target vect_float } */ +/* { dg-require-effective-target vect_float_strict } */ #include <stdarg.h> #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-6.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-6.c index f80d5ba..ad14804 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-6.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-6.c @@ -1,4 +1,4 @@ -/* { dg-require-effective-target vect_float } */ +/* { dg-require-effective-target vect_float_strict } */ /* { dg-additional-options "-fno-fast-math" } */ #include <stdarg.h> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 720914b..2451423 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5492,7 +5492,8 @@ proc check_effective_target_vect_long { } { return $answer } -# Return 1 if the target supports hardware vectors of float, 0 otherwise. +# Return 1 if the target supports hardware vectors of float when +# -funsafe-math-optimizations is enabled, 0 otherwise. # # This won't change for different subtargets so cache the result. @@ -5525,6 +5526,14 @@ proc check_effective_target_vect_float { } { return $et_vect_float_saved($et_index) } +# Return 1 if the target supports hardware vectors of float without +# -funsafe-math-optimizations being enabled, 0 otherwise. + +proc check_effective_target_vect_float_strict { } { + return [expr { [check_effective_target_vect_float] + && ![istarget arm*-*-*] }] +} + # Return 1 if the target supports hardware vectors of double, 0 otherwise. # # This won't change for different subtargets so cache the result. |