tree-vectorizer.c (vect_analyze_offset_expr): Strip conversions that don't narrow the value.

* tree-vectorizer.c (vect_analyze_offset_expr): Strip conversions
        that don't narrow the value.  Fail for other conversions.

From-SVN: r92804
This commit is contained in:
Richard Henderson 2005-01-02 00:35:34 -08:00 committed by Richard Henderson
parent bedb9fc04b
commit 155a821372
2 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-01-01 Richard Henderson <rth@redhat.com>
* tree-vectorizer.c (vect_analyze_offset_expr): Strip conversions
that don't narrow the value. Fail for other conversions.
2005-01-01 Richard Henderson <rth@redhat.com>
PR c/19031

View File

@ -1390,7 +1390,22 @@ vect_analyze_offset_expr (tree expr,
enum tree_code code;
tree init, evolution, def_stmt;
STRIP_NOPS (expr);
/* Strip conversions that don't narrow the mode. */
while (TREE_CODE (expr) == NOP_EXPR || TREE_CODE (expr) == CONVERT_EXPR)
{
tree to, ti;
to = TREE_TYPE (expr);
oprnd0 = TREE_OPERAND (expr, 0);
ti = TREE_TYPE (oprnd0);
if (!INTEGRAL_TYPE_P (to) || !INTEGRAL_TYPE_P (ti))
return false;
if (GET_MODE_SIZE (TYPE_MODE (to)) < GET_MODE_SIZE (TYPE_MODE (ti)))
return false;
expr = oprnd0;
}
*step = NULL_TREE;
*misalign = NULL_TREE;