aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index b1c3cad..a0cc1ed 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3775,7 +3775,8 @@ verify_gimple_comparison (tree type, tree op0, tree op1, enum tree_code code)
return true;
}
- if (TYPE_VECTOR_SUBPARTS (type) != TYPE_VECTOR_SUBPARTS (op0_type))
+ if (maybe_ne (TYPE_VECTOR_SUBPARTS (type),
+ TYPE_VECTOR_SUBPARTS (op0_type)))
{
error ("invalid vector comparison resulting type");
debug_generic_expr (type);
@@ -4214,8 +4215,8 @@ verify_gimple_assign_binary (gassign *stmt)
if (VECTOR_BOOLEAN_TYPE_P (lhs_type)
&& VECTOR_BOOLEAN_TYPE_P (rhs1_type)
&& types_compatible_p (rhs1_type, rhs2_type)
- && (TYPE_VECTOR_SUBPARTS (lhs_type)
- == 2 * TYPE_VECTOR_SUBPARTS (rhs1_type)))
+ && known_eq (TYPE_VECTOR_SUBPARTS (lhs_type),
+ 2 * TYPE_VECTOR_SUBPARTS (rhs1_type)))
return false;
/* Fallthru. */
@@ -4365,8 +4366,8 @@ verify_gimple_assign_ternary (gassign *stmt)
case VEC_COND_EXPR:
if (!VECTOR_BOOLEAN_TYPE_P (rhs1_type)
- || TYPE_VECTOR_SUBPARTS (rhs1_type)
- != TYPE_VECTOR_SUBPARTS (lhs_type))
+ || maybe_ne (TYPE_VECTOR_SUBPARTS (rhs1_type),
+ TYPE_VECTOR_SUBPARTS (lhs_type)))
{
error ("the first argument of a VEC_COND_EXPR must be of a "
"boolean vector type of the same number of elements "
@@ -4412,11 +4413,12 @@ verify_gimple_assign_ternary (gassign *stmt)
return true;
}
- if (TYPE_VECTOR_SUBPARTS (rhs1_type) != TYPE_VECTOR_SUBPARTS (rhs2_type)
- || TYPE_VECTOR_SUBPARTS (rhs2_type)
- != TYPE_VECTOR_SUBPARTS (rhs3_type)
- || TYPE_VECTOR_SUBPARTS (rhs3_type)
- != TYPE_VECTOR_SUBPARTS (lhs_type))
+ if (maybe_ne (TYPE_VECTOR_SUBPARTS (rhs1_type),
+ TYPE_VECTOR_SUBPARTS (rhs2_type))
+ || maybe_ne (TYPE_VECTOR_SUBPARTS (rhs2_type),
+ TYPE_VECTOR_SUBPARTS (rhs3_type))
+ || maybe_ne (TYPE_VECTOR_SUBPARTS (rhs3_type),
+ TYPE_VECTOR_SUBPARTS (lhs_type)))
{
error ("vectors with different element number found "
"in vector permute expression");
@@ -4699,9 +4701,9 @@ verify_gimple_assign_single (gassign *stmt)
debug_generic_stmt (rhs1);
return true;
}
- else if (CONSTRUCTOR_NELTS (rhs1)
- * TYPE_VECTOR_SUBPARTS (elt_t)
- != TYPE_VECTOR_SUBPARTS (rhs1_type))
+ else if (maybe_ne (CONSTRUCTOR_NELTS (rhs1)
+ * TYPE_VECTOR_SUBPARTS (elt_t),
+ TYPE_VECTOR_SUBPARTS (rhs1_type)))
{
error ("incorrect number of vector CONSTRUCTOR"
" elements");
@@ -4716,8 +4718,8 @@ verify_gimple_assign_single (gassign *stmt)
debug_generic_stmt (rhs1);
return true;
}
- else if (CONSTRUCTOR_NELTS (rhs1)
- > TYPE_VECTOR_SUBPARTS (rhs1_type))
+ else if (maybe_gt (CONSTRUCTOR_NELTS (rhs1),
+ TYPE_VECTOR_SUBPARTS (rhs1_type)))
{
error ("incorrect number of vector CONSTRUCTOR elements");
debug_generic_stmt (rhs1);