From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116057 invoked by alias); 14 Sep 2015 09:00:56 -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 116030 invoked by uid 89); 14 Sep 2015 09:00:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 14 Sep 2015 09:00:52 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 39E472A3053F; Mon, 14 Sep 2015 11:00:49 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WOSOjze0mAtw; Mon, 14 Sep 2015 11:00:49 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 0F1742A30503; Mon, 14 Sep 2015 11:00:49 +0200 (CEST) From: Eric Botcazou To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH][20/n] Remove GENERIC stmt combining from SCCVN Date: Mon, 14 Sep 2015 09:05:00 -0000 Message-ID: <4233688.OcDud8fYJs@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.29-desktop; KDE/4.7.2; x86_64; ; ) In-Reply-To: References: <8641521.JK1D07Utdj@polaris> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2015-09/txt/msg00910.txt.bz2 > Still trying to reproduce, but I suppose you hit The testcase fails as of r227729 on x86-64/Linux. > /* Comparisons with the highest or lowest possible integer of > the specified precision will have known values. */ > (simplify > (cmp (convert?@2 @0) INTEGER_CST@1) > (if ((INTEGRAL_TYPE_P (TREE_TYPE (@1)) || POINTER_TYPE_P (TREE_TYPE > (@1))) > && tree_nop_conversion_p (TREE_TYPE (@2), TREE_TYPE (@0))) > (with > { > tree arg1_type = TREE_TYPE (@1); > unsigned int prec = TYPE_PRECISION (arg1_type); > wide_int max = wi::max_value (arg1_type); > wide_int signed_max = wi::max_value (prec, SIGNED); > wide_int min = wi::min_value (arg1_type); > } > (switch > (if (wi::eq_p (@1, max)) > (switch > (if (cmp == GT_EXPR) > { constant_boolean_node (false, type); }) > (if (cmp == GE_EXPR) > (eq @2 @1)) > (if (cmp == LE_EXPR) > { constant_boolean_node (true, type); }) > > this which should handle side-effects in @0 just fine: > > /* #line 2019 "/space/rguenther/src/svn/trunk/gcc/match.pd" */ > if (cmp == LE_EXPR) > { > if (dump_file && (dump_flags & TDF_DETAILS)) > fprintf (dump_file, "Applying pattern match.pd:2020, %s:%d\n", __FILE__, > __LINE__); > tree res; > res = constant_boolean_node (true, type); > if (TREE_SIDE_EFFECTS (captures[0])) > res = build2_loc (loc, COMPOUND_EXPR, type, > fold_ignored_result (captures[0]), res); > return res; > > note that genmatch "inlines" omit_one_operand, so you only see > fold_ignored_result here. I see, then for some reason TREE_SIDE_EFFECTS is not set here. -- Eric Botcazou