From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4792 invoked by alias); 15 Apr 2014 17:45:48 -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 4783 invoked by uid 89); 15 Apr 2014 17:45:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f42.google.com Received: from mail-qg0-f42.google.com (HELO mail-qg0-f42.google.com) (209.85.192.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 15 Apr 2014 17:45:47 +0000 Received: by mail-qg0-f42.google.com with SMTP id q107so10393328qgd.29 for ; Tue, 15 Apr 2014 10:45:45 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.229.216.72 with SMTP id hh8mr4772185qcb.9.1397583945069; Tue, 15 Apr 2014 10:45:45 -0700 (PDT) Received: by 10.140.102.105 with HTTP; Tue, 15 Apr 2014 10:45:44 -0700 (PDT) In-Reply-To: <534D172D.5090308@arm.com> References: <534D172D.5090308@arm.com> Date: Tue, 15 Apr 2014 17:50:00 -0000 Message-ID: Subject: Re: [PATCH][AArch64] Vectorise bswap[16,32,64] From: Eric Christopher To: Kyrill Tkachov Cc: GCC Patches , Marcus Shawcroft , Richard Earnshaw Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00809.txt.bz2 Testcase weirdness? for (i < 0; i < N; ++i) { arr[i] = i; expect[i] = __builtin_bswap64 (i); if (y) /* Avoid vectorisation. */ abort (); } i < 0 :) duplicated in all 3 testcases btw. -eric On Tue, Apr 15, 2014 at 4:25 AM, Kyrill Tkachov wrote: > Hi all, > > This patch enables aarch64 to vectorise bswap[16,32,64] operations by using > the AdvancedSIMD forms of the rev[16,32,64] instructions. > > The TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION hook is extended to return > the vectorised forms of __builtin_bswap* where possible and vector bswap > patterns are added. > > I've added the tests in vect.exp and a new effective target check > (vect_bswap) that can be extended for other targets in the future if they > can also vectorise these operations. Is that ok? > > Bootstrapped and tested aarch64-none-linux-gnu. > > Ok for trunk? > > Thanks, > Kyrill > > 2014-04-15 Kyrylo Tkachov > > * config/aarch64/aarch64-builtins.c > (aarch64_builtin_vectorized_function): Handle BUILT_IN_BSWAP16, > BUILT_IN_BSWAP32, BUILT_IN_BSWAP64. > * config/aarch64/aarch64-simd.md (bswap): New pattern. > * config/aarch64/aarch64-simd-builtins.def: Define vector bswap > builtins. > * config/aarch64/iterator.md (VDQHSD): New mode iterator. > (Vrevsuff): New mode attribute. > > 2014-04-15 Kyrylo Tkachov > > * lib/target-supports.exp (check_effective_target_vect_bswap): New. > * gcc.dg/vect/vect-bswap16: New test. > * gcc.dg/vect/vect-bswap32: Likewise. > * gcc.dg/vect/vect-bswap64: Likewise.