[Bug tree-optimization/33680] [4.3 Regression] ICE when compilling elbg.c from ffmpeg (vectorizer)
rakdver at kam dot mff dot cuni dot cz
gcc-bugzilla@gcc.gnu.org
Mon Oct 15 15:02:00 GMT 2007
------- Comment #17 from rakdver at kam dot mff dot cuni dot cz 2007-10-15 15:02 -------
Subject: Re: [4.3 Regression] ICE when compilling elbg.c from ffmpeg
(vectorizer)
> This patch fixes the ICE and doesn't cause regressions in the vectorizer
> testsuite:
>
> Index: tree-data-ref.c
> ===================================================================
> --- tree-data-ref.c (revision 129292)
> +++ tree-data-ref.c (working copy)
> @@ -571,11 +571,16 @@ split_constant_offset (tree exp, tree *v
> if (TREE_CODE (def_stmt) == GIMPLE_MODIFY_STMT)
> {
> tree def_stmt_rhs = GIMPLE_STMT_OPERAND (def_stmt, 1);
> + tree arr = NULL_TREE;
> +
> + if (TREE_CODE (def_stmt_rhs) == ADDR_EXPR)
> + arr = TREE_OPERAND (def_stmt_rhs, 0);
>
> if (!TREE_SIDE_EFFECTS (def_stmt_rhs)
> && EXPR_P (def_stmt_rhs)
> && !REFERENCE_CLASS_P (def_stmt_rhs)
> - && !get_call_expr_in (def_stmt_rhs))
> + && !get_call_expr_in (def_stmt_rhs)
> + && (!arr || TREE_THIS_NOTRAP (arr)))
you would have to be more careful here, as arr does not have to be
array_ref, so applying TREE_THIS_NOTRAP to it may cause ICEs.
Anyway, this change does not make sense to me, I need to check
what this PR is about, but there is no reason for split_constant_offset
to special-case ADDR_EXPR's this way.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33680
More information about the Gcc-bugs
mailing list