[gcc r17-3150] testsuite: Remove unrelated checks from signbit-1.c

Kyrylo Tkachov via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:1c37c631abe1de02e9b843a264b9923c12e9a68d

commit r17-3150-g1c37c631abe1de02e9b843a264b9923c12e9a68d
Author: Kyrylo Tkachov <[email protected]>
Date:   Sat Aug 8 12:36:55 2026 +0200

    testsuite: Remove unrelated checks from signbit-1.c
    
    signbit-1.c tests the X + (X | -X) simplification.  The test also
    contains three expressions for the separate (X | -X) sign-bit fold.
    That fold belongs to a separate patch, so the dump scans fail when this
    patch is tested by itself.
    
    Remove the unrelated functions and scan.  The sign-bit fold patch has
    its own tests.
    
    Tested on x86_64-pc-linux-gnu.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.dg/tree-ssa/signbit-1.c (f1, f2, f3): Remove.
            Remove the corresponding dump scan.
    
    Signed-off-by: Kyrylo Tkachov <[email protected]>

Diff:
---
 gcc/testsuite/gcc.dg/tree-ssa/signbit-1.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/signbit-1.c b/gcc/testsuite/gcc.dg/tree-ssa/signbit-1.c
index d7bcd91173b1..88925118338c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/signbit-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/signbit-1.c
@@ -1,14 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
 
-/* X | -X has the sign bit set exactly when X is non-zero.  */
-
-int f1 (int x)
-{ return (x | -x) >> (__SIZEOF_INT__ * __CHAR_BIT__ - 1); }
-unsigned int f2 (unsigned int x)
-{ return (x | -x) >> (__SIZEOF_INT__ * __CHAR_BIT__ - 1); }
-long f3 (long x) { return (x | -x) >> (__SIZEOF_LONG__ * __CHAR_BIT__ - 1); }
-
 /* X + (X | -X) clears the lowest set bit of X.  The identity holds for a
    signed operand too, X - 1 overflows only where the source does.  */
 unsigned int f4 (unsigned int x) { return x + (x | -x); }
@@ -22,5 +14,4 @@ unsigned int f6 (unsigned int x, unsigned int *p)
 }
 
 /* { dg-final { scan-tree-dump-times " \\| " 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times " != 0" 3 "optimized" } } */
 /* { dg-final { scan-tree-dump-times " & " 2 "optimized" } } */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.