re PR testsuite/64796 (effective target bswap64 globally caches target-specific use...
authorThomas Preud'homme <thomas.preudhomme@arm.com>
Wed, 4 Feb 2015 01:54:47 +0000 (01:54 +0000)
committerThomas Preud'homme <thopre01@gcc.gnu.org>
Wed, 4 Feb 2015 01:54:47 +0000 (01:54 +0000)
2015-02-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    PR testsuite/64796
    * lib/target-supports.exp (check_effective_target_bswap64): Do not
    cache result in a global variable.  Include all 32-bit targets for
    bswap64 tests.

From-SVN: r220388

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index 7b2b03d318213cbbc695956b160d27a7d91daa92..ad2633b46fa2822e83d104f6bdba5e0c0d127f78 100644 (file)
@@ -1,3 +1,10 @@
+2015-02-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+       PR testsuite/64796
+       * lib/target-supports.exp (check_effective_target_bswap64): Do not
+       cache result in a global variable.  Include all 32-bit targets for
+       bswap64 tests.
+
 2015-02-03  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/64756
index cb8a61325596652c91b5d4e98f7dbb0d00645c43..ce7043acac2d540602709543e7935cdd38d29b27 100644 (file)
@@ -5049,18 +5049,11 @@ proc check_effective_target_bswap32 { } {
 proc check_effective_target_bswap64 { } {
     global et_bswap64_saved
 
-    if [info exists et_bswap64_saved] {
-        verbose "check_effective_target_bswap64: using cached result" 2
-    } else {
-       set et_bswap64_saved 0
-       if { [is-effective-target bswap]
-            && [is-effective-target lp64] } {
-          set et_bswap64_saved 1
-       }
+    # expand_unop can expand 64-bit byte swap on 32-bit targets
+    if { [is-effective-target bswap] && [is-effective-target int32plus] } {
+       return 1
     }
-
-    verbose "check_effective_target_bswap64: returning $et_bswap64_saved" 2
-    return $et_bswap64_saved
+    return 0
 }
 
 # Return 1 if the target supports atomic operations on "int" and "long".