]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
VEC_COND_EXPR verification adjustment
authorRichard Biener <rguenther@suse.de>
Wed, 14 Apr 2021 08:26:33 +0000 (10:26 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 14 Apr 2021 11:39:33 +0000 (13:39 +0200)
This adjusts GIMPLE verification with respect to the VEC_COND_EXPR
changes forcing a split out condition.

2021-04-14  Richard Biener  <rguenther@suse.de>

* tree-cfg.c (verify_gimple_assign_ternary): Verify that
VEC_COND_EXPRs have a gimple_val condition.
* tree-ssa-propagate.c (valid_gimple_rhs_p): VEC_COND_EXPR
can no longer have a GENERIC condition.

gcc/tree-cfg.c
gcc/tree-ssa-propagate.c

index 7e3aae5f9c28a49feedc7cc66e8ac0d476b9f28a..4f63aa69ba88dfe3d6ecc2c65727f079902cb2cd 100644 (file)
@@ -4246,6 +4246,8 @@ verify_gimple_assign_ternary (gassign *stmt)
          debug_generic_expr (rhs1_type);
          return true;
        }
+      if (!is_gimple_val (rhs1))
+       return true;
       /* Fallthrough.  */
     case COND_EXPR:
       if (!is_gimple_val (rhs1)
index def16c036ab9eba6303b82776f5469916db0e0ee..17dd1efd81dfc38b6a5f4b909a06c704a78b9e4c 100644 (file)
@@ -515,7 +515,7 @@ valid_gimple_rhs_p (tree expr)
        default:
          if (get_gimple_rhs_class (code) == GIMPLE_TERNARY_RHS)
            {
-             if (((code == VEC_COND_EXPR || code == COND_EXPR)
+             if ((code == COND_EXPR
                   ? !is_gimple_condexpr (TREE_OPERAND (expr, 0))
                   : !is_gimple_val (TREE_OPERAND (expr, 0)))
                  || !is_gimple_val (TREE_OPERAND (expr, 1))