From patchwork Mon Nov 9 11:34:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 56217 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp125960lbb; Mon, 9 Nov 2015 03:34:56 -0800 (PST) X-Received: by 10.67.14.101 with SMTP id ff5mr40167058pad.120.1447068896335; Mon, 09 Nov 2015 03:34:56 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id wv1si21922674pbc.215.2015.11.09.03.34.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Nov 2015 03:34:56 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-413220-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-return-413220-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-413220-patch=linaro.org@gcc.gnu.org; dkim=pass header.i=@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=ZaYY67WHPTU1fZXRBhV1VF3S2Erzc8Y9ApmWfN4dHq5 kNMURXPDcUhFS9vc0pOvwKnDLf2NwgzUUOSgtv11gXDvsS203tCkgsNRb3QesYLK 5rwpXXTRcDatHENXgMWBkzYyx7rfj0y7/GPQAqG2HD+2QD44QUbNSPJm4hCkMHfE = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=5CII3H91dxvnbjkOiJ8E5j7FsVo=; b=JtokNXwm9RmYXhRGj rHJt2qjM4dwuJCJjND8++6dW0KYegNGM0MIjL+SQFAK/cTLBJ0SO1zIVxCHtOF42 OCgGWdkMk9DzhCFtg5rFrPNLz6Zaguxvovah+Iwc+XvNUn9AUrRE2RZDFpv/N2oT YDprSCoQFppO5k/qdKUlNRKETI= Received: (qmail 39274 invoked by alias); 9 Nov 2015 11:34:34 -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 39180 invoked by uid 89); 9 Nov 2015 11:34:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Nov 2015 11:34:31 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-24-6nBGpF8DTue-GFDhD3Enpw-1; Mon, 09 Nov 2015 11:34:26 +0000 Received: from [10.2.206.200] ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 9 Nov 2015 11:34:26 +0000 Message-ID: <564084C2.7050806@arm.com> Date: Mon, 09 Nov 2015 11:34:26 +0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches CC: Marcus Shawcroft , Richard Earnshaw , James Greenhalgh Subject: [PATCH][AArch64][cleanup] Remove uses of CONST_DOUBLE_HIGH, CONST_DOUBLE_LOW X-MC-Unique: 6nBGpF8DTue-GFDhD3Enpw-1 X-IsSubscribed: yes Hi all, From what I understand, we shouldn't encounter the case where CONST_DOUBLE is used to hold a large integer value, accessed through CONST_DOUBLE_LOW and CONST_DOUBLE_HIGH. The aarch64 backend doesn't generate any such rtxes and the midend shouldn't be passing any such rtxes either. This allows for a bit of cleanup in aarch64_simd_valid_immediate. Bootstrapped and tested on aarch64. Ok for trunk? Thanks, Kyrill P.S. I propose this patch separate from my other patch that defines TARGET_SUPPORTS_WIDE_INT for aarch64 (https://gcc.gnu.org/ml/gcc-patches/2015-11/msg00934.html) as this is not needed to fix the ICE in that case and just removes some dead code and is thus not appropriate for backporting in my opinion. 2015-11-09 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Remove integer CONST_DOUBLE handling. It should never occur. commit 4b6c35c0f171a4841cb219e86b9d9ea752e2e849 Author: Kyrylo Tkachov Date: Thu Oct 29 10:28:12 2015 +0000 [AArch64][cleanup] Remove uses of CONST_DOUBLE_HIGH, CONST_DOUBLE_LOW diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 389bfc0..cbdff44 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -10080,32 +10080,16 @@ aarch64_simd_valid_immediate (rtx op, machine_mode mode, bool inverse, it must be laid out in the vector register in reverse order. */ rtx el = CONST_VECTOR_ELT (op, BYTES_BIG_ENDIAN ? (n_elts - 1 - i) : i); unsigned HOST_WIDE_INT elpart; - unsigned int part, parts; - if (CONST_INT_P (el)) - { - elpart = INTVAL (el); - parts = 1; - } - else if (GET_CODE (el) == CONST_DOUBLE) - { - elpart = CONST_DOUBLE_LOW (el); - parts = 2; - } - else - gcc_unreachable (); + gcc_assert (CONST_INT_P (el)); + elpart = INTVAL (el); + + for (unsigned int byte = 0; byte < innersize; byte++) + { + bytes[idx++] = (elpart & 0xff) ^ invmask; + elpart >>= BITS_PER_UNIT; + } - for (part = 0; part < parts; part++) - { - unsigned int byte; - for (byte = 0; byte < innersize; byte++) - { - bytes[idx++] = (elpart & 0xff) ^ invmask; - elpart >>= BITS_PER_UNIT; - } - if (GET_CODE (el) == CONST_DOUBLE) - elpart = CONST_DOUBLE_HIGH (el); - } } /* Sanity check. */