From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24684 invoked by alias); 17 May 2009 16:33:35 -0000 Received: (qmail 24654 invoked by uid 22791); 17 May 2009 16:33:25 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_52,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from mx20.gnu.org (HELO mx20.gnu.org) (199.232.41.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 17 May 2009 16:33:20 +0000 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M5jIc-0008OA-9P for gcc@gcc.gnu.org; Sun, 17 May 2009 12:33:18 -0400 Received: (qmail 27920 invoked from network); 17 May 2009 16:33:16 -0000 Received: from unknown (HELO ?192.168.2.100?) (wilson@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 May 2009 16:33:16 -0000 Message-ID: <4A103C46.7060503@codesourcery.com> Date: Sun, 17 May 2009 18:28:00 -0000 From: Jim Wilson User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Michael Hope CC: gcc@gcc.gnu.org Subject: Re: Destructive comparison References: <31d002d40905170209v5fedd93cvec67d5e9a72c9f17@mail.gmail.com> In-Reply-To: <31d002d40905170209v5fedd93cvec67d5e9a72c9f17@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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: 2009-05/txt/msg00437.txt.bz2 Michael Hope wrote: > * Using a define_insn to mark it as both a destructive xor and > compare in parallel, such as: When a compare is in a parallel, the compare must be the first operation. You have it second. This kind of pattern should work. You can find many examples of it in the sparc.md file for instance. Of course, in this case, they aren't generated at RTL generation time. They are generated at combine time. Still, I'd expect this to work, though there might be some early RTL optimization passes that are not prepared to handle it. See for instance the cmp_cc_xor_not_set pattern in the sparc.md file, which is similar to what you want. Jim