From patchwork Tue Nov 21 13:59:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 840018 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-467552-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="XxdgNgu1"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yh6dg2T6bz9s71 for ; Wed, 22 Nov 2017 00:59:19 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=UMjFQoVm82BGz1AxEJx/fErBTzwGi Ko4u7MvpenQstBe9gBFGmj1sS2Fls+gjMhD09Mk0Gam8JvxxfITG9E/LA6DDbsMu R59/nsQvLKazN0uhGIYmkEokb9hSAvJkDjfRjjtDElr1W7m/5DJQ0jFa04gVWYWe ub1l7cd7XfIfE8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=W5u1ICnOmRd9/WJczZTkzOf/i88=; b=Xxd gNgu13KnuApB7e61A3fM2vF2zNIwAi0zTHTZsAdbhjcjKjSVuKlqNilZ9SqbrV+y J7IfJ2ghIPvSsGn8eXXhg2Oc3YnMrqIGgSSnu52z9PdfX7v990ST8u/9aA5s/ACH vueX4xQcpx56iCvBbEnJBWD+vE6pgX+1AmXKcfwA= Received: (qmail 60346 invoked by alias); 21 Nov 2017 13:59:12 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 60334 invoked by uid 89); 21 Nov 2017 13:59:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.7 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KB_WAM_FROM_NAME_SINGLEWORD, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=sk:get_non, eyes X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Nov 2017 13:59:10 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 84D337E386; Tue, 21 Nov 2017 13:59:09 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-247.ams2.redhat.com [10.36.116.247]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2A3C15D97C; Tue, 21 Nov 2017 13:59:09 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id vALDx6S9030473; Tue, 21 Nov 2017 14:59:06 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id vALDx5Kr030472; Tue, 21 Nov 2017 14:59:05 +0100 Date: Tue, 21 Nov 2017 14:59:05 +0100 From: Jakub Jelinek To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [committed] One c-family TREE_INT_CST_LOW -> tree_to_uhwi change Message-ID: <20171121135905.GY14653@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes Hi! When tweaking c-common.c last time, I was looking for TREE_INT_CST_LOW uses and which are justified and which aren't. This case caught my eyes, while it isn't wrong, pretty much everywhere in the compiler we after tree_fits_uhwi_p use tree_to_uhwi. Bootstrapped/regtested on x86_64-linux and i686-linux, committed as obvious. 2017-11-21 Jakub Jelinek * c-common.c (get_nonnull_operand): Use tree_to_uhwi. Jakub --- gcc/c-family/c-common.c.jj 2017-11-21 09:05:08.000000000 +0100 +++ gcc/c-family/c-common.c 2017-11-21 12:17:19.300064345 +0100 @@ -5359,7 +5359,7 @@ get_nonnull_operand (tree arg_num_expr, /* Verify the arg number is a small constant. */ if (tree_fits_uhwi_p (arg_num_expr)) { - *valp = TREE_INT_CST_LOW (arg_num_expr); + *valp = tree_to_uhwi (arg_num_expr); return true; } else