This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [autovect] [patch] remove redundant check in (vect_is_simple_use)
- From: Dorit Nuzman <DORIT at il dot ibm dot com>
- To: Victor Kaplansky <VICTORK at il dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 29 Jan 2006 17:13:21 +0200
- Subject: Re: [autovect] [patch] remove redundant check in (vect_is_simple_use)
Victor Kaplansky/Haifa/IBM wrote on 29/01/2006 16:51:53:
> Hi,
>
> This patch removes redundant check, found by Daniel Berlin, for what it
is
> in EMPTY_STMT since it can never fail.
>
> Bootstrapped/regtested successfully on ppc64-yellowdog-linux, on
> autovect branch
>
Thanks, committed to the branch.
I think this kind of cleanup is also suitable for mainline. Would you test
& submit it for mainline as well?
thanks,
dorit
> 2006-01-29 Victor Kaplansky <victork@il.ibm.com>
>
> * tree-vectorizer.c (vect_is_simple_use): removes redundant check
for
> what it is in EMPTY_STMT since it can never fail.
>
> -- Victor
>
> Index: gcc/tree-vectorizer.c
> ===================================================================
> --- gcc/tree-vectorizer.c (revision 110366)
> +++ gcc/tree-vectorizer.c (working copy)
> @@ -1668,17 +1668,9 @@ vect_is_simple_use (tree operand, loop_v
> (Otherwise - we expect a phi_node or a modify_expr). */
> if (IS_EMPTY_STMT (*def_stmt))
> {
> - tree arg = TREE_OPERAND (*def_stmt, 0);
> - if (TREE_CODE (arg) == INTEGER_CST || TREE_CODE (arg) == REAL_CST)
> - {
> - *def = operand;
> - *dt = vect_invariant_def;
> - return true;
> - }
> -
> - if (vect_print_dump_info (REPORT_DETAILS))
> - fprintf (vect_dump, "Unexpected empty stmt.");
> - return false;
> + *def = operand;
> + *dt = vect_invariant_def;
> + return true;
> }
>
> bb = bb_for_stmt (*def_stmt);
> Index: gcc/ChangeLog.autovect
> ===================================================================
> --- gcc/ChangeLog.autovect (revision 110366)
> +++ gcc/ChangeLog.autovect (working copy)
> @@ -1,3 +1,8 @@
> +2006-01-29 Victor Kaplansky <victork@il.ibm.com>
> +
> + * tree-vectorizer.c (vect_is_simple_use): removes redundant check for
> + what it is in EMPTY_STMT since it can never fail.
> +
> 2006-01-26 Ira Rosen <irar@il.ibm.com>
>
> * tree-vect-transform.c (vect_create_data_ref_ptr): Don't handle