From patchwork Tue Jan 20 15:33:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 43381 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F014B218DB for ; Tue, 20 Jan 2015 15:33:54 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id gf13sf7483907lab.0 for ; Tue, 20 Jan 2015 07:33:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:mime-version:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-original-sender :x-original-authentication-results; bh=m3h7hQyoK63brxowjYTMjtN73kQTaJP/xmRDQ8YcTUg=; b=OOO2FTqOTvlMlimTxvmcS5aCF4P4xfCXKwIqb7quWTTRH1KI3g9qIbJhLYjLYU5NwH 2YBhdPxq/7SqOEH2JAkP6zRlkAf4s6+gAn3IhggYZq0YKLtafaueX3lmlaVaelW0NxOq +M5zdyVc4xQhnfOPz7NTbS8w0rsoMGmEb8AU12F1ZHCMOeGldSMgtriMWCXNkKJsn6Si vGSV+w//bp9t61aCNSDq44vN6hu7GOJ63yv6wJJs6Xr5MwnPi83B5+XmsTSIybDBIIKl qKAF+vfkOwn4TXWToNM8YMCnhhAF29mdPXQmEEYD6EPJGo7zXP0HRD+yrsbSE80Ko8b+ oAHA== X-Gm-Message-State: ALoCoQkX3ZKwB0pcQZpy39rWBPMWN+PbO8n0jZJgRcz6pdBnMpOVVu1CIIljahjSj7gi1hM6HLcu X-Received: by 10.180.7.226 with SMTP id m2mr2912271wia.5.1421768033856; Tue, 20 Jan 2015 07:33:53 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.70 with SMTP id be6ls732988lab.42.gmail; Tue, 20 Jan 2015 07:33:53 -0800 (PST) X-Received: by 10.152.22.129 with SMTP id d1mr7502706laf.22.1421768033578; Tue, 20 Jan 2015 07:33:53 -0800 (PST) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com. [2a00:1450:4010:c03::236]) by mx.google.com with ESMTPS id ur12si5746034lac.109.2015.01.20.07.33.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 Jan 2015 07:33:53 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::236 as permitted sender) client-ip=2a00:1450:4010:c03::236; Received: by mail-la0-f54.google.com with SMTP id pv20so34930310lab.13 for ; Tue, 20 Jan 2015 07:33:53 -0800 (PST) X-Received: by 10.112.131.1 with SMTP id oi1mr38405149lbb.2.1421768033416; Tue, 20 Jan 2015 07:33:53 -0800 (PST) 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.9.200 with SMTP id c8csp1456686lbb; Tue, 20 Jan 2015 07:33:52 -0800 (PST) X-Received: by 10.70.45.199 with SMTP id p7mr53856952pdm.32.1421768031306; Tue, 20 Jan 2015 07:33:51 -0800 (PST) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id ah8si5000804pad.214.2015.01.20.07.33.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jan 2015 07:33:51 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-390015-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 25527 invoked by alias); 20 Jan 2015 15:33:20 -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 25428 invoked by uid 89); 20 Jan 2015 15:33:18 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qa0-f45.google.com Received: from mail-qa0-f45.google.com (HELO mail-qa0-f45.google.com) (209.85.216.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 20 Jan 2015 15:33:13 +0000 Received: by mail-qa0-f45.google.com with SMTP id n8so28642572qaq.4 for ; Tue, 20 Jan 2015 07:33:11 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.229.70.133 with SMTP id d5mr58973873qcj.2.1421767991343; Tue, 20 Jan 2015 07:33:11 -0800 (PST) Received: by 10.140.84.176 with HTTP; Tue, 20 Jan 2015 07:33:11 -0800 (PST) In-Reply-To: <54B95812.3010703@arm.com> References: <1421162314-25779-1-git-send-email-christophe.lyon@linaro.org> <1421162314-25779-29-git-send-email-christophe.lyon@linaro.org> <54B95812.3010703@arm.com> Date: Tue, 20 Jan 2015 16:33:11 +0100 Message-ID: Subject: Re: [[ARM/AArch64][testsuite] 28/36] Add vmnv tests. From: Christophe Lyon To: Tejas Belagod Cc: "gcc-patches@gcc.gnu.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:c03::236 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 On 16 January 2015 at 19:27, Tejas Belagod wrote: >> +VECT_VAR_DECL(expected,poly,16,8) [] = { 0x3333, 0x3333, 0x3333, 0x3333, >> + 0x3333, 0x3333, 0x3333, 0x3333 }; >> +VECT_VAR_DECL(expected,hfloat,32,4) [] = { 0x33333333, 0x33333333, >> + 0x33333333, 0x33333333 }; >> + > > > No float or poly16 for vmvn_*. > Updated as attached, removed 64x1 and 64x2 too. > Otherwise, LGTM. > > Tejas. > > >From f4902098b0379fd445ceda7d2202b93f56c6129f Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Wed, 10 Dec 2014 23:07:25 +0100 Subject: [[ARM/AArch64][testsuite] 28/36] Add vmnv tests. diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vmvn.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vmvn.c new file mode 100644 index 0000000..268a707 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vmvn.c @@ -0,0 +1,137 @@ +#include +#include "arm-neon-ref.h" +#include "compute-ref-data.h" + +/* Expected results. */ +VECT_VAR_DECL(expected,int,8,8) [] = { 0xf, 0xe, 0xd, 0xc, + 0xb, 0xa, 0x9, 0x8 }; +VECT_VAR_DECL(expected,int,16,4) [] = { 0xf, 0xe, 0xd, 0xc }; +VECT_VAR_DECL(expected,int,32,2) [] = { 0xf, 0xe }; +VECT_VAR_DECL(expected,uint,8,8) [] = { 0xf, 0xe, 0xd, 0xc, + 0xb, 0xa, 0x9, 0x8 }; +VECT_VAR_DECL(expected,uint,16,4) [] = { 0xf, 0xe, 0xd, 0xc }; +VECT_VAR_DECL(expected,uint,32,2) [] = { 0xf, 0xe }; +VECT_VAR_DECL(expected,poly,8,8) [] = { 0xf, 0xe, 0xd, 0xc, + 0xb, 0xa, 0x9, 0x8 }; +VECT_VAR_DECL(expected,int,8,16) [] = { 0xf, 0xe, 0xd, 0xc, + 0xb, 0xa, 0x9, 0x8, + 0x7, 0x6, 0x5, 0x4, + 0x3, 0x2, 0x1, 0x0 }; +VECT_VAR_DECL(expected,int,16,8) [] = { 0xf, 0xe, 0xd, 0xc, + 0xb, 0xa, 0x9, 0x8 }; +VECT_VAR_DECL(expected,int,32,4) [] = { 0xf, 0xe, 0xd, 0xc }; +VECT_VAR_DECL(expected,uint,8,16) [] = { 0xf, 0xe, 0xd, 0xc, + 0xb, 0xa, 0x9, 0x8, + 0x7, 0x6, 0x5, 0x4, + 0x3, 0x2, 0x1, 0x0 }; +VECT_VAR_DECL(expected,uint,16,8) [] = { 0xf, 0xe, 0xd, 0xc, + 0xb, 0xa, 0x9, 0x8 }; +VECT_VAR_DECL(expected,uint,32,4) [] = { 0xf, 0xe, 0xd, 0xc }; +VECT_VAR_DECL(expected,poly,8,16) [] = { 0xf, 0xe, 0xd, 0xc, + 0xb, 0xa, 0x9, 0x8, + 0x7, 0x6, 0x5, 0x4, + 0x3, 0x2, 0x1, 0x0 }; + +#define INSN_NAME vmvn +#define TEST_MSG "VMVN/VMVNQ" + +#define FNNAME1(NAME) void exec_ ## NAME (void) +#define FNNAME(NAME) FNNAME1(NAME) + +FNNAME (INSN_NAME) +{ + /* Basic test: y=OP(x), then store the result. */ +#define TEST_UNARY_OP1(INSN, Q, T1, T2, W, N) \ + VECT_VAR(vector_res, T1, W, N) = \ + INSN##Q##_##T2##W(VECT_VAR(vector, T1, W, N)); \ + vst1##Q##_##T2##W(VECT_VAR(result, T1, W, N), VECT_VAR(vector_res, T1, W, N)) + +#define TEST_UNARY_OP(INSN, Q, T1, T2, W, N) \ + TEST_UNARY_OP1(INSN, Q, T1, T2, W, N) \ + + /* No need for 64 bits variants. */ + DECL_VARIABLE(vector, int, 8, 8); + DECL_VARIABLE(vector, int, 16, 4); + DECL_VARIABLE(vector, int, 32, 2); + DECL_VARIABLE(vector, uint, 8, 8); + DECL_VARIABLE(vector, uint, 16, 4); + DECL_VARIABLE(vector, uint, 32, 2); + DECL_VARIABLE(vector, poly, 8, 8); + DECL_VARIABLE(vector, int, 8, 16); + DECL_VARIABLE(vector, int, 16, 8); + DECL_VARIABLE(vector, int, 32, 4); + DECL_VARIABLE(vector, uint, 8, 16); + DECL_VARIABLE(vector, uint, 16, 8); + DECL_VARIABLE(vector, uint, 32, 4); + DECL_VARIABLE(vector, poly, 8, 16); + + DECL_VARIABLE(vector_res, int, 8, 8); + DECL_VARIABLE(vector_res, int, 16, 4); + DECL_VARIABLE(vector_res, int, 32, 2); + DECL_VARIABLE(vector_res, uint, 8, 8); + DECL_VARIABLE(vector_res, uint, 16, 4); + DECL_VARIABLE(vector_res, uint, 32, 2); + DECL_VARIABLE(vector_res, poly, 8, 8); + DECL_VARIABLE(vector_res, int, 8, 16); + DECL_VARIABLE(vector_res, int, 16, 8); + DECL_VARIABLE(vector_res, int, 32, 4); + DECL_VARIABLE(vector_res, uint, 8, 16); + DECL_VARIABLE(vector_res, uint, 16, 8); + DECL_VARIABLE(vector_res, uint, 32, 4); + DECL_VARIABLE(vector_res, poly, 8, 16); + + clean_results (); + + /* Initialize input "vector" from "buffer". */ + VLOAD(vector, buffer, , int, s, 8, 8); + VLOAD(vector, buffer, , int, s, 16, 4); + VLOAD(vector, buffer, , int, s, 32, 2); + VLOAD(vector, buffer, , uint, u, 8, 8); + VLOAD(vector, buffer, , uint, u, 16, 4); + VLOAD(vector, buffer, , uint, u, 32, 2); + VLOAD(vector, buffer, , poly, p, 8, 8); + VLOAD(vector, buffer, q, int, s, 8, 16); + VLOAD(vector, buffer, q, int, s, 16, 8); + VLOAD(vector, buffer, q, int, s, 32, 4); + VLOAD(vector, buffer, q, uint, u, 8, 16); + VLOAD(vector, buffer, q, uint, u, 16, 8); + VLOAD(vector, buffer, q, uint, u, 32, 4); + VLOAD(vector, buffer, q, poly, p, 8, 16); + + /* Apply a unary operator named INSN_NAME. */ + TEST_UNARY_OP(INSN_NAME, , int, s, 8, 8); + TEST_UNARY_OP(INSN_NAME, , int, s, 16, 4); + TEST_UNARY_OP(INSN_NAME, , int, s, 32, 2); + TEST_UNARY_OP(INSN_NAME, , uint, u, 8, 8); + TEST_UNARY_OP(INSN_NAME, , uint, u, 16, 4); + TEST_UNARY_OP(INSN_NAME, , uint, u, 32, 2); + TEST_UNARY_OP(INSN_NAME, , poly, p, 8, 8); + TEST_UNARY_OP(INSN_NAME, q, int, s, 8, 16); + TEST_UNARY_OP(INSN_NAME, q, int, s, 16, 8); + TEST_UNARY_OP(INSN_NAME, q, int, s, 32, 4); + TEST_UNARY_OP(INSN_NAME, q, uint, u, 8, 16); + TEST_UNARY_OP(INSN_NAME, q, uint, u, 16, 8); + TEST_UNARY_OP(INSN_NAME, q, uint, u, 32, 4); + TEST_UNARY_OP(INSN_NAME, q, poly, p, 8, 16); + + CHECK(TEST_MSG, int, 8, 8, PRIx8, expected, ""); + CHECK(TEST_MSG, int, 16, 4, PRIx16, expected, ""); + CHECK(TEST_MSG, int, 32, 2, PRIx32, expected, ""); + CHECK(TEST_MSG, uint, 8, 8, PRIx8, expected, ""); + CHECK(TEST_MSG, uint, 16, 4, PRIx16, expected, ""); + CHECK(TEST_MSG, uint, 32, 2, PRIx32, expected, ""); + CHECK(TEST_MSG, poly, 8, 8, PRIx8, expected, ""); + CHECK(TEST_MSG, int, 8, 16, PRIx8, expected, ""); + CHECK(TEST_MSG, int, 16, 8, PRIx16, expected, ""); + CHECK(TEST_MSG, int, 32, 4, PRIx32, expected, ""); + CHECK(TEST_MSG, uint, 8, 16, PRIx8, expected, ""); + CHECK(TEST_MSG, uint, 16, 8, PRIx16, expected, ""); + CHECK(TEST_MSG, uint, 32, 4, PRIx32, expected, ""); + CHECK(TEST_MSG, poly, 8, 16, PRIx8, expected, ""); +} + +int main (void) +{ + exec_vmvn (); + return 0; +} -- 2.1.0