Fix ICE in re-simplification of VEC_COND_EXPR
authorFrederik Harwath <frederik@codesourcery.com>
Fri, 29 Nov 2019 15:02:35 +0000 (15:02 +0000)
committerFrederik Harwath <frederik@gcc.gnu.org>
Fri, 29 Nov 2019 15:02:35 +0000 (15:02 +0000)
commit6851de8b9003582f4c3dbcbfd598cba367f0fbc3
tree044542ed3bf35ca0399d591f60710c233294a8fc
parent7e99af4816cfad578094fcf08e2377f3ed76e201
Fix ICE in re-simplification of VEC_COND_EXPR

The function maybe_resimplify_conditional_op uses operation_could_trap_p to
check if the resulting operation of a simplification can trap.  Because of the
changes introduced by revision r276659, this results in an ICE due to a
violated assertion in operation_could_trap_p if the operation is a COND_EXPR or
a VEC_COND_EXPR.  The changes have allowed those expressions to trap and
whether they do cannot be determined without considering their condition
which is not available to operation_could_trap_p.

Change maybe_resimplify_conditional_op to inspect the condition of
COND_EXPRs and VEC_COND_EXPRs to determine if they can trap.

From-SVN: r278853
gcc/ChangeLog
gcc/gimple-match-head.c