diff options
author | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-19 14:29:52 +0000 |
---|---|---|
committer | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-19 14:29:52 +0000 |
commit | 1ea6a73cf7bb61c4a80ad96d66329038114d0d79 (patch) | |
tree | 8489ea3ed78727eeb377ad35611c3a1779e5bb14 /gcc/tree-vect-patterns.c | |
parent | e1b3b79beacf0e6747eb7e6a1055d3cd0a436327 (diff) | |
download | gcc-1ea6a73cf7bb61c4a80ad96d66329038114d0d79.tar.gz |
* omp-low.c (optimize_omp_library_calls): Use types_compatible_p
instead of comparing TYPE_MAIN_VARIANT for equality.
* tree-vect-patterns.c (vect_recog_dot_prod_pattern,
vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern): Ditto.
* tree-vect-loop.c (vect_is_simple_reduction): Ditto.
* gimplify.c (goa_lhs_expr_p): Ditto and use
STRIP_USELESS_TYPE_CONVERSION.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150936 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-patterns.c')
-rw-r--r-- | gcc/tree-vect-patterns.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 1971e6ad4d3..3a77e858a57 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -233,8 +233,8 @@ vect_recog_dot_prod_pattern (gimple last_stmt, tree *type_in, tree *type_out) return NULL; oprnd0 = gimple_assign_rhs1 (last_stmt); oprnd1 = gimple_assign_rhs2 (last_stmt); - if (TYPE_MAIN_VARIANT (TREE_TYPE (oprnd0)) != TYPE_MAIN_VARIANT (type) - || TYPE_MAIN_VARIANT (TREE_TYPE (oprnd1)) != TYPE_MAIN_VARIANT (type)) + if (!types_compatible_p (TREE_TYPE (oprnd0), type) + || !types_compatible_p (TREE_TYPE (oprnd1), type)) return NULL; stmt = last_stmt; @@ -285,10 +285,8 @@ vect_recog_dot_prod_pattern (gimple last_stmt, tree *type_in, tree *type_out) oprnd0 = gimple_assign_rhs1 (stmt); oprnd1 = gimple_assign_rhs2 (stmt); - if (TYPE_MAIN_VARIANT (TREE_TYPE (oprnd0)) - != TYPE_MAIN_VARIANT (prod_type) - || TYPE_MAIN_VARIANT (TREE_TYPE (oprnd1)) - != TYPE_MAIN_VARIANT (prod_type)) + if (!types_compatible_p (TREE_TYPE (oprnd0), prod_type) + || !types_compatible_p (TREE_TYPE (oprnd1), prod_type)) return NULL; if (!widened_name_p (oprnd0, stmt, &half_type0, &def_stmt)) return NULL; @@ -296,7 +294,7 @@ vect_recog_dot_prod_pattern (gimple last_stmt, tree *type_in, tree *type_out) if (!widened_name_p (oprnd1, stmt, &half_type1, &def_stmt)) return NULL; oprnd01 = gimple_assign_rhs1 (def_stmt); - if (TYPE_MAIN_VARIANT (half_type0) != TYPE_MAIN_VARIANT (half_type1)) + if (!types_compatible_p (half_type0, half_type1)) return NULL; if (TYPE_PRECISION (prod_type) != TYPE_PRECISION (half_type0) * 2) return NULL; @@ -384,8 +382,8 @@ vect_recog_widen_mult_pattern (gimple last_stmt, oprnd0 = gimple_assign_rhs1 (last_stmt); oprnd1 = gimple_assign_rhs2 (last_stmt); - if (TYPE_MAIN_VARIANT (TREE_TYPE (oprnd0)) != TYPE_MAIN_VARIANT (type) - || TYPE_MAIN_VARIANT (TREE_TYPE (oprnd1)) != TYPE_MAIN_VARIANT (type)) + if (!types_compatible_p (TREE_TYPE (oprnd0), type) + || !types_compatible_p (TREE_TYPE (oprnd1), type)) return NULL; /* Check argument 0 */ @@ -398,7 +396,7 @@ vect_recog_widen_mult_pattern (gimple last_stmt, return NULL; oprnd1 = gimple_assign_rhs1 (def_stmt1); - if (TYPE_MAIN_VARIANT (half_type0) != TYPE_MAIN_VARIANT (half_type1)) + if (!types_compatible_p (half_type0, half_type1)) return NULL; /* Pattern detected. */ @@ -602,8 +600,8 @@ vect_recog_widen_sum_pattern (gimple last_stmt, tree *type_in, tree *type_out) oprnd0 = gimple_assign_rhs1 (last_stmt); oprnd1 = gimple_assign_rhs2 (last_stmt); - if (TYPE_MAIN_VARIANT (TREE_TYPE (oprnd0)) != TYPE_MAIN_VARIANT (type) - || TYPE_MAIN_VARIANT (TREE_TYPE (oprnd1)) != TYPE_MAIN_VARIANT (type)) + if (!types_compatible_p (TREE_TYPE (oprnd0), type) + || !types_compatible_p (TREE_TYPE (oprnd1), type)) return NULL; /* So far so good. Since last_stmt was detected as a (summation) reduction, |