From patchwork Wed May 27 20:15:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 49034 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EDC72202A3 for ; Wed, 27 May 2015 20:18:20 +0000 (UTC) Received: by laat2 with SMTP id t2sf5603391laa.2 for ; Wed, 27 May 2015 13:18:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:sender:delivered-to:from:to:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results; bh=Tiv+vBKi3V3Y1EEQYQPz9G2Ym5K1lY6a2IXfbP1ZcIg=; b=A8zD5zbKhhfv7S7fg4aeYxM3fkeK6uxZcTu/xZFUCT3GzshEYvqw/SFZzoiC5EjEeA CBIJrESvrSL9vITDtALmyrFA72N9Y0vLr3JT9F3j88XMqUSnu8Suie9FvhosQ/ITlF/b IVVyA7u4FIm9jVQSah0N0TwjSvqwxV5eqq0nBWIsiP4C1h5ds6KGDtZ++DYOCK8bH4YZ 4AgUTxAl2z5riUej6BFUCoyMNA/DSF0vbRBbRxNt5G9+WBpryjlxX46+SmqY8G5EIE/9 8DbX+4Mn22LhCgzulfU+KSqX4lbnM6Q2oD9BsGZCAbEaCeV8kD1+1hqOfAN3ydDxurlC pmtA== X-Gm-Message-State: ALoCoQl/wUnQCgeMFBeCqtqIgJIQydR6Pvn37lwZ9amlzKiUGFNJc3JLMvx3rYaRrt3AtgwDDuT3 X-Received: by 10.112.138.2 with SMTP id qm2mr33490582lbb.19.1432757899906; Wed, 27 May 2015 13:18:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.34 with SMTP id n2ls100624laj.15.gmail; Wed, 27 May 2015 13:18:19 -0700 (PDT) X-Received: by 10.112.210.137 with SMTP id mu9mr22092493lbc.95.1432757899761; Wed, 27 May 2015 13:18:19 -0700 (PDT) Received: from mail-lb0-x22c.google.com (mail-lb0-x22c.google.com. [2a00:1450:4010:c04::22c]) by mx.google.com with ESMTPS id qe6si55495lbb.7.2015.05.27.13.18.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 May 2015 13:18:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22c as permitted sender) client-ip=2a00:1450:4010:c04::22c; Received: by lbcue7 with SMTP id ue7so15149864lbc.0 for ; Wed, 27 May 2015 13:18:19 -0700 (PDT) X-Received: by 10.112.234.200 with SMTP id ug8mr28894847lbc.117.1432757899663; Wed, 27 May 2015 13:18:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp627241lbb; Wed, 27 May 2015 13:18:18 -0700 (PDT) X-Received: by 10.68.110.3 with SMTP id hw3mr60966326pbb.128.1432757897885; Wed, 27 May 2015 13:18:17 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id ph10si25491pbb.174.2015.05.27.13.18.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 May 2015 13:18:17 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-399117-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 38057 invoked by alias); 27 May 2015 20:16:17 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 37770 invoked by uid 89); 27 May 2015 20:16:15 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f176.google.com Received: from mail-wi0-f176.google.com (HELO mail-wi0-f176.google.com) (209.85.212.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 27 May 2015 20:16:12 +0000 Received: by wizk4 with SMTP id k4so124260155wiz.1 for ; Wed, 27 May 2015 13:16:09 -0700 (PDT) X-Received: by 10.194.200.228 with SMTP id jv4mr60802634wjc.157.1432757769673; Wed, 27 May 2015 13:16:09 -0700 (PDT) Received: from babel.clyon.hd.free.fr (vig38-2-82-225-222-175.fbx.proxad.net. [82.225.222.175]) by mx.google.com with ESMTPSA id u7sm76992wif.3.2015.05.27.13.16.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 May 2015 13:16:09 -0700 (PDT) From: Christophe Lyon To: gcc-patches@gcc.gnu.org Subject: [Patch ARM-AArch64/testsuite Neon intrinsics 17/20] Add vst1_lane tests. Date: Wed, 27 May 2015 22:15:44 +0200 Message-Id: <1432757747-4891-18-git-send-email-christophe.lyon@linaro.org> In-Reply-To: <1432757747-4891-1-git-send-email-christophe.lyon@linaro.org> References: <1432757747-4891-1-git-send-email-christophe.lyon@linaro.org> X-IsSubscribed: yes X-Original-Sender: christophe.lyon@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22c as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vst1_lane.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vst1_lane.c new file mode 100644 index 0000000..08583b8 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vst1_lane.c @@ -0,0 +1,93 @@ +#include +#include "arm-neon-ref.h" +#include "compute-ref-data.h" + +/* Expected results. */ +VECT_VAR_DECL(expected,int,8,8) [] = { 0xf7, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33 }; +VECT_VAR_DECL(expected,int,16,4) [] = { 0xfff3, 0x3333, 0x3333, 0x3333 }; +VECT_VAR_DECL(expected,int,32,2) [] = { 0xfffffff1, 0x33333333 }; +VECT_VAR_DECL(expected,int,64,1) [] = { 0xfffffffffffffff0 }; +VECT_VAR_DECL(expected,uint,8,8) [] = { 0xf6, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33 }; +VECT_VAR_DECL(expected,uint,16,4) [] = { 0xfff2, 0x3333, 0x3333, 0x3333 }; +VECT_VAR_DECL(expected,uint,32,2) [] = { 0xfffffff0, 0x33333333 }; +VECT_VAR_DECL(expected,uint,64,1) [] = { 0xfffffffffffffff0 }; +VECT_VAR_DECL(expected,poly,8,8) [] = { 0xf6, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33 }; +VECT_VAR_DECL(expected,poly,16,4) [] = { 0xfff2, 0x3333, 0x3333, 0x3333 }; +VECT_VAR_DECL(expected,hfloat,32,2) [] = { 0xc1700000, 0x33333333 }; +VECT_VAR_DECL(expected,int,8,16) [] = { 0xff, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33 }; +VECT_VAR_DECL(expected,int,16,8) [] = { 0xfff5, 0x3333, 0x3333, 0x3333, + 0x3333, 0x3333, 0x3333, 0x3333 }; +VECT_VAR_DECL(expected,int,32,4) [] = { 0xfffffff1, 0x33333333, + 0x33333333, 0x33333333 }; +VECT_VAR_DECL(expected,int,64,2) [] = { 0xfffffffffffffff1, 0x3333333333333333 }; +VECT_VAR_DECL(expected,uint,8,16) [] = { 0xfa, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33 }; +VECT_VAR_DECL(expected,uint,16,8) [] = { 0xfff4, 0x3333, 0x3333, 0x3333, + 0x3333, 0x3333, 0x3333, 0x3333 }; +VECT_VAR_DECL(expected,uint,32,4) [] = { 0xfffffff3, 0x33333333, + 0x33333333, 0x33333333 }; +VECT_VAR_DECL(expected,uint,64,2) [] = { 0xfffffffffffffff0, + 0x3333333333333333 }; +VECT_VAR_DECL(expected,poly,8,16) [] = { 0xfa, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33 }; +VECT_VAR_DECL(expected,poly,16,8) [] = { 0xfff4, 0x3333, 0x3333, 0x3333, + 0x3333, 0x3333, 0x3333, 0x3333 }; +VECT_VAR_DECL(expected,hfloat,32,4) [] = { 0xc1700000, 0x33333333, + 0x33333333, 0x33333333 }; + +#define TEST_MSG "VST1_LANE/VST1_LANEQ" +void exec_vst1_lane (void) +{ +#define TEST_VST1_LANE(Q, T1, T2, W, N, L) \ + VECT_VAR(vector, T1, W, N) = \ + vld1##Q##_##T2##W(VECT_VAR(buffer, T1, W, N)); \ + vst1##Q##_lane_##T2##W(VECT_VAR(result, T1, W, N), \ + VECT_VAR(vector, T1, W, N), L) + + DECL_VARIABLE_ALL_VARIANTS(vector); + + clean_results (); + + /* Choose lane arbitrarily. */ + TEST_VST1_LANE(, int, s, 8, 8, 7); + TEST_VST1_LANE(, int, s, 16, 4, 3); + TEST_VST1_LANE(, int, s, 32, 2, 1); + TEST_VST1_LANE(, int, s, 64, 1, 0); + TEST_VST1_LANE(, uint, u, 8, 8, 6); + TEST_VST1_LANE(, uint, u, 16, 4, 2); + TEST_VST1_LANE(, uint, u, 32, 2, 0); + TEST_VST1_LANE(, uint, u, 64, 1, 0); + TEST_VST1_LANE(, poly, p, 8, 8, 6); + TEST_VST1_LANE(, poly, p, 16, 4, 2); + TEST_VST1_LANE(, float, f, 32, 2, 1); + + TEST_VST1_LANE(q, int, s, 8, 16, 15); + TEST_VST1_LANE(q, int, s, 16, 8, 5); + TEST_VST1_LANE(q, int, s, 32, 4, 1); + TEST_VST1_LANE(q, int, s, 64, 2, 1); + TEST_VST1_LANE(q, uint, u, 8, 16, 10); + TEST_VST1_LANE(q, uint, u, 16, 8, 4); + TEST_VST1_LANE(q, uint, u, 32, 4, 3); + TEST_VST1_LANE(q, uint, u, 64, 2, 0); + TEST_VST1_LANE(q, poly, p, 8, 16, 10); + TEST_VST1_LANE(q, poly, p, 16, 8, 4); + TEST_VST1_LANE(q, float, f, 32, 4, 1); + + CHECK_RESULTS(TEST_MSG, ""); +} + +int main (void) +{ + exec_vst1_lane (); + return 0; +}