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/120477
gcc/ChangeLog:
* tree-ssa-math-opts.cc (arith_overflow_check_p): Remove dead code.
Signed-off-by: Kael Andrew Franco <[email protected]>
---
gcc/tree-ssa-math-opts.cc | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/gcc/tree-ssa-math-opts.cc b/gcc/tree-ssa-math-opts.cc
index 0df1909ebc4..2895229d2d1 100644
--- a/gcc/tree-ssa-math-opts.cc
+++ b/gcc/tree-ssa-math-opts.cc
@@ -3964,18 +3964,6 @@ arith_overflow_check_p (gimple *stmt, gimple *cast_stmt,
gimple *&use_stmt,
crhs1 = gimple_assign_rhs1 (cur_use_stmt);
crhs2 = gimple_assign_rhs2 (cur_use_stmt);
}
- else if (gimple_assign_rhs_code (cur_use_stmt) == COND_EXPR)
- {
- tree cond = gimple_assign_rhs1 (cur_use_stmt);
- if (COMPARISON_CLASS_P (cond))
- {
- ccode = TREE_CODE (cond);
- crhs1 = TREE_OPERAND (cond, 0);
- crhs2 = TREE_OPERAND (cond, 1);
- }
- else
- return 0;
- }
else
return 0;
}
--
2.55.0