From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20833 invoked by alias); 7 Jan 2014 23:10:55 -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 20821 invoked by uid 89); 7 Jan 2014 23:10:54 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ve0-f176.google.com Received: from mail-ve0-f176.google.com (HELO mail-ve0-f176.google.com) (209.85.128.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 07 Jan 2014 23:10:53 +0000 Received: by mail-ve0-f176.google.com with SMTP id oz11so671464veb.7 for ; Tue, 07 Jan 2014 15:10:51 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.52.113.97 with SMTP id ix1mr63108148vdb.9.1389136250836; Tue, 07 Jan 2014 15:10:50 -0800 (PST) Received: by 10.58.178.207 with HTTP; Tue, 7 Jan 2014 15:10:50 -0800 (PST) In-Reply-To: <1354617087-31993-1-git-send-email-james.greenhalgh@arm.com> References: <1354617087-31993-1-git-send-email-james.greenhalgh@arm.com> Date: Tue, 07 Jan 2014 23:10:00 -0000 Message-ID: Subject: Re: [Patch AArch64] Implement Vector Permute Support From: Andrew Pinski To: James Greenhalgh Cc: GCC Patches , Marcus Shawcroft Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00321.txt.bz2 On Tue, Dec 4, 2012 at 2:31 AM, James Greenhalgh wrote: > > Hi, > > This patch adds support for Vector Shuffle style operations > through support for TARGET_VECTORIZE_VEC_PERM_CONST_OK and > the vec_perm and vec_perm_const standard patterns. > > In this patch we add the framework and support for the > generic tbl instruction. This can be used to handle any > vector permute operation, but we can do a better job for > some special cases. The second patch of this series does > that better job for the ZIP, UZP and TRN instructions. > > Is this OK to commit? This breaks big-endian aarch64 in a very bad way. vec_perm is enabled for big-endian but aarch64_expand_vec_perm will ICE right away. Can you please test big-endian also next time? Here is the shortest testcase which fails at -O3: void fill_window(unsigned short *p, unsigned wsize) { unsigned n, m; do { m = *--p; *p = (unsigned short)(m >= wsize ? m-wsize : 0); } while (--n); } This comes from zlib and it blocks my building of the trunk. Thanks, Andrew Pinski > > Thanks, > James Greenhalgh > > --- > gcc/ > > 2012-12-04 James Greenhalgh > > * config/aarch64/aarch64-protos.h > (aarch64_split_combinev16qi): New. > (aarch64_expand_vec_perm): Likewise. > (aarch64_expand_vec_perm_const): Likewise. > * config/aarch64/aarch64-simd.md (vec_perm_const): New. > (vec_perm): Likewise. > (aarch64_tbl1): Likewise. > (aarch64_tbl2v16qi): Likewise. > (aarch64_combinev16qi): New. > * config/aarch64/aarch64.c > (aarch64_vectorize_vec_perm_const_ok): New. > (aarch64_split_combinev16qi): Likewise. > (MAX_VECT_LEN): Define. > (expand_vec_perm_d): New. > (aarch64_expand_vec_perm_1): Likewise. > (aarch64_expand_vec_perm): Likewise. > (aarch64_evpc_tbl): Likewise. > (aarch64_expand_vec_perm_const_1): Likewise. > (aarch64_expand_vec_perm_const): Likewise. > (aarch64_vectorize_vec_perm_const_ok): Likewise. > (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Likewise. > * config/aarch64/iterators.md > (unspec): Add UNSPEC_TBL, UNSPEC_CONCAT. > (V_cmp_result): Add mapping for V2DF. > > gcc/testsuite/ > > 2012-12-04 James Greenhalgh > > * lib/target-supports.exp > (check_effective_target_vect_perm): Allow aarch64*-*-*. > (check_effective_target_vect_perm_byte): Likewise. > (check_effective_target_vect_perm_short): Likewise. > (check_effective_target_vect_char_mult): Likewise. > (check_effective_target_vect_extract_even_odd): Likewise. > (check_effective_target_vect_interleave): Likewise.