[gcc r17-3267] tree-optimization: Remove dead code in gimple.cc. [PR120579]
Kael Andrew Franco via Gcc-cvs <[email protected]>
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:7f549ea2b47a709e9966ce608b92a44f3d2c2353 commit r17-3267-g7f549ea2b47a709e9966ce608b92a44f3d2c2353 Author: Kael Andrew Alonzo Franco <[email protected]> Date: Wed Aug 12 20:40:24 2026 -0400 tree-optimization: Remove dead code in gimple.cc. [PR120579] 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/120579 gcc/ChangeLog: * gimple.cc (gimple_could_trap_p_1): Remove dead code. Signed-off-by: Kael Andrew Franco <[email protected]> Diff: --- gcc/gimple.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/gimple.cc b/gcc/gimple.cc index 648400aa4445..3756a60a8e6e 100644 --- a/gcc/gimple.cc +++ b/gcc/gimple.cc @@ -2435,9 +2435,9 @@ gimple_could_trap_p_1 (const gimple *s, bool include_mem, bool include_stores) case GIMPLE_ASSIGN: op = gimple_assign_rhs_code (s); - /* For COND_EXPR only the condition may trap. */ + /* COND_EXPR does not trap. */ if (op == COND_EXPR) - return tree_could_trap_p (gimple_assign_rhs1 (s)); + return false; /* For comparisons we need to check rhs operand types instead of lhs type (which is BOOLEAN_TYPE). */