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-slp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gcc/tree-vect-slp.c') diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 13c96de..77fd929 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -246,14 +246,16 @@ vect_get_and_check_slp_defs (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo, if ((i == 0 && (*first_stmt_dt0 != dt[i] || (*first_stmt_def0_type && def - && *first_stmt_def0_type != TREE_TYPE (def)))) + && !types_compatible_p (*first_stmt_def0_type, + TREE_TYPE (def))))) || (i == 1 && (*first_stmt_dt1 != dt[i] || (*first_stmt_def1_type && def - && *first_stmt_def1_type != TREE_TYPE (def)))) + && !types_compatible_p (*first_stmt_def1_type, + TREE_TYPE (def))))) || (!def - && TREE_TYPE (*first_stmt_const_oprnd) - != TREE_TYPE (oprnd))) + && !types_compatible_p (TREE_TYPE (*first_stmt_const_oprnd), + TREE_TYPE (oprnd)))) { if (vect_print_dump_info (REPORT_SLP)) fprintf (vect_dump, "Build SLP failed: different types "); -- cgit v1.1