diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2015-05-21 13:30:24 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2015-05-21 13:30:24 +0000 |
commit | 1e43cc9461ba4f73939c94f07d2f5b305943eb29 (patch) | |
tree | 5fc480432be09e5919afdfdc2d6c0d53661c0eb9 /gcc | |
parent | eb7d283dc33d007ef49e76ba16680644869877c4 (diff) | |
download | gcc-1e43cc9461ba4f73939c94f07d2f5b305943eb29.zip gcc-1e43cc9461ba4f73939c94f07d2f5b305943eb29.tar.gz gcc-1e43cc9461ba4f73939c94f07d2f5b305943eb29.tar.bz2 |
Testsuite check for sqrt_insn. Move pow/sqrt synth test from gcc.target/aarch64/ to to gcc.dg/
* lib/target-supports.exp (check_effective_target_sqrt_insn): New check.
* gcc.dg/pow-sqrt-synth-1.c: New test.
* gcc.target/aarch64/pow-sqrt-synth-1.c: Delete.
* doc/sourcebuild.texi (7.2.3.9 Other hardware attributes):
Document sqrt_insn.
From-SVN: r223485
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/doc/sourcebuild.texi | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pow-sqrt-synth-1.c (renamed from gcc/testsuite/gcc.target/aarch64/pow-sqrt-synth-1.c) | 6 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 21 |
5 files changed, 38 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af2225b..46784af 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + * doc/sourcebuild.texi (7.2.3.9 Other hardware attributes): + Document sqrt_insn. + 2015-05-21 Richard Biener <rguenther@suse.de> PR c++/66211 diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index c6ef40e..abe0779 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1695,6 +1695,9 @@ Target supports FPU instructions. @item non_strict_align Target does not require strict alignment. +@item sqrt_insn +Target has a square root instruction that the compiler can generate. + @item sse Target supports compiling @code{sse} instructions. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e681453..a5b78aa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + * lib/target-supports.exp (check_effective_target_sqrt_insn): New check. + * gcc.dg/pow-sqrt-synth-1.c: New test. + * gcc.target/aarch64/pow-sqrt-synth-1.c: Delete. + 2015-05-21 Richard Biener <rguenther@suse.de> PR c++/66211 diff --git a/gcc/testsuite/gcc.target/aarch64/pow-sqrt-synth-1.c b/gcc/testsuite/gcc.dg/pow-sqrt-synth-1.c index 52514fb..d55b626 100644 --- a/gcc/testsuite/gcc.target/aarch64/pow-sqrt-synth-1.c +++ b/gcc/testsuite/gcc.dg/pow-sqrt-synth-1.c @@ -1,6 +1,6 @@ -/* { dg-do compile } */ +/* { dg-do compile { target sqrt_insn } } */ /* { dg-options "-fdump-tree-sincos -Ofast --param max-pow-sqrt-depth=8" } */ - +/* { dg-additional-options "-mfloat-abi=softfp -mfpu=neon-vfpv4" { target arm*-*-* } } */ double foo (double a) @@ -35,4 +35,4 @@ vecfoo (double *a) } /* { dg-final { scan-tree-dump-times "synthesizing" 7 "sincos" } } */ -/* { dg-final { cleanup-tree-dump "sincos" } } */
\ No newline at end of file +/* { dg-final { cleanup-tree-dump "sincos" } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 732f718..f0c209f 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -4670,6 +4670,27 @@ proc check_effective_target_vect_call_copysignf { } { return $et_vect_call_copysignf_saved } +# Return 1 if the target supports hardware square root instructions. + +proc check_effective_target_sqrt_insn { } { + global et_sqrt_insn_saved + + if [info exists et_sqrt_insn_saved] { + verbose "check_effective_target_hw_sqrt: using cached result" 2 + } else { + set et_sqrt_insn_saved 0 + if { [istarget x86_64-*-*] + || [istarget powerpc*-*-*] + || [istarget aarch64*-*-*] + || ([istarget arm*-*-*] && [check_effective_target_arm_vfp_ok]) } { + set et_sqrt_insn_saved 1 + } + } + + verbose "check_effective_target_hw_sqrt: returning et_sqrt_insn_saved" 2 + return $et_sqrt_insn_saved +} + # Return 1 if the target supports vector sqrtf calls. proc check_effective_target_vect_call_sqrtf { } { |