This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR 54193: raw gimple dump of vec_perm_expr
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 11 Aug 2012 22:37:08 +0200 (CEST)
- Subject: PR 54193: raw gimple dump of vec_perm_expr
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...
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))