From patchwork Mon Sep 7 03:01:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 514963 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 CDE3E140321 for ; Mon, 7 Sep 2015 13:01:47 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=UUk3V8Ag; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=EPCmw20Ua4MxOFS9Z VajPVYQOLNTtXuK0JhHgH1OMu8VkyG5S1YljOvH31cilXDT3kA9wziixe3O7dehj W8SSsQ5Vmwoh7IfFiZu6yHsce7P4700X/6TsXMHq0z6KtTtZr0P4gk+bYcwV/WJ9 iY7vNdvKzrkQgRB86MlDwLebg8= 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 :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=njhwt+DkIC+XLsyKqt0ciw6 BMlg=; b=UUk3V8AgKPov5uUv/mWfkiL5vUx+5ClGwOYavhpUFfQXZunT0uR8C5T roreqRL2W/vI4Lxle8s0Pd7R0HI0TGGPvKeShof7fwVLPOhXJG4/LmJs1jCVQqep /gg5DX+VEhFCty+MkixAEJH09kyPydbd/LGAVaIZf1UqfzCDE2LE= Received: (qmail 82632 invoked by alias); 7 Sep 2015 03:01:39 -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 82613 invoked by uid 89); 7 Sep 2015 03:01:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f45.google.com Received: from mail-pa0-f45.google.com (HELO mail-pa0-f45.google.com) (209.85.220.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 07 Sep 2015 03:01:37 +0000 Received: by pacex6 with SMTP id ex6so82023708pac.0 for ; Sun, 06 Sep 2015 20:01:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type; bh=QHXISvS12nQq/crgyc/coVvFpeLqsU9scmMqxKH612o=; b=PpW1yCkxhSEu91TwQdIbxXCscbbhJXV/jeVR7AYP3ojvKkCdi1f4uQwjg0LaUIlyPt GF8SWbzEv440uX9uw8koDRKRzpmaY+gkciXeupF9KoOJXjvCAdl6+znqTINZsudsBSHl BnRyRMptBw2AiD895tAFOUw79OaLe9VwMFwJ0iwiDltnt3gKtTuTwim4QMio25mNNzE/ DM78kdZ2+q8yYOXzxPyj5FbqFFvwQnwZrGTKI6k91MVdyJ8x1immi3leL4ysrTnVTL/+ anANqg8odQMG7LWeEEj87aCSsc5asOUnH6gB53IN9ESDhjfWxqqXtaCsY+lVmiD2IPsj mjuw== X-Gm-Message-State: ALoCoQndA2Qx/zET8x8YSzllXp1/SZZLeYL0VJWlF13dFxTI0hqz/bdFHcgNmTjYWgHmqt1pWS46 X-Received: by 10.68.138.200 with SMTP id qs8mr40645373pbb.19.1441594895371; Sun, 06 Sep 2015 20:01:35 -0700 (PDT) Received: from [10.1.1.7] (58-6-183-210.dyn.iinet.net.au. [58.6.183.210]) by smtp.googlemail.com with ESMTPSA id ou5sm6286888pdb.51.2015.09.06.20.01.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Sep 2015 20:01:34 -0700 (PDT) Subject: [5/7] Allow gimple debug stmt in widen mode To: "gcc-patches@gcc.gnu.org" References: <55ECFC2A.7050908@linaro.org> Cc: Richard Biener From: Kugan Message-ID: <55ECFE08.8060405@linaro.org> Date: Mon, 7 Sep 2015 13:01:28 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55ECFC2A.7050908@linaro.org> X-IsSubscribed: yes Allow GIMPLE_DEBUG with values in promoted register. gcc/ChangeLog: 2015-09-07 Kugan Vivekanandarajah * expr.c (expand_expr_real_1): Set proper SUNREG_PROMOTED_MODE for SSA_NAME that was set by GIMPLE_CALL and assigned to another SSA_NAME of same type. From a28de63bcbb9f315cee7e41be11b65b3ff521a91 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Tue, 1 Sep 2015 08:40:40 +1000 Subject: [PATCH 5/8] debug stmt in widen mode --- gcc/cfgexpand.c | 11 ----------- gcc/gimple-ssa-type-promote.c | 7 ------- gcc/rtl.h | 2 ++ 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index bbc3c10..036085a 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -5240,7 +5240,6 @@ expand_debug_locations (void) tree value = (tree)INSN_VAR_LOCATION_LOC (insn); rtx val; rtx_insn *prev_insn, *insn2; - machine_mode mode; if (value == NULL_TREE) val = NULL_RTX; @@ -5275,16 +5274,6 @@ expand_debug_locations (void) if (!val) val = gen_rtx_UNKNOWN_VAR_LOC (); - else - { - mode = GET_MODE (INSN_VAR_LOCATION (insn)); - - gcc_assert (mode == GET_MODE (val) - || (GET_MODE (val) == VOIDmode - && (CONST_SCALAR_INT_P (val) - || GET_CODE (val) == CONST_FIXED - || GET_CODE (val) == LABEL_REF))); - } INSN_VAR_LOCATION_LOC (insn) = val; prev_insn = PREV_INSN (insn); diff --git a/gcc/gimple-ssa-type-promote.c b/gcc/gimple-ssa-type-promote.c index 62b5fdc..6805b9c 100644 --- a/gcc/gimple-ssa-type-promote.c +++ b/gcc/gimple-ssa-type-promote.c @@ -570,13 +570,6 @@ fixup_uses (tree use, tree promoted_type, tree old_type) bool do_not_promote = false; switch (gimple_code (stmt)) { - case GIMPLE_DEBUG: - { - gsi = gsi_for_stmt (stmt); - gsi_remove (&gsi, true); - break; - } - case GIMPLE_ASM: case GIMPLE_CALL: case GIMPLE_RETURN: diff --git a/gcc/rtl.h b/gcc/rtl.h index ac56133..c3cdf96 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2100,6 +2100,8 @@ wi::int_traits ::decompose (HOST_WIDE_INT *, targets is 1 rather than -1. */ gcc_checking_assert (INTVAL (x.first) == sext_hwi (INTVAL (x.first), precision) + || INTVAL (x.first) + == (INTVAL (x.first) & ((1 << precision) - 1)) || (x.second == BImode && INTVAL (x.first) == 1)); return wi::storage_ref (&INTVAL (x.first), 1, precision); -- 1.9.1