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]>
---
gcc/gimple.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/gimple.cc b/gcc/gimple.cc
index 648400aa444..3756a60a8e6 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). */
--
2.55.0