This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.4 PATCH] Add 2 mark_symbols_for_rename calls to vectorizable_call
- From: Richard Guenther <rguenther at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: irar at il dot ibm dot com, gcc-patches at gcc dot gnu dot org
- Date: Fri, 25 Sep 2009 15:17:21 +0200 (CEST)
- Subject: Re: [4.4 PATCH] Add 2 mark_symbols_for_rename calls to vectorizable_call
- References: <20090925131346.GB14664@tyan-ft48-01.lab.bos.redhat.com>
On Fri, 25 Sep 2009, Jakub Jelinek wrote:
> Hi!
>
> On redhat/gcc-4_4-branch (which contains a backport of power7 changes) many
> the compiler ICEs on many SPEC2k6 sources with -O3 -mcpu=power7. The
> problem is that while e.g. __builtin_sqrt{,f} with -ffast-math is
> DECL_IS_NOVOPS, when the vectorizer replaces it with __builtin_vsx_*
> builtins which don't have any special attributes, it fails to
> mark_symbols_for_renaming and thus some variables in VOPS of the new builtin
> stay not in SSA form.
> While Michael is working on proper attributes for the power builtins and
> i386 builtins often have TREE_READONLY set (which is probably not right for
> builtins that rely on floating point rounding mode), I think the vectorizer
> should be fixed too.
>
> This is what I've bootstrapped/regtested on vanilla 4.4 branch on
> x86_64-linux and i686-linux. I don't have a testcase for vanilla 4.4, nor
> for vanilla 4.5 (where the added VOPS apparently don't need renaming), so
> I'm posting this patch just in case we want it in 4.4 and/or 4.5 (for 4.5
> it would go into tree-vect-stmts.c of course). If not, I can keep it on
> redhat/gcc-4_4-branch.
Ok for both branch and trunk. On trunk it is equivalent to
mark the single vop for renaming which probably is usually done
by another load/store stmt which already has the renaming call.
Richard.
> 2009-09-25 Jakub Jelinek <jakub@redhat.com>
>
> * tree-vect-transform.c (vectorizable_call): Call
> mark_symbols_for_renaming after vect_finish_stmt_generation.
>
> --- gcc/tree-vect-transform.c.jj 2009-04-20 21:20:46.000000000 +0200
> +++ gcc/tree-vect-transform.c 2009-09-25 09:04:52.000000000 +0200
> @@ -3386,6 +3386,7 @@ vectorizable_call (gimple stmt, gimple_s
> gimple_call_set_lhs (new_stmt, new_temp);
>
> vect_finish_stmt_generation (stmt, new_stmt, gsi);
> + mark_symbols_for_renaming (new_stmt);
>
> if (j == 0)
> STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
> @@ -3433,6 +3434,7 @@ vectorizable_call (gimple stmt, gimple_s
> gimple_call_set_lhs (new_stmt, new_temp);
>
> vect_finish_stmt_generation (stmt, new_stmt, gsi);
> + mark_symbols_for_renaming (new_stmt);
>
> if (j == 0)
> STMT_VINFO_VEC_STMT (stmt_info) = new_stmt;
>
> Jakub
>
>
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex