From patchwork Tue Feb 25 09:56:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 323888 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 CC8A82C0228 for ; Tue, 25 Feb 2014 20:57:01 +1100 (EST) 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=WXma8zmuQJAxR0FbYCEK7vrdNYgKPNBF4y5zmkq3v2M kovqzOrAqvzqL/bkyuKB0H9j3HGD9QLMoGxbQwBiyiYrXQQVldgUJx4TIeAsvIvY gu9JT/ECp6KWyZQLA/N9nRPQxq6DUJuhN5x3SPPFh0rlLBjv+dBlo382MQoYmbsI = 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=R3Y0u3IpWg1Ps7aA5yvwGEQsu2E=; b=T3wxqWSLzt7hjw8H8 TAzQDhmaLhiywjKCao8jN+I2qSf4qyX2udmhxKuUurvXEY/PylceisT4UK5+R1vu pCn/zrlHQhQ+5/FI/gHXDNjLRi+9RMeN8WcmrBiMYBcegu/kqv4SWWDIaGfjWLrL 1PcPTGytcnYxxcyezfabZE0MvA= Received: (qmail 28487 invoked by alias); 25 Feb 2014 09:56:54 -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 28396 invoked by uid 89); 25 Feb 2014 09:56:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Feb 2014 09:56:52 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 25 Feb 2014 09:56:49 +0000 Received: from [10.1.208.24] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 25 Feb 2014 09:56:53 +0000 Message-ID: <530C68E0.90700@arm.com> Date: Tue, 25 Feb 2014 09:56:48 +0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-Version: 1.0 To: GCC Patches CC: Ramana Radhakrishnan , Richard Earnshaw Subject: [PATCH][ARM][v2] Fix PR 55426 X-MC-Unique: 114022509564902601 X-IsSubscribed: yes Hi all, A while back I sent a patch to fix this PR (http://gcc.gnu.org/ml/gcc-patches/2014-02/msg00652.html) by generalising the neon_vld1_dupv2di splitter. There is an alternative safer approach at this stage, which is to relax CANNOT_CHANGE_MODE_CLASS to allow conversions from 128 to 64-bit modes. In that case the layout in the d-registers happens to be valid in big-endian, so we don't end up generating subregs after reg allocation. This regression appears on 4.8 as well as trunk. Built and bootstrapped trunk and 4.8 on arm-none-linux-gnueabihf. Ok for those branches? Thanks, Kyrill 2014-02-25 Kyrylo Tkachov PR target/55426 * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Allow 128 to 64-bit conversions. diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index bed056e..df30f77 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -1257,9 +1257,13 @@ enum reg_class VFPv2. In big-endian mode, modes greater than word size (i.e. DFmode) are stored in VFP registers in little-endian order. We can't describe that accurately to - GCC, so avoid taking subregs of such values. */ + GCC, so avoid taking subregs of such values. + The only exception is going from a 128-bit to a 64-bit type. In that case + the data layout happens to be consistent for big-endian, so we explicitly allow + that case. */ #define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ - (TARGET_VFP && TARGET_BIG_END \ + (TARGET_VFP && TARGET_BIG_END \ + && !(GET_MODE_SIZE (FROM) == 16 && GET_MODE_SIZE (TO) == 8) \ && (GET_MODE_SIZE (FROM) > UNITS_PER_WORD \ || GET_MODE_SIZE (TO) > UNITS_PER_WORD) \ && reg_classes_intersect_p (VFP_REGS, (CLASS)))