From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30046 invoked by alias); 24 Oct 2014 11:29:54 -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 30036 invoked by uid 89); 24 Oct 2014 11:29:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham 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 (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 24 Oct 2014 11:29:52 +0000 Received: from ip-149.net-81-220-91.toulouse.rev.numericable.fr (HELO laptop-mg.local) ([81.220.91.149]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Oct 2014 13:29:48 +0200 Date: Fri, 24 Oct 2014 11:38:00 -0000 From: Marc Glisse Reply-To: gcc-patches@gcc.gnu.org To: Richard Biener cc: gcc-patches@gcc.gnu.org, Jakub Jelinek Subject: Re: [PATCH][3,4,5/n] Merge from match-and-simplify, fold, fold_stmt and first patterns In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-SW-Source: 2014-10/txt/msg02530.txt.bz2 > + /* Same applies to modulo operations, but fold is inconsistent here > + and simplifies 0 % x to 0, only preserving literal 0 % 0. */ > + (for op (ceil_mod floor_mod round_mod trunc_mod) > + /* 0 % X is always zero. */ > + (simplify > + (trunc_mod integer_zerop@0 @1) > + /* But not for 0 % 0 so that we can get the proper warnings and errors. */ > + (if (!integer_zerop (@1)) > + @0)) > + /* X % 1 is always zero. */ > + (simplify > + (trunc_mod @0 integer_onep) > + { build_zero_cst (type); })) "op" is unused, you probably meant to replace trunc_mod with it. -- Marc Glisse