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: 53206 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id 2DDF122B05 for ; Mon, 7 Sep 2015 03:01:57 +0000 (UTC) Received: by wicuu12 with SMTP id uu12sf21813668wic.2 for ; Sun, 06 Sep 2015 20:01:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type:x-original-sender :x-original-authentication-results; bh=QHXISvS12nQq/crgyc/coVvFpeLqsU9scmMqxKH612o=; b=f1jf0xd+kd43A/7XqlE7FMyhB0NtTUNqsi8LtDCOEJWziITUzaddeYbf+5EhjPgi6G mLmTlHjhz+ztQmMQvE5AlMONdWOLbZEcAnlaUQySxGHd/6L7ZpHD0dt6XosHfkx/XwaX Y+pnB9mdYZ7zbdKLnZeErvkC/hEO+Dl0Zfy01qX1L3FzQm6a7a7RrE933fPupdwiA+RB g6t/FtrFKOvBhpOPrNw8bp8vAMvsnfDHztOOZ69voStrEZ2aBFalVV7ekIikgFD46wQt 3iucBbm3sU4rQF8OSsn5s/Y4HndvkBuJUMElngKa6qUxHbnjNNJkAm2w8eXToBj8YBON fwKg== X-Gm-Message-State: ALoCoQl8BPnc1LhTD1nCLnCLzdMnF2Tr0Hji9wTUBIdOqc9mQL//1zdAiRjRwBHyjLfU8z0Kke/U X-Received: by 10.180.79.66 with SMTP id h2mr4363070wix.3.1441594916496; Sun, 06 Sep 2015 20:01:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.70 with SMTP id c6ls107134lae.89.gmail; Sun, 06 Sep 2015 20:01:56 -0700 (PDT) X-Received: by 10.112.140.132 with SMTP id rg4mr14599292lbb.49.1441594916333; Sun, 06 Sep 2015 20:01:56 -0700 (PDT) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com. [2a00:1450:4010:c03::230]) by mx.google.com with ESMTPS id z15si9227254lbn.158.2015.09.06.20.01.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Sep 2015 20:01:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::230 as permitted sender) client-ip=2a00:1450:4010:c03::230; Received: by lamp12 with SMTP id p12so42960373lam.0 for ; Sun, 06 Sep 2015 20:01:56 -0700 (PDT) X-Received: by 10.152.178.165 with SMTP id cz5mr14849585lac.29.1441594916213; Sun, 06 Sep 2015 20:01:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp120391lbq; Sun, 6 Sep 2015 20:01:55 -0700 (PDT) X-Received: by 10.67.15.36 with SMTP id fl4mr39704383pad.152.1441594914905; Sun, 06 Sep 2015 20:01:54 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id g14si17611061pdf.138.2015.09.06.20.01.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Sep 2015 20:01:54 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-406780-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 82632 invoked by alias); 7 Sep 2015 03:01:39 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 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-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 X-Original-Sender: kugan.vivekanandarajah@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::230 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 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