From patchwork Tue Jan 13 15:18:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 43045 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2DE7820DE8 for ; Tue, 13 Jan 2015 15:27:03 +0000 (UTC) Received: by mail-we0-f200.google.com with SMTP id u56sf2049854wes.3 for ; Tue, 13 Jan 2015 07:27:02 -0800 (PST) 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=3ZELeTevGePiaDWn6laE4VgVH0e/D57MS2bucUjvrhc=; b=kI5mfg+Z0bHsD0biJKCB6w2RgttFTSWcJybYFGPvu/qjB1a52uzvXZdacCev+lsLlt F1uz3pwHVG43lekmUuTCHQZe44NIfbtvhla7Dsabe8ewr9wPLHxUPAXGN8z08Ga7XWRc y386jW6dChkYU0XetYmr3NfrHsB9RjFaFCXmwvN+ZRqYoItciM93gaGeolmP443E+OSU co7A/yyMsg5QWmCRMgnk4z7vL2r7MXdfftSmelqjffe8kbuGxM4GNOGrDaHV+yRo8ldK kK7eFfFlpmBK9bCNKJ/S0NzHDjMeBaGORGdH1XqcrhE19nRJY8TDuUS85XkJ4UhkdAIY K4lA== X-Gm-Message-State: ALoCoQkGaZbA7SCCbYnyVlt+aG+ZcT+i8lwK2HMcc8ijfqsu4C0m8vVhkNpYVp2MEK79PNGtIjMJ X-Received: by 10.152.2.40 with SMTP id 8mr370006lar.7.1421162822446; Tue, 13 Jan 2015 07:27:02 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.11.6 with SMTP id ee6ls12736lad.7.gmail; Tue, 13 Jan 2015 07:27:02 -0800 (PST) X-Received: by 10.112.167.68 with SMTP id zm4mr42898875lbb.93.1421162822151; Tue, 13 Jan 2015 07:27:02 -0800 (PST) Received: from mail-la0-x231.google.com (mail-la0-x231.google.com. [2a00:1450:4010:c03::231]) by mx.google.com with ESMTPS id ua8si3265132lac.7.2015.01.13.07.27.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Jan 2015 07:27:02 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::231 as permitted sender) client-ip=2a00:1450:4010:c03::231; Received: by mail-la0-f49.google.com with SMTP id hs14so3185252lab.8 for ; Tue, 13 Jan 2015 07:27:02 -0800 (PST) X-Received: by 10.152.87.12 with SMTP id t12mr42826591laz.31.1421162822039; Tue, 13 Jan 2015 07:27:02 -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 c8csp1415629lbb; Tue, 13 Jan 2015 07:27:01 -0800 (PST) X-Received: by 10.68.193.135 with SMTP id ho7mr52282054pbc.103.1421162820192; Tue, 13 Jan 2015 07:27:00 -0800 (PST) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id vt3si27431780pbc.51.2015.01.13.07.26.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jan 2015 07:27:00 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-389054-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 26051 invoked by alias); 13 Jan 2015 15:19:46 -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 24577 invoked by uid 89); 13 Jan 2015 15:19:25 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f171.google.com Received: from mail-wi0-f171.google.com (HELO mail-wi0-f171.google.com) (209.85.212.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 13 Jan 2015 15:19:21 +0000 Received: by mail-wi0-f171.google.com with SMTP id bs8so21987756wib.4 for ; Tue, 13 Jan 2015 07:19:18 -0800 (PST) X-Received: by 10.180.210.228 with SMTP id mx4mr41711872wic.57.1421162358405; Tue, 13 Jan 2015 07:19:18 -0800 (PST) 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 jr4sm26100313wjc.20.2015.01.13.07.19.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Jan 2015 07:19:17 -0800 (PST) From: Christophe Lyon To: gcc-patches@gcc.gnu.org Subject: [[ARM/AArch64][testsuite] 25/36] Add vmull tests. Date: Tue, 13 Jan 2015 16:18:23 +0100 Message-Id: <1421162314-25779-26-git-send-email-christophe.lyon@linaro.org> In-Reply-To: <1421162314-25779-1-git-send-email-christophe.lyon@linaro.org> References: <1421162314-25779-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:c03::231 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 * gcc.target/aarch64/advsimd-intrinsics/vmull.c: New file. diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vmull.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vmull.c new file mode 100644 index 0000000..3fdd51e --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vmull.c @@ -0,0 +1,75 @@ +#include +#include "arm-neon-ref.h" +#include "compute-ref-data.h" + +/* Expected results. */ +VECT_VAR_DECL(expected,int,16,8) [] = { 0x100, 0xe1, 0xc4, 0xa9, + 0x90, 0x79, 0x64, 0x51 }; +VECT_VAR_DECL(expected,int,32,4) [] = { 0x100, 0xe1, 0xc4, 0xa9 }; +VECT_VAR_DECL(expected,int,64,2) [] = { 0x100, 0xe1 }; +VECT_VAR_DECL(expected,uint,16,8) [] = { 0xe100, 0xe2e1, 0xe4c4, 0xe6a9, + 0xe890, 0xea79, 0xec64, 0xee51 }; +VECT_VAR_DECL(expected,uint,32,4) [] = { 0xffe00100, 0xffe200e1, + 0xffe400c4, 0xffe600a9 }; +VECT_VAR_DECL(expected,uint,64,2) [] = { 0xffffffe000000100, + 0xffffffe2000000e1 }; +VECT_VAR_DECL(expected,poly,16,8) [] = { 0x5500, 0x5501, 0x5504, 0x5505, + 0x5510, 0x5511, 0x5514, 0x5515 }; + +#define TEST_MSG "VMULL" +void exec_vmull (void) +{ + /* Basic test: y=vmull(x,x), then store the result. */ +#define TEST_VMULL(T1, T2, W, W2, N) \ + VECT_VAR(vector_res, T1, W2, N) = \ + vmull_##T2##W(VECT_VAR(vector, T1, W, N), \ + VECT_VAR(vector, T1, W, N)); \ + vst1q_##T2##W2(VECT_VAR(result, T1, W2, N), VECT_VAR(vector_res, T1, W2, N)) + + 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_res, int, 16, 8); + DECL_VARIABLE(vector_res, int, 32, 4); + DECL_VARIABLE(vector_res, int, 64, 2); + DECL_VARIABLE(vector_res, uint, 16, 8); + DECL_VARIABLE(vector_res, uint, 32, 4); + DECL_VARIABLE(vector_res, uint, 64, 2); + DECL_VARIABLE(vector_res, poly, 16, 8); + + clean_results (); + + 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); + + TEST_VMULL(int, s, 8, 16, 8); + TEST_VMULL(int, s, 16, 32, 4); + TEST_VMULL(int, s, 32, 64, 2); + TEST_VMULL(uint, u, 8, 16, 8); + TEST_VMULL(uint, u, 16, 32, 4); + TEST_VMULL(uint, u, 32, 64, 2); + TEST_VMULL(poly, p, 8, 16, 8); + + CHECK(TEST_MSG, int, 16, 8, PRIx64, expected, ""); + CHECK(TEST_MSG, int, 32, 4, PRIx32, expected, ""); + CHECK(TEST_MSG, int, 64, 2, PRIx32, expected, ""); + CHECK(TEST_MSG, uint, 16, 8, PRIx64, expected, ""); + CHECK(TEST_MSG, uint, 32, 4, PRIx32, expected, ""); + CHECK(TEST_MSG, uint, 64, 2, PRIx32, expected, ""); + CHECK(TEST_MSG, poly, 16, 8, PRIx16, expected, ""); +} + +int main (void) +{ + exec_vmull (); + return 0; +}