From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4158 invoked by alias); 14 Dec 2010 01:41:32 -0000 Received: (qmail 4148 invoked by uid 22791); 14 Dec 2010 01:41:31 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Dec 2010 01:41:25 +0000 Received: (qmail 22604 invoked from network); 14 Dec 2010 01:41:23 -0000 Received: from unknown (HELO ?110.27.81.104?) (cltang@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Dec 2010 01:41:23 -0000 Message-ID: <4D06CB32.70304@codesourcery.com> Date: Tue, 14 Dec 2010 04:18:00 -0000 From: Chung-Lin Tang User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Andrew Pinski CC: gcc-patches Subject: Re: [patch, combine] Bit-field insertion optimization #2 References: <4D010FFC.6040805@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: 2010-12/txt/msg01047.txt.bz2 On 2010/12/14 07:06, Andrew Pinski wrote: > This patch is broken when we have: > (insn 8 7 14 2 ins-23.c:25 (set (zero_extract:SI (reg:SI 195 [ a ]) > (const_int 8 [0x8]) > (const_int 12 [0xc])) > (reg:SI 196)) 214 {insvsi} (expr_list:REG_EQUAL (const_int -1 > [0xffffffffffffffff]) > (nil))) > > It does the correct thing of replacing it with: > (set (reg:SI 195 [ a ]) > (ior:SI (reg:SI 4 $4 [ a ]) > (const_int 1044480 [0xff000]))) > But then it does remove the reg_equal from the instruction which > causes us to get: > (set (reg/i:DI 2 $2) > (const_int -1 [0xffffffffffffffff])) Hi Andrew, thanks for testing and finding this. Do you have a testcase I can use? Thanks! Chung-Lin