From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9127 invoked by alias); 15 Apr 2009 18:31:30 -0000 Received: (qmail 9106 invoked by uid 22791); 15 Apr 2009 18:31:29 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_38,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Apr 2009 18:31:21 +0000 Received: from zps77.corp.google.com (zps77.corp.google.com [172.25.146.77]) by smtp-out.google.com with ESMTP id n3FIVH2r003483; Wed, 15 Apr 2009 19:31:18 +0100 Received: from localhost.localdomain.google.com (dhcp-172-22-125-203.mtv.corp.google.com [172.22.125.203]) (authenticated bits=0) by zps77.corp.google.com with ESMTP id n3FIVFRa003513 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 15 Apr 2009 11:31:15 -0700 To: Georg-Johann Lay Cc: gcc-help@gcc.gnu.org Subject: Re: Reload pass ignores constraints. Why? References: <49E4673B.10903@gjlay.de> <49E4E0E2.9090401@gjlay.de> <49E5DB32.2020905@gjlay.de> <49E62055.1020007@gjlay.de> From: Ian Lance Taylor Date: Wed, 15 Apr 2009 18:31:00 -0000 In-Reply-To: <49E62055.1020007@gjlay.de> (Georg-Johann Lay's message of "Wed\, 15 Apr 2009 19\:58\:45 +0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2009-04/txt/msg00186.txt.bz2 Georg-Johann Lay writes: > iii) Expand into MOV+LSHIFTRT and allow the resulting const in > *movsi_insn: > CSE et. al. will reconstruct the original constant and > replace MOV+LSHIFTRT with a single SET: > Bad: expanding was in vain and we Goto i) I think this is the option you should use. You should use TARGET_RTX_COSTS to make the constants which may not be immediate operands expensive. Then CSE will not reconstruct them. >> I don't know exactly what is going on. But it is most likely just a >> coincidence that it is failing when using SHIFTRT. There is probably >> some way to make it fail in other ways as well. > > Would state it like this: If the movMM expander expands the move into > several insns, each insn must be able to handle an alternative (which > reload might select) without needing a reload. Yes, but also when can_create_pseudo_p returns false the move expander must not call force_reg or gen_reg_reg or anything else which creates a new pseudo register. When can_create_pseudo_p returns true, it is often preferable to generate a new pseudo-reg rather than reuse an existing one. Ian