These are the same as bswap effective target. Also, all listed targets
are capable of int32plus.

2017-11-22  Uros Bizjak  <ubiz...@gmail.com>

    * lib/target-supports.exp (check_effective_target_bswap16): Remove
    (check_effective_target_bswap32): Ditto.
    (check_effective_target_bswap64): Ditto.
    * gcc.dg/optimize-bswaphi-1.c: Use bswap effective
    target instead of bswap16.
    * gcc.dg/optimize-bswapsi-1.c: Use bswap effective
    target instead of bswap32.
    * gcc.dg/optimize-bswapsi-2.c: Ditto.
    * gcc.dg/optimize-bswapsi-3.c: Ditto.
    * gcc.dg/optimize-bswapsi-4.c: Ditto.
    * gcc.dg/optimize-bswapsi-5.c: Ditto.
    * gcc.dg/pr77673.c: Ditto.
    * gcc.dg/optimize-bswapdi-1.c: Use bswap effective
    target instead of bswap64.
    * gcc.dg/optimize-bswapdi-2.c: Ditto.
    * gcc.dg/optimize-bswapdi-3.c: Ditto.

Tested on x86_64-linux-gnu {,-m32} and alphaev68-linux-gnu.

Committed to mainline SVN.

Uros.
Index: gcc.dg/optimize-bswapdi-1.c
===================================================================
--- gcc.dg/optimize-bswapdi-1.c (revision 255066)
+++ gcc.dg/optimize-bswapdi-1.c (working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target bswap64 } */
+/* { dg-require-effective-target bswap } */
 /* { dg-require-effective-target stdint_types } */
 /* { dg-options "-O2 -fdump-tree-bswap" } */
 /* { dg-additional-options "-mzarch" { target s390*-*-* } } */
Index: gcc.dg/optimize-bswapdi-2.c
===================================================================
--- gcc.dg/optimize-bswapdi-2.c (revision 255066)
+++ gcc.dg/optimize-bswapdi-2.c (working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target bswap64 } */
+/* { dg-require-effective-target bswap } */
 /* { dg-require-effective-target stdint_types } */
 /* { dg-options "-O2 -fdump-tree-bswap" } */
 /* { dg-additional-options "-mzarch" { target s390*-*-* } } */
Index: gcc.dg/optimize-bswapdi-3.c
===================================================================
--- gcc.dg/optimize-bswapdi-3.c (revision 255066)
+++ gcc.dg/optimize-bswapdi-3.c (working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target bswap64 } */
+/* { dg-require-effective-target bswap } */
 /* { dg-require-effective-target stdint_types } */
 /* { dg-options "-O2 -fdump-tree-bswap" } */
 /* { dg-additional-options "-mzarch" { target s390*-*-* } } */
Index: gcc.dg/optimize-bswaphi-1.c
===================================================================
--- gcc.dg/optimize-bswaphi-1.c (revision 255066)
+++ gcc.dg/optimize-bswaphi-1.c (working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target bswap16 } */
+/* { dg-require-effective-target bswap } */
 /* { dg-require-effective-target stdint_types } */
 /* { dg-options "-O2 -fdump-tree-bswap" } */
 /* { dg-additional-options "-march=z900" { target s390-*-* } } */
Index: gcc.dg/optimize-bswapsi-1.c
===================================================================
--- gcc.dg/optimize-bswapsi-1.c (revision 255066)
+++ gcc.dg/optimize-bswapsi-1.c (working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target bswap32 } */
+/* { dg-require-effective-target bswap } */
 /* { dg-require-effective-target stdint_types } */
 /* { dg-options "-O2 -fdump-tree-bswap" } */
 /* { dg-additional-options "-march=z900" { target s390*-*-* } } */
