From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83751 invoked by alias); 25 Nov 2015 21:08: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 83737 invoked by uid 89); 25 Nov 2015 21:08:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mail2-relais-roc.national.inria.fr Received: from mail2-relais-roc.national.inria.fr (HELO mail2-relais-roc.national.inria.fr) (192.134.164.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 25 Nov 2015 21:08:49 +0000 Received: from 81-64-103-236.rev.numericable.fr (HELO laptop-mg.local) ([81.64.103.236]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Nov 2015 22:08:44 +0100 Date: Wed, 25 Nov 2015 21:27:00 -0000 From: Marc Glisse To: Jakub Jelinek cc: gcc-patches@gcc.gnu.org, Richard Biener , Richard Henderson Subject: Re: [PATCH] Convert manual unsigned +/- overflow checking into {ADD,SUB}_OVERFLOW (PR target/67089) In-Reply-To: <20151125112314.GX5675@tucnak.redhat.com> Message-ID: References: <20151124205352.GS5675@tucnak.redhat.com> <20151125083627.GU5675@tucnak.redhat.com> <20151125090425.GW5675@tucnak.redhat.com> <20151125112314.GX5675@tucnak.redhat.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-SW-Source: 2015-11/txt/msg03150.txt.bz2 On Wed, 25 Nov 2015, Jakub Jelinek wrote: >> The same is true whether we write it b > a or (a - b) > a (I don't think PRE >> + SCCVN avoid increasing register pressure). >> >>> So, I'd really prefer doing x-y>x to y>x only for single use. >> >> Ok (for now). > > Do you plan to work on that (my match.pd experience is smaller than yours), > or should I add to my todo list? Are we talking stage 3 or next stage 1? If you want something for stage 3, I think you'll have to do it, it shouldn't be much longer than (for cmp (gt le) (simplify (cmp (minus:s @0 @1) @0) (if (TYPE_UNSIGNED (TREE_TYPE (@0))) (cmp @1 @0)))) and a similar one for x