From patchwork Mon Jul 20 03:17:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 51267 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F0957228F7 for ; Mon, 20 Jul 2015 03:19:19 +0000 (UTC) Received: by wilm20 with SMTP id m20sf15541553wil.2 for ; Sun, 19 Jul 2015 20:19:18 -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:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type:x-original-sender :x-original-authentication-results; bh=Wm5uOrksh5juj5QbYSFcfaTPiYO7F/1roMiemWn63YI=; b=OZy9EPcqlp8lXm5QnJgMJrPMm1vkFytj6d9IcmMU/IKmJFHvQPMtitpKtdDfmrRn5g kFcbT05Nbu+sZeyne1W3aVbhVuAMN7FLCPACiAiknUdzbqClXC6OHSN3OXKCt0MAa+c2 PVYfo13ulOwl+P76gxwfjOVe/8E0zbEF2IX6tWRSi4xp5oYy/C5kztwDvY0d2EAj/U0P pBEBQyUY44WYpBRLrF2XJ8bO4Lv/xylq9ko9DQ5iBVD1f311e7Eknj97tH33a0jp91w6 pwSFAt8uSK48YQFl08gvgk3HPZUkRb3oUEzfa64NFjLrMQatay6NDd3+0P63+9UXqkXe fruA== X-Gm-Message-State: ALoCoQkE0BZiU79XbqacUKNK1hN3oQIab6z296VbP9fjQySuSlSaK61iUIfG3G+lENinpCk8Hq/2 X-Received: by 10.152.237.36 with SMTP id uz4mr13866722lac.1.1437362358542; Sun, 19 Jul 2015 20:19:18 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.133 with SMTP id y5ls738091laj.19.gmail; Sun, 19 Jul 2015 20:19:18 -0700 (PDT) X-Received: by 10.112.162.70 with SMTP id xy6mr25959562lbb.122.1437362358130; Sun, 19 Jul 2015 20:19:18 -0700 (PDT) Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com. [2a00:1450:4010:c03::22e]) by mx.google.com with ESMTPS id qc8si11724433lbb.149.2015.07.19.20.19.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Jul 2015 20:19:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::22e as permitted sender) client-ip=2a00:1450:4010:c03::22e; Received: by lagw2 with SMTP id w2so89409288lag.3 for ; Sun, 19 Jul 2015 20:19:17 -0700 (PDT) X-Received: by 10.152.36.161 with SMTP id r1mr25488808laj.88.1437362357796; Sun, 19 Jul 2015 20:19:17 -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.7.198 with SMTP id l6csp544559lba; Sun, 19 Jul 2015 20:19:16 -0700 (PDT) X-Received: by 10.70.54.7 with SMTP id f7mr54188367pdp.75.1437362355317; Sun, 19 Jul 2015 20:19:15 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id dx2si32501447pab.128.2015.07.19.20.19.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Jul 2015 20:19:15 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-403367-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 60325 invoked by alias); 20 Jul 2015 03:18:59 -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 60175 invoked by uid 89); 20 Jul 2015 03:18:06 -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-pd0-f169.google.com Received: from mail-pd0-f169.google.com (HELO mail-pd0-f169.google.com) (209.85.192.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 20 Jul 2015 03:18:04 +0000 Received: by pdrg1 with SMTP id g1so95114742pdr.2 for ; Sun, 19 Jul 2015 20:18:00 -0700 (PDT) X-Received: by 10.70.88.226 with SMTP id bj2mr55685918pdb.84.1437362280692; Sun, 19 Jul 2015 20:18:00 -0700 (PDT) Received: from [10.1.1.8] (58-6-183-210.dyn.iinet.net.au. [58.6.183.210]) by smtp.googlemail.com with ESMTPSA id w3sm18676477pdl.45.2015.07.19.20.17.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Jul 2015 20:17:58 -0700 (PDT) Message-ID: <55AC685A.8080906@linaro.org> Date: Mon, 20 Jul 2015 13:17:46 +1000 From: Kugan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Jeff Law , Maxim Kuvyrkov CC: "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH 1/2] Allow REG_EQUAL for ZERO_EXTRACT References: <558FD9D5.9070703@linaro.org> <558FDA78.9030606@linaro.org> <559212EF.7080301@linaro.org> <44190061-8CD0-417F-8592-23EC3C0BB9A3@linaro.org> <5599BAE4.80103@linaro.org> <559AEF4C.6060506@redhat.com> In-Reply-To: <559AEF4C.6060506@redhat.com> 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::22e as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 I have made a mistake while addressing the review comments for this patch. Unfortunately, It was not detected in my earlier testing. My sincere graphology for the mistake. I have basically missed the STRICT_LOW_PART check for the first if-check thus the second part (which is the ZERO_EXTRACT part) will never get executed. Attached patch fixes this along with some minor changes. Bootstrapped and regression tested on arm-none-linux (Chromebook) and x86-64-linux-gnu with no new regression along with the ARM ennoblement patch. Also did a complete arm qemu regression testing with Chriophe's scripts with no new regression. (http://people.linaro.org/~christophe.lyon/cross-validation/gcc-test-patches/225987-reg4/report-build-info.html) Is this OK for trunk, Thanks, Kugan gcc/ChangeLog: 2015-07-20 Kugan Vivekanandarajah * cse.c (cse_insn): Fix missing check for STRICT_LOW_PART and minor clean up. diff --git a/gcc/cse.c b/gcc/cse.c index 1c14d83..96adf18 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -4529,10 +4529,10 @@ cse_insn (rtx_insn *insn) this case, and if it isn't set, then there will be no equivalence for the destination. */ if (n_sets == 1 && REG_NOTES (insn) != 0 - && (tem = find_reg_note (insn, REG_EQUAL, NULL_RTX)) != 0) + && (tem = find_reg_note (insn, REG_EQUAL, NULL_RTX)) != 0 + && (! rtx_equal_p (XEXP (tem, 0), SET_SRC (sets[0].rtl)))) { - if ((! rtx_equal_p (XEXP (tem, 0), SET_SRC (sets[0].rtl))) - || GET_CODE (SET_DEST (sets[0].rtl)) == STRICT_LOW_PART) + if (GET_CODE (SET_DEST (sets[0].rtl)) == STRICT_LOW_PART) src_eqv = copy_rtx (XEXP (tem, 0)); /* If DEST is of the form ZERO_EXTACT, as in: @@ -4544,14 +4544,14 @@ cse_insn (rtx_insn *insn) point. Note that this is different from SRC_EQV. We can however calculate SRC_EQV with the position and width of ZERO_EXTRACT. */ else if (GET_CODE (SET_DEST (sets[0].rtl)) == ZERO_EXTRACT - && CONST_INT_P (src_eqv) + && CONST_INT_P (XEXP (tem, 0)) && CONST_INT_P (XEXP (SET_DEST (sets[0].rtl), 1)) && CONST_INT_P (XEXP (SET_DEST (sets[0].rtl), 2))) { rtx dest_reg = XEXP (SET_DEST (sets[0].rtl), 0); rtx width = XEXP (SET_DEST (sets[0].rtl), 1); rtx pos = XEXP (SET_DEST (sets[0].rtl), 2); - HOST_WIDE_INT val = INTVAL (src_eqv); + HOST_WIDE_INT val = INTVAL (XEXP (tem, 0)); HOST_WIDE_INT mask; unsigned int shift; if (BITS_BIG_ENDIAN)