[gcc r17-3266] tree-optimization: Remove dead code in tree-ssa-math-opts.cc. [PR120477]
Kael Andrew Franco via Gcc-cvs <[email protected]>
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:3ecb59ac017be96590653ca16cb106c68580a15f commit r17-3266-g3ecb59ac017be96590653ca16cb106c68580a15f Author: Kael Andrew Alonzo Franco <[email protected]> Date: Wed Aug 12 19:49:54 2026 -0400 tree-optimization: Remove dead code in tree-ssa-math-opts.cc. [PR120477] 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]> Diff: --- 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 0df1909ebc43..2895229d2d1d 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; }