Commit ef57eeb2 by Richard Sandiford Committed by Richard Sandiford

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
parent 97e52238
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
......
......@@ -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}.
......
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.
......
/* { dg-require-effective-target vect_float } */
/* { dg-require-effective-target vect_float_strict } */
#include <stdarg.h>
#include "tree-vect.h"
......
/* { dg-require-effective-target vect_float } */
/* { dg-require-effective-target vect_float_strict } */
/* { dg-additional-options "-fno-fast-math" } */
#include <stdarg.h>
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment