From patchwork Mon Oct 29 09:06:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 194916 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 99AEE2C0095 for ; Mon, 29 Oct 2012 20:07:07 +1100 (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=1352106427; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=owqF8SdfbZkhS17B3zn8g5BMjq8=; b=PwihfWWgTG3zwfgNeFmB6dZDDDq6cUrLxe2yYtJQKCEfKZR9bHjHPcCJQIFtsy 2JYtB3vF77WrdUcHQqNRW/Gk4HCjxzBJneh4ovMC6Oz3Fr6PtIIUhTwKztiZURSt uXc3D0dJqEhjYiyCEJ0V6yof+q8OnLq+EfuwTjn4v5Qos= 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:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=GhvW3DE2OjEWqRfqRB+oQjrOv18msWe4O9zZyR2wb+/A0igFaqj1R15jJElS58 0e64Qtg/XeRSbhqQLrRjV6M8ZLOg0N6oMQYaJoMafjR0oJMFa9WlE+/9Yw+DHC7d 9qBxHBDqs9eUDhhV/BviEV3SG6hcMjLnZo6p1zMNtD1ok=; Received: (qmail 7180 invoked by alias); 29 Oct 2012 09:06:57 -0000 Received: (qmail 7166 invoked by uid 22791); 29 Oct 2012 09:06:56 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-da0-f47.google.com (HELO mail-da0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Oct 2012 09:06:51 +0000 Received: by mail-da0-f47.google.com with SMTP id s35so2164907dak.20 for ; Mon, 29 Oct 2012 02:06:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.125.230 with SMTP id mt6mr91126216pbb.110.1351501611072; Mon, 29 Oct 2012 02:06:51 -0700 (PDT) Received: by 10.66.246.232 with HTTP; Mon, 29 Oct 2012 02:06:50 -0700 (PDT) In-Reply-To: References: Date: Mon, 29 Oct 2012 10:06:50 +0100 Message-ID: Subject: Re: [RFC PATCH, i386]: Remove peephole2s for (subreg (operator (...)(...))) RTXes From: Uros Bizjak To: "H.J. Lu" Cc: gcc-patches@gcc.gnu.org, Richard Sandiford 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 On Mon, Oct 29, 2012 at 9:07 AM, Uros Bizjak wrote: >>>> As suggested by Richard S. [1], after the patch that converts subreg:M >>>> (op:N (...)(...)) to op:M (subreg:M (...) subreg:M (...)), we can >>>> remove several peephole2 patterns that handle subregs of PLUS, MINUS >>>> and MULT operators. I have attached RFC prototype patch that will >>>> trigger an ICE when to-be-removed pattern triggers, with the intention >>>> that these patterns wil be removed entirely (An "invalid" pattern was >>>> indeed generated elsewhere, see patch). > > I have committed following version that avoids all failures, reported by H.J.: > > 2012-10-29 Uros Bizjak > > * config/i386/i386.c (ix86_decompose_address): Use simplify_gen_subreg > to generate SImode equivalent of address, zero-extended with AND RTX. > * config/i386/i386.md (ashift to lea splitter): Split to SImode mult. > (simple lea to add/shift peephole2s): Remove peephole2s that operate > on subregs of DImode operations. > > Re-tested on x86_64-pc-linux-gnu {,-m32} and committed to mainline SVN. Oh, we don't have to use simplify_gen_subreg, gen_subreg is enough. Patch committed as obvious to mainline SVN. Uros. > Uros. Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 192908) +++ config/i386/i386.c (working copy) @@ -11822,7 +11822,7 @@ ix86_decompose_address (rtx addr, struct ix86_addr } else if (GET_MODE (addr) == DImode) { - addr = simplify_gen_subreg (SImode, addr, DImode, 0); + addr = simplify_subreg (SImode, addr, DImode, 0); if (addr == NULL_RTX) return 0; }