From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7453 invoked by alias); 18 Oct 2011 08:25:16 -0000 Received: (qmail 7437 invoked by uid 22791); 18 Oct 2011 08:25:15 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Oct 2011 08:25:00 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RG4ym-0004yt-Up for gcc@gcc.gnu.org; Tue, 18 Oct 2011 10:24:56 +0200 Received: from 193.128.72.68 ([193.128.72.68]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Oct 2011 10:24:56 +0200 Received: from paulo by 193.128.72.68 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Oct 2011 10:24:56 +0200 To: gcc@gcc.gnu.org From: "Paulo J. Matos" Subject: Re: Expanding instructions with condition codes inter-deps Date: Tue, 18 Oct 2011 13:44:00 -0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 In-Reply-To: X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00270.txt.bz2 On 17/10/11 17:20, Andrew Pinski wrote: > On Mon, Oct 17, 2011 at 3:50 AM, Paulo J. Matos wrote: > >> addc_internal looks like: >> (define_insn "addc_internal" >> [(set (match_operand:QI 0 "nonimmediate_operand" "=c") >> (plus:QI >> (plus:QI >> (ltu:QI (reg:CC RCC) (const_int 0)) >> (match_operand:QI 1 "nonimmediate_operand" "%0")) >> (match_operand:QI 2 "general_operand" "cwmi"))) >> (clobber (reg:CC RCC))] >> "" >> "addc\\t%0,%f2") > > Try adding (use (reg:CC RCC)) to the pattern above. > Currently compiling that change into the code. I have a feeling that it will either confuse compare-elim.c or that it will be too strict and remove any possibility of optimization since with (use (reg:CC RCC)) we are not really saying that we are only interested in the carry flag instead of the whole thing. It will avoid anything clobbering RCC which is most of the instructions. I will give it a spin and see what actually happens. Thanks, -- PMatos