From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5780 invoked by alias); 10 Jun 2011 18:31:50 -0000 Received: (qmail 5771 invoked by uid 22791); 10 Jun 2011 18:31:50 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_LR,TW_RQ,TW_TQ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Jun 2011 18:31:32 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5AIVVnV018501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 10 Jun 2011 14:31:31 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5AIVUeH014017; Fri, 10 Jun 2011 14:31:31 -0400 Received: from [10.3.113.98] (ovpn-113-98.phx2.redhat.com [10.3.113.98]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p5AIVT4X021726; Fri, 10 Jun 2011 14:31:30 -0400 Message-ID: <4DF26301.9020208@redhat.com> Date: Fri, 10 Jun 2011 18:37:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: Kaushik Phatak CC: "gcc-patches@gcc.gnu.org" , Prafulla Thakare Subject: Re: [Patch : H8300] Bug fix for bit insn and minor tweaks to insns References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 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: 2011-06/txt/msg00873.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/09/11 01:20, Kaushik Phatak wrote: > Hi, > The following patch fixes an ICE that is generated when the compiler tries > to perform bit manipulation for logical operations when the source and > destination address does not match. The testcase is also included in the > patch(gcc.dg). > The additional condition in the insn takes care of the ICE which occurs at '-O1'. > The other insn's are reordered to give preference to bit instructions using existing > constraints. > Ok to apply? > > Thanks & Regards, > Kaushik Phatak > www.kpitgnutools.com > > 2011-06-09 Kaushik Phatak > > * config/h8300/h8300.md (bsetqi_msx, bclrqi_msx, bnotqi_msx): Added > condition to disallow non-identical memory locations. > (*andqi3_2, andqi3_1, iorqi3_1, xorqi3_1): Reorder insn to give > preference to bit manipulation instructions. > * gcc.dg/h8300-bit-insn-ice2.2: New testcase. Can't the operand be MEM (reg) or MEM (const_int)? In which case INTVAL (XEXP (operands[], 0)) is the wrong test since you shouldn't be applying INTVAL to a REG. Furthermore, if you're trying to compare CONST_INTs, those are shared and you can use pointer equality rather than their underlying value. Regardless, I think the right test is rtx_equal_p (operands[0], operands[1], NULL) With that change to bsetqi_msx, bclrqi_msx and bnotqi_msx this patch is OK. jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJN8mMBAAoJEBRtltQi2kC7NjUIAJDylrPPoI6YMk4lfRwclIPT VCzk31q3DpZ3H5CEv8e6u7DmmJl9ng78uYHXejAqTbpAn/mDOtEWasBIUIhTACFF UgH3bK3wwhF412Dbr/6ND/dPCMiImzSUR8PC8N6S31k8q5JmXIkfVfX/oKaSH/n6 9VxyIfh7PmGRqjMlH434DyvOvH+qPfN3jSNLVHDvUeVYKI6gnfXtR8tuHTlIw4LO eiubgvmD4RXa6Nnpeuafs8GyTCRA5jbVU2jf3ZR3jBA08YpS/cSeECd19ytSdVuS Au20hmDPStkJwr/0kw+QtqeZRg5BP4JWF0COYQJDFQVa64Gt6LEterBmntPJr8g= =JdgV -----END PGP SIGNATURE-----