From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76435 invoked by alias); 19 Nov 2017 23:49: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 76424 invoked by uid 89); 19 Nov 2017 23:49:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=extracts X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 19 Nov 2017 23:49:37 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 322C7793E8; Sun, 19 Nov 2017 23:49:36 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-12.rdu2.redhat.com [10.10.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 34A125D754; Sun, 19 Nov 2017 23:49:34 +0000 (UTC) Subject: Re: Use extract_bit_field_as_subreg for vectors To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org References: <87lgjnnwrr.fsf@linaro.org> From: Jeff Law Message-ID: Date: Sun, 19 Nov 2017 23:57:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <87lgjnnwrr.fsf@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg01697.txt.bz2 On 11/03/2017 10:37 AM, Richard Sandiford wrote: > extract_bit_field_1 tries to use vec_extract to extract part of a > vector. However, if that pattern isn't defined or if the operands > aren't suitable, another good approach is to try a direct subreg > reference. This is particularly useful for multi-vector modes on > SVE (e.g. when extracting one vector from an LD2 result). > > The function would go on to try the same thing anyway, but only > if there is an integer mode with the same size as the vector mode, > which isn't true for SVE modes (and doesn't seem a good thing to > require in general). Even when there is an integer mode, doing the > operation on the original modes avoids some unnecessary bitcasting. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64-linux-gnu. > OK to install? > > Richard > > > 2017-11-03 Richard Sandiford > Alan Hayward > David Sherwood > > gcc/ > * expmed.c (extract_bit_field_1): For vector extracts, > fall back to extract_bit_field_as_subreg if vec_extract > isn't available. OK. jeff