diff options
author | Tamar Christina <tamar.christina@arm.com> | 2017-08-23 11:34:59 +0000 |
---|---|---|
committer | Tamar Christina <tnfchris@gcc.gnu.org> | 2017-08-23 11:34:59 +0000 |
commit | c37691e5cd4c354951282777502d3f23e191b977 (patch) | |
tree | 47f447d661bac84e4af1f0962702fe548af49a9e /gcc | |
parent | 9880acc19effbc5fa5b1f5cb155a3a6a83f7c978 (diff) | |
download | gcc-c37691e5cd4c354951282777502d3f23e191b977.zip gcc-c37691e5cd4c354951282777502d3f23e191b977.tar.gz gcc-c37691e5cd4c354951282777502d3f23e191b977.tar.bz2 |
re PR middle-end/19706 (Recognize common Fortran usages of copysign.)
2017-08-23 Tamar Christina <tamar.christina@arm.com>
PR middle-end/19706
* doc/sourcebuild.texi (Other hardware attributes):
Document xorsign.
gcc/testsuite
2017-08-23 Tamar Christina <tamar.christina@arm.com>
PR middle-end/19706
* gcc.dg/tree-ssa/pr19706.c: New.
* lib/target-supports.exp (check_effective_target_xorsign): New.
From-SVN: r251304
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/doc/sourcebuild.texi | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 22 |
4 files changed, 37 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1c7462f..37be75b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ 2017-08-23 Tamar Christina <tamar.christina@arm.com> PR middle-end/19706 + * doc/sourcebuild.texi (Other hardware attributes): + Document xorsign. + +2017-08-23 Tamar Christina <tamar.christina@arm.com> + + PR middle-end/19706 * tree-ssa-math-opts.c (convert_expand_mult_copysign): Fix single-use check. diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index e6313dc..a1ca417 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1908,6 +1908,9 @@ or @code{EM_SPARCV9} executables. @item vect_cmdline_needed Target requires a command line argument to enable a SIMD instruction set. +@item xorsign +Target supports the xorsign optab expansion. + @end table @subsubsection Environment attributes diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fe39455..487d94bd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-08-23 Tamar Christina <tamar.christina@arm.com> + + PR middle-end/19706 + * gcc.dg/tree-ssa/pr19706.c: New. + * lib/target-supports.exp (check_effective_target_xorsign): New. + 2017-08-22 Daniel Santos <daniel.santos@pobox.com> * gcc.target/i386/pr71958.c: New test to verify error on -mx32 and diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 5219fbf..db0c0ff 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5332,6 +5332,28 @@ proc check_effective_target_vect_perm_short { } { return $et_vect_perm_short_saved($et_index) } +# Return 1 if the target plus current options supports folding of +# copysign into XORSIGN. +# +# This won't change for different subtargets so cache the result. + +proc check_effective_target_xorsign { } { + global et_xorsign_saved + global et_index + + if [info exists et_xorsign_saved($et_index)] { + verbose "check_effective_target_xorsign: using cached result" 2 + } else { + set et_xorsign_saved($et_index) 0 + if { [istarget aarch64*-*-*] || [istarget arm*-*-*] } { + set et_xorsign_saved($et_index) 1 + } + } + verbose "check_effective_target_xorsign:\ + returning $et_xorsign_saved($et_index)" 2 + return $et_xorsign_saved($et_index) +} + # Return 1 if the target plus current options supports a vector # widening summation of *short* args into *int* result, 0 otherwise. # |