From patchwork Sat Aug 11 20:37:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Glisse X-Patchwork-Id: 176752 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id ECC5D2C008B for ; Sun, 12 Aug 2012 06:37:25 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1345322247; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:Subject:Message-ID:User-Agent:MIME-Version: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=RiHRr+E Qc7p4n9KA1sTnTwUJ8jE=; b=CNdy03zKeIIda8t3pQT4F1dfRpskma4qZY2FZ4Q xyxfaLuYE7KMVF8LEPjkKtXup3rRXdXCSrLzLdAgjeawHUR/S6ZasJULHW4TeOVy 1U7jC0NScliEiSh3ZA7i79EWuvxIecIRnr74+P1KQ/iE36rAykbq3mS15hYdkhlW dra0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:Subject:Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=LlTGXlVZlKLR5HRfDIkL9quViH4Fxk9xCtJgPpH6b2ikOx9JAaILVAv5xjEdCh qcAwsAZUZFYYyQdRkqm8zlAlNCjdUWtjoAi+ZsDQRuJaV7HRSVStpDBmv4GhhTqn iX7jDGc0cd1wVf/eZX/RMGOdz4xbuvszBZRe2VkMzn/Q0=; Received: (qmail 24336 invoked by alias); 11 Aug 2012 20:37:23 -0000 Received: (qmail 24327 invoked by uid 22791); 11 Aug 2012 20:37:22 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail1-relais-roc.national.inria.fr (HELO mail1-relais-roc.national.inria.fr) (192.134.164.82) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 11 Aug 2012 20:37:09 +0000 Received: from stedding.saclay.inria.fr ([193.55.250.194]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 11 Aug 2012 22:37:08 +0200 Received: from glisse (helo=localhost) by stedding.saclay.inria.fr with local-esmtp (Exim 4.80) (envelope-from ) id 1T0IQm-0004Ek-4d for gcc-patches@gcc.gnu.org; Sat, 11 Aug 2012 22:37:08 +0200 Date: Sat, 11 Aug 2012 22:37:08 +0200 (CEST) From: Marc Glisse To: gcc-patches@gcc.gnu.org Subject: PR 54193: raw gimple dump of vec_perm_expr Message-ID: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 PR middle-end/54193 * gimple-pretty-print.c (dump_ternary_rhs): Handle 4 arguments. 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))