re PR middle-end/19706 (Recognize common Fortran usages of copysign.)
authorTamar Christina <tamar.christina@arm.com>
Wed, 23 Aug 2017 11:34:59 +0000 (11:34 +0000)
committerTamar Christina <tnfchris@gcc.gnu.org>
Wed, 23 Aug 2017 11:34:59 +0000 (11:34 +0000)
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

gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index 1c7462f7ef214524fa7bb3b43ef8669a0472f170..37be75b1e4b6ff68281e20b5a56b7b5af30b74ca 100644 (file)
@@ -1,3 +1,9 @@
+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
index e6313dc031ef5b2b5a72180bccf1e876812efe48..a1ca417b5c810b3e16520bf68944be709e0b8e92 100644 (file)
@@ -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
index fe394556efe58964ae1d5559582b8c9c1e684b85..487d94bd06f8878971f776a3959c89b5b1d31536 100644 (file)
@@ -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
index 5219fbf4671e83a6fa7affdab926115e8a23f9cb..db0c0ff089acba29a4c3c177d4ebacd40ce1a631 100644 (file)
@@ -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.
 #