From 8533c9d8ac498572eec1978b30860b487e47ade3 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Tue, 30 Mar 2010 19:58:35 +0000 Subject: Replace type != type comparisons with types_compatible_p. 2010-03-30 Sebastian Pop PR middle-end/43430 * tree-vect-slp.c (vect_get_and_check_slp_defs): Replace type pointer comparisons with types_compatible_p. * tree-vect-stmts.c (vectorizable_call): Same. (vectorizable_condition): Same. * gcc.dg/vect/pr43430-1.c: New. From-SVN: r157833 --- gcc/tree-vect-stmts.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/tree-vect-stmts.c') diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index c280e81..48bf1bd 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -1268,7 +1268,7 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt) /* We can only handle calls with arguments of the same type. */ if (rhs_type - && rhs_type != TREE_TYPE (op)) + && !types_compatible_p (rhs_type, TREE_TYPE (op))) { if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "argument types differ."); @@ -3863,7 +3863,8 @@ vectorizable_condition (gimple stmt, gimple_stmt_iterator *gsi, /* We do not handle two different vector types for the condition and the values. */ - if (TREE_TYPE (TREE_OPERAND (cond_expr, 0)) != TREE_TYPE (vectype)) + if (!types_compatible_p (TREE_TYPE (TREE_OPERAND (cond_expr, 0)), + TREE_TYPE (vectype))) return false; if (TREE_CODE (then_clause) == SSA_NAME) -- cgit v1.1