From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11733 invoked by alias); 12 Apr 2012 08:56:46 -0000 Received: (qmail 11724 invoked by uid 22791); 12 Apr 2012 08:56:45 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Apr 2012 08:56:25 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3C8u3jw021393 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 12 Apr 2012 04:56:03 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3C8u2ee009115 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 12 Apr 2012 04:56:02 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id q3C8u1oc008251; Thu, 12 Apr 2012 10:56:01 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id q3C8u0WY008249; Thu, 12 Apr 2012 10:56:00 +0200 Date: Thu, 12 Apr 2012 08:56:00 -0000 From: Jakub Jelinek To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org Subject: Re: [IA-64] Fix PR target/48496 Message-ID: <20120412085600.GL16117@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <201204112301.40164.ebotcazou@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201204112301.40164.ebotcazou@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-04/txt/msg00726.txt.bz2 On Wed, Apr 11, 2012 at 11:01:40PM +0200, Eric Botcazou wrote: > 2012-04-11 Eric Botcazou > > PR target/48496 > * config/ia64/constraints.md (Q): Only accept non-volatile MEMs and > also pseudo-registers during reload. > > > 2012-04-11 Eric Botcazou > > * gcc.target/ia64/pr48496.c: New test. > * gcc.target/ia64/pr52657.c: Likewise. Is the standard condition for define_memory_constraint here /* Likewise if the address will be reloaded because reg_equiv_address is nonzero. For reg_equiv_mem we have to check. */ else if (REG_P (operand) && REGNO (operand) >= FIRST_PSEUDO_REGISTER && reg_renumber[REGNO (operand)] < 0 && ((reg_equiv_mem (REGNO (operand)) != 0 && EXTRA_CONSTRAINT_STR (reg_equiv_mem (REGNO (operand)), c, p)) || (reg_equiv_address (REGNO (operand)) != 0))) win = 1; If so, shouldn't you check those conditions as well, or at least something similar? Not sure if reg_equiv_address needs to be allowed there, and guess reg_equiv_mem should satisfy the Q constraint, i.e. !MEM_VOLATILE_P memory_operand. Accepting any pseudo there sounds too risky to me... > Index: config/ia64/constraints.md > =================================================================== > --- config/ia64/constraints.md (revision 186272) > +++ config/ia64/constraints.md (working copy) > @@ -111,11 +111,16 @@ (define_constraint "H" > > ;; Note that while this accepts mem, it only accepts non-volatile mem, > ;; and so cannot be "fixed" by adjusting the address. Thus it cannot > -;; and does not use define_memory_constraint. > +;; and does not use define_memory_constraint. But it needs to accept > +;; pseudo-registers during reload like a define_memory_constraint. > (define_constraint "Q" > "Non-volatile memory for FP_REG loads/stores" > - (and (match_operand 0 "memory_operand") > - (match_test "!MEM_VOLATILE_P (op)"))) > + (ior (and (match_code "mem") > + (match_test "!MEM_VOLATILE_P (op)") > + (match_operand 0 "memory_operand")) > + (and (match_code "reg") > + (match_test "!HARD_REGISTER_P (op)") > + (match_test "reload_in_progress")))) > > (define_constraint "R" > "1..4 for shladd arguments" Jakub