On Fri, Apr 01, 2016 at 09:54:39AM -0600, Jeff Law wrote:
> >--- gcc/c/c-fold.c
> >+++ gcc/c/c-fold.c
> >@@ -528,6 +528,23 @@ c_fully_fold_internal (tree expr, bool in_init, bool 
> >*maybe_const_operands,
> >     *maybe_const_itself &= op2_const_self;
> >        goto out;
> >
> >+    case VEC_COND_EXPR:
> >+      orig_op0 = op0 = TREE_OPERAND (expr, 0);
> >+      op1 = TREE_OPERAND (expr, 1);
> >+      op2 = TREE_OPERAND (expr, 2);
> >+      op0 = c_fully_fold_internal (op0, in_init, maybe_const_operands,
> >+                               maybe_const_itself, for_int_const);
> >+      STRIP_TYPE_NOPS (op0);
> >+
> >+      /* OP1 will be a vector of -1 and OP2 a vector if 0, as created in
> >+     build_vec_cmp -- no need to fold them.  */
> Is this worth verifying with a gcc_assert?  Your call.
> 
> OK with or without the gcc_assert that op1/op2 are constants.

I think either we should have an gcc_checking_assert, or can't
we just handle VEC_COND_EXPR like COND_EXPR, with no extra code?

        Jakub

Reply via email to