[PATCH 3/5] tree-optimization: Remove dead code in gimple-ssa-nonnull-compare.cc. [PR120580]

Kael Andrew Alonzo Franco <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
This is dead since COND_EXPR is always a SSA_NAME or a constant.

Bootstrapped and regtested on x86_64-pc-linux-gnu.

	PR tree-optimization/120580

gcc/ChangeLog:

	* gimple-ssa-nonnull-compare.cc (do_warn_nonnull_compare):
	Remove dead code.

Signed-off-by: Kael Andrew Franco <[email protected]>
---
 gcc/gimple-ssa-nonnull-compare.cc | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/gcc/gimple-ssa-nonnull-compare.cc b/gcc/gimple-ssa-nonnull-compare.cc
index 7524d789cf1..a9ba27d5567 100644
--- a/gcc/gimple-ssa-nonnull-compare.cc
+++ b/gcc/gimple-ssa-nonnull-compare.cc
@@ -73,24 +73,6 @@ do_warn_nonnull_compare (function *fun, tree arg)
 	    if (gimple_assign_rhs1 (stmt) == d)
 	      op = gimple_assign_rhs2 (stmt);
 	    break;
-	  case COND_EXPR:
-	    switch (TREE_CODE (gimple_assign_rhs1 (stmt)))
-	      {
-	      case EQ_EXPR:
-	      case NE_EXPR:
-		op = gimple_assign_rhs1 (stmt);
-		if (TREE_OPERAND (op, 0) != d)
-		  {
-		    op = NULL_TREE;
-		    break;
-		  }
-		loc = EXPR_LOC_OR_LOC (op, loc);
-		op = TREE_OPERAND (op, 1);
-		break;
-	      default:
-		break;
-	      }
-	    break;
 	  default:
 	    break;
 	  }
-- 
2.55.0
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.