[gcc r17-3270] sanitizer: Remove dead code in sancov.cc. [PR120581]

Kael Andrew Franco via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:e34e364a520f67d371c2aba43828ec1c50aef71f

commit r17-3270-ge34e364a520f67d371c2aba43828ec1c50aef71f
Author: Kael Andrew Alonzo Franco <[email protected]>
Date:   Wed Aug 12 20:11:25 2026 -0400

    sanitizer: Remove dead code in sancov.cc. [PR120581]
    
    This is dead since COND_EXPR is always a SSA_NAME or a constant.
    
    Bootstrapped and regtested on x86_64-pc-linux-gnu.
    
            PR sanitizer/120581
    
    gcc/ChangeLog:
    
            * sancov.cc (sancov_pass): Remove dead code.
    
    Signed-off-by: Kael Andrew Franco <[email protected]>

Diff:
---
 gcc/sancov.cc | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/gcc/sancov.cc b/gcc/sancov.cc
index 79db399736c7..85f7c4c62051 100644
--- a/gcc/sancov.cc
+++ b/gcc/sancov.cc
@@ -274,13 +274,6 @@ sancov_pass (function *fun)
 		    instrument_comparison (&gsi,
 					   gimple_assign_rhs1 (stmt),
 					   gimple_assign_rhs2 (stmt));
-		  else if (rhs_code == COND_EXPR
-			   && COMPARISON_CLASS_P (gimple_assign_rhs1 (stmt)))
-		    {
-		      tree cond = gimple_assign_rhs1 (stmt);
-		      instrument_comparison (&gsi, TREE_OPERAND (cond, 0),
-					     TREE_OPERAND (cond, 1));
-		    }
 		  break;
 		case GIMPLE_COND:
 		  instrument_comparison (&gsi,
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.