Index: gcc.dg/optimize-bswapsi-2.c
===================================================================
--- gcc.dg/optimize-bswapsi-2.c (revision 255066)
+++ gcc.dg/optimize-bswapsi-2.c (working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target bswap32 } */
+/* { dg-require-effective-target bswap } */
 /* { dg-require-effective-target stdint_types } */
 /* { dg-options "-O2 -fdump-tree-bswap" } */
 /* { dg-additional-options "-march=z900" { target s390*-*-* } } */
Index: gcc.dg/optimize-bswapsi-3.c
===================================================================
--- gcc.dg/optimize-bswapsi-3.c (revision 255066)
+++ gcc.dg/optimize-bswapsi-3.c (working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target bswap32 } */
+/* { dg-require-effective-target bswap } */
 /* { dg-require-effective-target stdint_types } */
 /* { dg-options "-O2 -fdump-tree-bswap" } */
 /* { dg-additional-options "-march=z900" { target s390-*-* } } */
Index: gcc.dg/optimize-bswapsi-4.c
===================================================================
--- gcc.dg/optimize-bswapsi-4.c (revision 255066)
+++ gcc.dg/optimize-bswapsi-4.c (working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target bswap32 } */
+/* { dg-require-effective-target bswap } */
 /* { dg-options "-O2 -fdump-tree-bswap" } */
 /* { dg-additional-options "-march=z900" { target s390-*-* } } */
 
Index: gcc.dg/optimize-bswapsi-5.c
===================================================================
--- gcc.dg/optimize-bswapsi-5.c (revision 255066)
+++ gcc.dg/optimize-bswapsi-5.c (working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target bswap32 } */
+/* { dg-require-effective-target bswap } */
 /* { dg-options "-O2 -fdump-tree-bswap" } */
 /* { dg-additional-options "-march=z900" { target s390-*-* } } */
 
Index: gcc.dg/pr77673.c
===================================================================
--- gcc.dg/pr77673.c    (revision 255066)
+++ gcc.dg/pr77673.c    (working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target fpic } } */
-/* { dg-require-effective-target bswap32 } */
+/* { dg-require-effective-target bswap } */
 /* { dg-options "-O2 -fPIC -fdump-tree-bswap" } */
 /* { dg-additional-options "-march=z900" { target s390*-*-* } } */
 
Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp     (revision 255066)
+++ lib/target-supports.exp     (working copy)
@@ -7243,56 +7243,6 @@
     return $et_bswap_saved
 }
 
-# Return 1 if the target supports 16-bit byte swap instructions.
-
-proc check_effective_target_bswap16 { } {
-    global et_bswap16_saved
-
-    if [info exists et_bswap16_saved] {
-       verbose "check_effective_target_bswap16: using cached result" 2
-    } else {
-       set et_bswap16_saved 0
-       if { [is-effective-target bswap] } {
-          set et_bswap16_saved 1
-       }
-    }
-
-    verbose "check_effective_target_bswap16: returning $et_bswap16_saved" 2
-    return $et_bswap16_saved
-}
-
-# Return 1 if the target supports 32-bit byte swap instructions.
-
-proc check_effective_target_bswap32 { } {
-    global et_bswap32_saved
-
-    if [info exists et_bswap32_saved] {
-       verbose "check_effective_target_bswap32: using cached result" 2
-    } else {
-       set et_bswap32_saved 0
-       if { [is-effective-target bswap] } {
-          set et_bswap32_saved 1
-       }
-    }
-
-    verbose "check_effective_target_bswap32: returning $et_bswap32_saved" 2
-    return $et_bswap32_saved
-}
-
-# Return 1 if the target supports 64-bit byte swap instructions.
-#
-# Note: 32bit s390 targets require -mzarch in dg-options.
-
-proc check_effective_target_bswap64 { } {
-    global et_bswap64_saved
-
-    # expand_unop can expand 64-bit byte swap on 32-bit targets
-    if { [is-effective-target bswap] && [is-effective-target int32plus] } {
-       return 1
-    }
-    return 0
-}
-
 # Return 1 if the target supports atomic operations on "int" and "long".
 
 proc check_effective_target_sync_int_long { } {

Reply via email to