From patchwork Mon Sep 7 03:01:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 514964 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 46275140321 for ; Mon, 7 Sep 2015 13:02:07 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=qIbvgCFk; 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=ToST4lXGQCSA7qok0 TqY7jErrDfcVK7mUaVV9+YDYRSCbLVlYZRzTch/MJam6J5eK3eLLTOTIWunnBwWd 9Rl1VtATCCDEIYN10029GUZGrXwr6rj/pJcKYn9tHNvhLygg1faMReBKqeRaz4Vi Yg1ZA7pPseKFiL8zmpHH1xGzpU= 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=dC3xKCM7PpT0vofK+dVRgjT nPAo=; b=qIbvgCFk6sEA1DX7sWIQAo6jGsuxxd9fS13F/cbN/IIx6ctq4/B5DAK zhq4+ULgmCfhPnDMODm5f9Jiqu+QBJok5wNyIf6/xqUfDvbabISL5ph7L8As2yw1 jtF2WzkwBh39MIBngoaWPkXXnFksP4uq6EC11BJ4FDmqCB3U1ZyU= Received: (qmail 84016 invoked by alias); 7 Sep 2015 03:01:59 -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 83980 invoked by uid 89); 7 Sep 2015 03:01:55 -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-f52.google.com Received: from mail-pa0-f52.google.com (HELO mail-pa0-f52.google.com) (209.85.220.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 07 Sep 2015 03:01:53 +0000 Received: by padhy16 with SMTP id hy16so79758738pad.1 for ; Sun, 06 Sep 2015 20:01:51 -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=64OLmf7O28Qo2ZuNb3BFXaqFoqGRSbpySnjmB+lXBJE=; b=bHnkwNz1suVI7zjjWfpfXj2o4uHlEEtiHzVMPY+TMB3hmnBD34kOmYXWiKH12JX3qb olvJxBU69eOZeuwYd0+j1cc613qpTBtLWds76hzNuXPgTbX8KtK9Zk+BuuRjP1yMYnbJ xkFfxX9RV1r9CshGvtnEUP9bV3Nayp6ds5FrRIK+vDXzT1reSsoeynfduwI4Jm6nNnZJ Bl0sd9ejQiaBSceXvZOBfamwCpIBf1CxZ335G8MY/GepbGn8brUly+u2qNe5JegEG2uO 0rMrXBxd4DTEMkVQEtTib73Q2GpUD+afWARqKtWsxpBpJbsRJtlm+0C3cWeTUU0EopkQ KuXw== X-Gm-Message-State: ALoCoQlEz09TJhghtpX1dbyqSm4cmM2GQeg2oGNrM85s7TZOUjB6Hs1RnzbtHTWzZHcQtN9r7s04 X-Received: by 10.69.26.196 with SMTP id ja4mr39629033pbd.121.1441594911840; Sun, 06 Sep 2015 20:01:51 -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 c4sm10013284pdl.16.2015.09.06.20.01.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Sep 2015 20:01:51 -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: <55ECFE19.4040007@linaro.org> Date: Mon, 7 Sep 2015 13:01:45 +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 SUBREG_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