From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17372 invoked by alias); 7 Aug 2007 16:49:51 -0000 Received: (qmail 17311 invoked by uid 22791); 7 Aug 2007 16:49:50 -0000 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.31) with ESMTP; Tue, 07 Aug 2007 16:49:46 +0000 Received: from zps19.corp.google.com (zps19.corp.google.com [172.25.146.19]) by smtp-out.google.com with ESMTP id l77Gnffk021377 for ; Tue, 7 Aug 2007 17:49:41 +0100 Received: from localhost.localdomain.google.com (dhcp-172-18-116-220.corp.google.com [172.18.116.220]) (authenticated bits=0) by zps19.corp.google.com with ESMTP id l77GndBG013030 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 7 Aug 2007 09:49:39 -0700 To: gcc-patches@gcc.gnu.org Subject: PATCH COMMITTED: Discard emit_no_conflict_block clobber if register is decomposed From: Ian Lance Taylor Date: Tue, 07 Aug 2007 16:49:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00443.txt.bz2 The function emit_no_conflict_block produces a clobber before the no conflict sequence. If lower-subreg decides that it can decompose the target register, that clobber is unnecessary and in some cases actually harmful. This patch removes the clobber. Bootstrapped and tested on i686-pc-linux-gnu. Committed. Ian 2007-08-07 Ian Lance Taylor * lower-subreg.c (resolve_clobber): If the clobber has a LIBCALL note, just delete the insn. Index: lower-subreg.c =================================================================== --- lower-subreg.c (revision 127272) +++ lower-subreg.c (working copy) @@ -906,6 +906,15 @@ resolve_clobber (rtx pat, rtx insn) if (!resolve_reg_p (reg) && !resolve_subreg_p (reg)) return false; + /* If this clobber has a REG_LIBCALL note, then it is the initial + clobber added by emit_no_conflict_block. We were able to + decompose the register, so we no longer need the clobber. */ + if (find_reg_note (insn, REG_LIBCALL, NULL_RTX) != NULL_RTX) + { + delete_insn (insn); + return true; + } + orig_mode = GET_MODE (reg); words = GET_MODE_SIZE (orig_mode); words = (words + UNITS_PER_WORD - 1) / UNITS_PER_WORD;