This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 54193: raw gimple dump of vec_perm_expr
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Marc Glisse <marc dot glisse at inria dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 12 Aug 2012 15:58:54 +0200
- Subject: Re: PR 54193: raw gimple dump of vec_perm_expr
- References: <alpine.DEB.2.02.1208112227050.16250@stedding.saclay.inria.fr>
On Sat, Aug 11, 2012 at 10:37 PM, Marc Glisse <marc.glisse@inria.fr> wrote:
> Hello,
>
> I'll have to retest this patch tomorrow (although I don't expect the
> modified code is ever called), for some reason the testsuite took twice as
> long as usual to run and showed some weird stuff tonight.
>
> There doesn't seem to be any test calling -fdump-tree-*-raw, so I didn't add
> any.
>
> I wondered about spelling out 3 calls to dump_gimple_fmt to avoid the
> trailing NULLs, but who cares...
Ok.
Thanks,
Richard.
> 2012-08-12 Marc Glisse <marc.glisse@inria.fr>
>
> PR middle-end/54193
> * gimple-pretty-print.c (dump_ternary_rhs): Handle 4 arguments.
>
> --
> Marc Glisse
> Index: gcc/gimple-pretty-print.c
> ===================================================================
> --- gcc/gimple-pretty-print.c (revision 190318)
> +++ gcc/gimple-pretty-print.c (working copy)
> @@ -470,31 +470,39 @@ dump_ternary_rhs (pretty_printer *buffer
>
>
> /* Dump the gimple assignment GS. BUFFER, SPC and FLAGS are as in
> dump_gimple_stmt. */
>
> static void
> dump_gimple_assign (pretty_printer *buffer, gimple gs, int spc, int flags)
> {
> if (flags & TDF_RAW)
> {
> - tree last;
> - if (gimple_num_ops (gs) == 2)
> - last = NULL_TREE;
> - else if (gimple_num_ops (gs) == 3)
> - last = gimple_assign_rhs2 (gs);
> - else
> - gcc_unreachable ();
> + tree arg1 = NULL;
> + tree arg2 = NULL;
> + tree arg3 = NULL;
> + switch (gimple_num_ops (gs))
> + {
> + case 4:
> + arg3 = gimple_assign_rhs3 (gs);
> + case 3:
> + arg2 = gimple_assign_rhs2 (gs);
> + case 2:
> + arg1 = gimple_assign_rhs1 (gs);
> + break;
> + default:
> + gcc_unreachable ();
> + }
>
> - dump_gimple_fmt (buffer, spc, flags, "%G <%s, %T, %T, %T>", gs,
> + dump_gimple_fmt (buffer, spc, flags, "%G <%s, %T, %T, %T, %T>", gs,
> tree_code_name[gimple_assign_rhs_code (gs)],
> - gimple_assign_lhs (gs), gimple_assign_rhs1 (gs),
> last);
> + gimple_assign_lhs (gs), arg1, arg2, arg3);
> }
> else
> {
> if (!(flags & TDF_RHS_ONLY))
> {
> dump_generic_node (buffer, gimple_assign_lhs (gs), spc, flags,
> false);
> pp_space (buffer);
> pp_character (buffer, '=');
>
> if (gimple_assign_nontemporal_move_p (gs))
>