From patchwork Fri Oct 11 14:45:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 1175253 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-510763-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="BxxNhVQl"; dkim-atps=neutral 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 46qW3V5Mxzz9sNx for ; Sat, 12 Oct 2019 01:45:56 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=ZFtveav2mkkAKa/Hgci1SYdOesY4WSN+3/ZnChWe8cwFB5g/k7ZRJ WQxOAYQ8vSWzCcfXg3zaQ2crhYoiLQjzkURygFsHqHP44KlkB8jpSJk50R0jCBaZ 000c0aueBDmpMM3gCd+DzZmhvDC3VjSlDGwWD7gnue4KtqxJUQynrE= 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:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=v0Gw95mijJt6E+H48MMcsC7qMCE=; b=BxxNhVQl5/rEhaW05kIr 1fZUZrZtH5asUtQf6EOk8stwPEzpp/2H5mlbPnJ6CNrhplnHbhNDpjr7NXKvei+y ihRYEN3S28/N4j1xodpSxfI3vOjz3/jXltdNbEYfi9alglUOTnVC5NbuuvJoL+2t wXOFhdH4gaRY5FkPeJ4kOCE= Received: (qmail 51323 invoked by alias); 11 Oct 2019 14:45:49 -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 51241 invoked by uid 89); 11 Oct 2019 14:45:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Oct 2019 14:45:41 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8D502142F for ; Fri, 11 Oct 2019 07:45:31 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 365743F68E for ; Fri, 11 Oct 2019 07:45:31 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [committed] Relax store_bit_field call in store_expr Date: Fri, 11 Oct 2019 15:45:30 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes store_bit_field already takes a poly_uint64 size, so we can relax the INTVAL to rtx_to_poly_int64. This is tested by the SVE ACLE patches. Tested on aarch64-linux-gnu and x86_64-linux-gnu, applied as obvious. Richard 2019-10-11 Richard Sandiford gcc/ * expr.c (store_expr): Use rtx_to_poly_int64 rather than INTVAL when calling store_bit_field. Index: gcc/expr.c =================================================================== --- gcc/expr.c 2019-10-06 16:37:30.845042970 +0100 +++ gcc/expr.c 2019-10-11 15:44:02.755432660 +0100 @@ -5790,7 +5790,8 @@ store_expr (tree exp, rtx target, int ca copy_blkmode_from_reg (target, temp, TREE_TYPE (exp)); else store_bit_field (target, - INTVAL (expr_size (exp)) * BITS_PER_UNIT, + rtx_to_poly_int64 (expr_size (exp)) + * BITS_PER_UNIT, 0, 0, 0, GET_MODE (temp), temp, reverse); } else