From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32745 invoked by alias); 15 Aug 2007 12:16:50 -0000 Received: (qmail 32345 invoked by uid 22791); 15 Aug 2007 12:16:48 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 15 Aug 2007 12:16:45 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7FCGgQn011777; Wed, 15 Aug 2007 08:16:42 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7FCGgLq014207; Wed, 15 Aug 2007 08:16:42 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l7FCGgJh003496; Wed, 15 Aug 2007 08:16:42 -0400 Received: (from jakub@localhost) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11/Submit) id l7FCGgbf003492; Wed, 15 Aug 2007 08:16:42 -0400 Date: Wed, 15 Aug 2007 12:16:00 -0000 From: Jakub Jelinek To: Sa Liu Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Handel REG_LIBCALL note after split Message-ID: <20070815121642.GR2063@devserv.devel.redhat.com> Reply-To: Jakub Jelinek References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00929.txt.bz2 On Thu, Aug 09, 2007 at 03:40:39PM +0200, Sa Liu wrote: > This patch relink the insns with REG_LIBCALL note and with REG_RETVAL note > after split. > The discussion in GCC mailing list can be found here: > http://gcc.gnu.org/ml/gcc/2007-07/msg00925.html > > The patch has been tested on spu with gcc test suits and got no > regression. > --- gcc.orig/emit-rtl.c > +++ gcc/emit-rtl.c > @@ -3264,6 +3264,16 @@ try_split (rtx pat, rtx trial, int last) > } > break; > #endif > + case REG_LIBCALL: > + /* Relink the insns with REG_LIBCALL note and with REG_RETVAL note > > + after split. */ > + REG_NOTES (insn_last) > + = gen_rtx_EXPR_LIST (REG_LIBCALL, > + XEXP (note, 0), > + REG_NOTES (insn_last)); > + note_retval = find_reg_note (XEXP (note, 0), REG_RETVAL, NULL); > + XEXP (note_retval, 0) = insn_last; > + break; > > default: > break; REG_LIBCALL is together with REG_RETVAL, REG_CC_SETTER, REG_CC_USER and REG_LABEL supposed to use INSN_LIST rather than EXPR_LIST. In addition to being printed wrongly in dumps this causes PR33074 regression. Fixed thusly, committed as obvious: 2007-08-15 Jakub Jelinek PR middle-end/33074 * emit-rtl.c (try_split): Use INSN_LIST instead of EXPR_LIST for REG_LIBCALL note. * gfortran.dg/pr33074.f90: New test. --- gcc/emit-rtl.c.jj 2007-08-13 15:11:18.000000000 +0200 +++ gcc/emit-rtl.c 2007-08-15 13:44:36.000000000 +0200 @@ -3274,7 +3274,7 @@ try_split (rtx pat, rtx trial, int last) /* Relink the insns with REG_LIBCALL note and with REG_RETVAL note after split. */ REG_NOTES (insn_last) - = gen_rtx_EXPR_LIST (REG_LIBCALL, + = gen_rtx_INSN_LIST (REG_LIBCALL, XEXP (note, 0), REG_NOTES (insn_last)); --- gcc/testsuite/gfortran.dg/pr33074.f90.jj 2007-08-15 14:00:16.000000000 +0200 +++ gcc/testsuite/gfortran.dg/pr33074.f90 2007-08-15 13:58:57.000000000 +0200 @@ -0,0 +1,8 @@ +! PR middle-end/33074 +! { dg-do compile } +! { dg-options "-O" } + +subroutine pr33074(a, w) + real a(1), w(1) + a(1) = 2.0**int(w(1)) +end Jakub