aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-stmts.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2010-03-30 19:58:35 +0000
committerSebastian Pop <spop@gcc.gnu.org>2010-03-30 19:58:35 +0000
commit8533c9d8ac498572eec1978b30860b487e47ade3 (patch)
tree22b4bb57614eef3adf7e4f9f22fb36de4a3af545 /gcc/tree-vect-stmts.c
parentce0ecb98c2297112599b26191d5294187016307c (diff)
downloadgcc-8533c9d8ac498572eec1978b30860b487e47ade3.zip
gcc-8533c9d8ac498572eec1978b30860b487e47ade3.tar.gz
gcc-8533c9d8ac498572eec1978b30860b487e47ade3.tar.bz2
Replace type != type comparisons with types_compatible_p.
2010-03-30 Sebastian Pop <sebastian.pop@amd.com> 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
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r--gcc/tree-vect-stmts.c5
1 files changed, 3 insertions, 2 deletions
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)