[gcc(refs/users/marxin/heads/assert-expand_vec_cond_expr-non-null)] Assert when expand_vec_cond_expr returns NULL.

Martin Liska marxin@gcc.gnu.org
Mon Mar 2 14:46:00 GMT 2020


https://gcc.gnu.org/g:5767924b7a8afc180d4859dc983166965d53a7c5

commit 5767924b7a8afc180d4859dc983166965d53a7c5
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Mar 2 15:44:07 2020 +0100

    Assert when expand_vec_cond_expr returns NULL.

Diff:
---
 gcc/expr.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gcc/expr.c b/gcc/expr.c
index b97c217..0b5473a 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -9208,8 +9208,10 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode,
 	  tree t1 = make_tree (type, op1);
 	  tree comparison = build2 (code == MIN_EXPR ? LE_EXPR : GE_EXPR,
 				    type, t0, t1);
-	  return expand_vec_cond_expr (type, comparison, t0, t1,
+	  temp = expand_vec_cond_expr (type, comparison, t0, t1,
 				       original_target);
+	  gcc_assert (temp);
+	  return temp;
 	}
 
       /* At this point, a MEM target is no longer useful; we will get better
@@ -9801,6 +9803,7 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode,
 
     case VEC_COND_EXPR:
       target = expand_vec_cond_expr (type, treeop0, treeop1, treeop2, target);
+      gcc_assert (target);
       return target;
 
     case VEC_DUPLICATE_EXPR:
@@ -12145,8 +12148,10 @@ do_store_flag (sepops ops, rtx target, machine_mode mode)
 	{
 	  tree if_true = constant_boolean_node (true, ops->type);
 	  tree if_false = constant_boolean_node (false, ops->type);
-	  return expand_vec_cond_expr (ops->type, ifexp, if_true,
-				       if_false, target);
+	  rtx temp = expand_vec_cond_expr (ops->type, ifexp, if_true,
+					   if_false, target);
+	  gcc_assert (temp);
+	  return temp;
 	}
     }



More information about the Gcc-cvs mailing list