From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92752 invoked by alias); 8 Feb 2016 09:16:52 -0000 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 Received: (qmail 92731 invoked by uid 89); 8 Feb 2016 09:16:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=simplifier, D*1, pr31531.c, integer_cst1 X-HELO: eusmtp01.atmel.com Received: from eusmtp01.atmel.com (HELO eusmtp01.atmel.com) (212.144.249.243) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 08 Feb 2016 09:16:49 +0000 Received: from HNOCHT02.corp.atmel.com (10.161.30.162) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server (TLS) id 14.3.235.1; Mon, 8 Feb 2016 10:16:43 +0100 Received: from jaguar.atmel.com (10.161.30.18) by HNOCHT02.corp.atmel.com (10.161.30.162) with Microsoft SMTP Server (TLS) id 14.3.235.1; Mon, 8 Feb 2016 10:16:44 +0100 References: User-agent: mu4e 0.9.13; emacs 24.5.1 From: Senthil Kumar Selvaraj To: "Hurugalawadi, Naveen" CC: "gcc-patches@gcc.gnu.org" , "Pinski, Andrew" Subject: Re: PATCH] Fix PR 31531: A microoptimization of isnegative of signed integer In-Reply-To: Date: Mon, 08 Feb 2016 09:16:00 -0000 Message-ID: <87egcn7eae.fsf@atmel.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00512.txt.bz2 Hurugalawadi, Naveen writes: > Hi, > > Please find attached the patch that performs optimization on unsigned values. > > Original fold-const part implemented in match.pd. > > Please review the patch and let us know if it's OK? > > Regression Tested on X86_64 with no regressions. > > Thanks, > Naveen > > ChangeLog: > * match.pd (cmp (convert (bit_not @0)) INTEGER_CST@1): New Simplifier. > > Testsuite/ChangeLog: > * gcc.dg/pr31531.c : New testcase. Could you please add dg-require-effective-target int32 to the test to avoid breaking targets with smaller ints (right shift by 31 bits)? Regards Senthil