From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61577 invoked by alias); 11 Nov 2018 08:52:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 61563 invoked by uid 89); 11 Nov 2018 08:52:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.2 spammy=acknowledge, pred X-HELO: gproxy8-pub.mail.unifiedlayer.com Received: from gproxy8-pub.mail.unifiedlayer.com (HELO gproxy8-pub.mail.unifiedlayer.com) (67.222.33.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 11 Nov 2018 08:52:36 +0000 Received: from cmgw15.unifiedlayer.com (unknown [10.9.0.15]) by gproxy8.mail.unifiedlayer.com (Postfix) with ESMTP id 8238B1AB0F2 for ; Sun, 11 Nov 2018 01:52:33 -0700 (MST) Received: from just102.justhost.com ([173.254.28.102]) by cmsmtp with ESMTP id LlTtgBd55j0soLlTtghjd0; Sun, 11 Nov 2018 01:52:33 -0700 Received: from cust213-dsl91-135-11.idnet.net ([91.135.11.213]:51098 helo=[192.168.1.129]) by just102.justhost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gLlTt-000Xya-1x for gcc-patches@gcc.gnu.org; Sun, 11 Nov 2018 01:52:33 -0700 Message-ID: <5BE7EDC6.7070702@riscy-ip.com> Date: Sun, 11 Nov 2018 08:52:00 -0000 From: Joern Wolfgang Rennecke User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: RFA: Fix add_predicate_code to acknowledge ZERO_EXTRACT as an lvalue. Content-Type: multipart/mixed; boundary="------------060707090407050209000500" X-SW-Source: 2018-11/txt/msg00842.txt.bz2 This is a multi-part message in MIME format. --------------060707090407050209000500 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1251 With a configurable vector size, it is not really feasible to represent every vector register inside GCC as a collection of lots of imaginary BITS_PER_WORD registers. So you got your general purpose registers that are BITS_PER_WORD, and vector registers that are a bit or a lot larger. To void invalid code being emitted by reload, you have to define TARGET_CAN_CHANGE_MODE_CLASS to reject the use of vector registers for values where certain kinds of SUBREGs are used. In practice, that's most of them. To avoid register allocation mayhem, the port has to steer the middle-end away from the tried-and-true-and-generating-absymal-code path of SUBREGs. There are a number of choices for lvalues. vec_select is sort of obvious and works to a point, but it doesn't scale well because the access representation changes according to the content of vector registers. And it doesn't work at all as an lvalue. ZERO_EXTRACT has none of these problems. It can describe a bitfield access independent of the vector structure (if any) of outer and inner mode, and it is valid as an lvalue. Unfortunately, add_predicate_code in gensupport.c didn't get the message. This patch fixes that. Bootstrapped and regression tested on x86_64-pc-linux-gnu . --------------060707090407050209000500 Content-Type: text/plain; charset=UTF-8; name="gensupport-zext-patch-266008.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gensupport-zext-patch-266008.txt" Content-length: 712 MjAxOC0xMS0xMCAgSm9lcm4gUmVubmVja2UgIDxqb2Vybi5yZW5uZWNrZUBy aXNjeS1pcC5jb20+CgoJKiBnZW5zdXBwb3J0LmMgKGFkZF9wcmVkaWNhdGVf Y29kZSk6IFByb3Blcmx5IGhhbmRsZSBaRVJPX0VYVFJBQ1QKCWFzIGFuIGx2 YWx1ZS4KCkluZGV4OiBnZW5zdXBwb3J0LmMKPT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PQotLS0gZ2Vuc3VwcG9ydC5jCShyZXZpc2lvbiAyNjYwMDgpCisrKyBn ZW5zdXBwb3J0LmMJKHdvcmtpbmcgY29weSkKQEAgLTI4MjcsNiArMjgyNyw3 IEBAIGFkZF9wcmVkaWNhdGVfY29kZSAoc3RydWN0IHByZWRfZGF0YSAqcHIK IAkgICYmIGNvZGUgIT0gQ09OQ0FUCiAJICAmJiBjb2RlICE9IFBBUkFMTEVM CiAJICAmJiBjb2RlICE9IFNUUklDVF9MT1dfUEFSVAorCSAgJiYgY29kZSAh PSBaRVJPX0VYVFJBQ1QKIAkgICYmIGNvZGUgIT0gU0NSQVRDSCkKIAlwcmVk LT5hbGxvd3Nfbm9uX2x2YWx1ZSA9IHRydWU7CiAK --------------060707090407050209000500--