From patchwork Wed May 11 13:23:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 67522 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp225359qge; Wed, 11 May 2016 06:26:53 -0700 (PDT) X-Received: by 10.67.1.3 with SMTP id bc3mr4882120pad.138.1462973213134; Wed, 11 May 2016 06:26:53 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id uy8si9892878pab.145.2016.05.11.06.26.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 May 2016 06:26:53 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-427072-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-427072-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-427072-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=FOrR0IkPSBLvoEm0D+yEaeaCVu5FVRKoZ4KyD4lTrbqZdaQ2TAoY7 cSYb+h430lwT/1Pk5EOJJrD8qL6TNeh2UIvGeXnC2Zlg8K2Qh6cLZcDsFluyIsMc q97AhRRFffxvC5qn6WYFornJGgw0pi7n95ZEhFqzuC2XJidEk9H16U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:in-reply-to:references; s=default; bh=2yCvfcsLq+VhSKFisZHv5pbv+mU=; b=sy10A+hrzAq6kKJu2RqoBzCr8+DS Faw3HJizX0CXiycjy4wBBSobAHkFKjwfbJu1ANXZeIfk//d0qyUu/hfkNnTQVtFE a/+4ApTRZEn1S3fL/1UDFiVB/mwq1Xk+tATw2IkslpPqhc8qZ3hJzMfVmqxFMRUm V6voL3+DatrLZ6s= Received: (qmail 83874 invoked by alias); 11 May 2016 13:24:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk 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 83373 invoked by uid 89); 11 May 2016 13:24:19 -0000 Authentication-Results: sourceware.org; auth=none 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 spammy= X-HELO: mail-wm0-f52.google.com Received: from mail-wm0-f52.google.com (HELO mail-wm0-f52.google.com) (74.125.82.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 11 May 2016 13:24:04 +0000 Received: by mail-wm0-f52.google.com with SMTP id g17so82522297wme.1 for ; Wed, 11 May 2016 06:24:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=oiLficqtOLwml6NFVXJLDVNiE2Srv1ELXhGMSxAnZos=; b=KRil0aW2fHI6s/lLuVDjw2j5pXMAdATr8WrjDdKTYOWLSfr91IB1U38yyTIFw9LMy2 QJKpVdTpUvP/A71z7L+Jn7TcGA+QNqXkFeilC+qYIWSqwLq9GfEji198kg/0iDh2i5xN oUZyWqXZeZssXitiGFs04iskXMLHw+B7VOkaI9WPCCRBX3JV2Blh1mKgJCxFokzW+lZc Bx4uSlQ3dMF/Tj0LouuS7/2rp+/LnjNZrtbOcc6JNpn/r+nkrREnDSOrkVG/cgbzE3mN +lUrUqZj7YoJ4rNT4KOWCYo3vtQsui1yslBBzVBlI0N+VCjnQhDl1Pr/Xp94aEf+awIp Yigw== X-Gm-Message-State: AOPr4FVb7KE2MYGudS2vIprDiANAaHr2rR/FXZzx7wVbE5M7UFY8QMKSDTBv1VA1bpW9ByOI X-Received: by 10.194.82.41 with SMTP id f9mr4234215wjy.169.1462973041566; Wed, 11 May 2016 06:24:01 -0700 (PDT) Received: from gnx2647.guests.st.com (29-39.80-90.static-ip.oleane.fr. [90.80.39.29]) by smtp.gmail.com with ESMTPSA id u6sm35876719wmd.21.2016.05.11.06.24.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 May 2016 06:24:01 -0700 (PDT) From: Christophe Lyon To: gcc-patches@gcc.gnu.org Subject: [Patch ARM/AArch64 07/11] Add missing vget_lane fp16 tests. Date: Wed, 11 May 2016 15:23:57 +0200 Message-Id: <1462973041-7911-8-git-send-email-christophe.lyon@linaro.org> In-Reply-To: <1462973041-7911-1-git-send-email-christophe.lyon@linaro.org> References: <1462973041-7911-1-git-send-email-christophe.lyon@linaro.org> X-IsSubscribed: yes 2016-05-02 Christophe Lyon * gcc.target/aarch64/advsimd-intrinsics/vget_lane.c: Add fp16 tests. Change-Id: I5fafd1e90baf09588ab9f5444817c74e7d865a20 -- 1.9.1 diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vget_lane.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vget_lane.c index 5806050..fe41c5f 100644 --- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vget_lane.c +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vget_lane.c @@ -13,6 +13,7 @@ uint32_t expected_u32 = 0xfffffff1; uint64_t expected_u64 = 0xfffffffffffffff0; poly8_t expected_p8 = 0xf6; poly16_t expected_p16 = 0xfff2; +hfloat16_t expected_f16 = 0xcb80; hfloat32_t expected_f32 = 0xc1700000; int8_t expectedq_s8 = 0xff; @@ -25,6 +26,7 @@ uint32_t expectedq_u32 = 0xfffffff2; uint64_t expectedq_u64 = 0xfffffffffffffff1; poly8_t expectedq_p8 = 0xfe; poly16_t expectedq_p16 = 0xfff6; +hfloat16_t expectedq_f16 = 0xca80; hfloat32_t expectedq_f32 = 0xc1500000; int error_found = 0; @@ -52,6 +54,10 @@ void exec_vget_lane (void) uint32_t var_int32; float32_t var_float32; } var_int32_float32; + union { + uint16_t var_int16; + float16_t var_float16; + } var_int16_float16; #define TEST_VGET_LANE_FP(Q, T1, T2, W, N, L) \ VAR(var, T1, W) = vget##Q##_lane_##T2##W(VECT_VAR(vector, T1, W, N), L); \ @@ -81,10 +87,17 @@ void exec_vget_lane (void) VAR_DECL(var, uint, 64); VAR_DECL(var, poly, 8); VAR_DECL(var, poly, 16); +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) + VAR_DECL(var, float, 16); +#endif VAR_DECL(var, float, 32); /* Initialize input values. */ TEST_MACRO_ALL_VARIANTS_2_5(VLOAD, vector, buffer); +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) + VLOAD(vector, buffer, , float, f, 16, 4); + VLOAD(vector, buffer, q, float, f, 16, 8); +#endif VLOAD(vector, buffer, , float, f, 32, 2); VLOAD(vector, buffer, q, float, f, 32, 4); @@ -99,6 +112,9 @@ void exec_vget_lane (void) TEST_VGET_LANE(, uint, u, 64, 1, 0); TEST_VGET_LANE(, poly, p, 8, 8, 6); TEST_VGET_LANE(, poly, p, 16, 4, 2); +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) + TEST_VGET_LANE_FP(, float, f, 16, 4, 1); +#endif TEST_VGET_LANE_FP(, float, f, 32, 2, 1); TEST_VGET_LANE(q, int, s, 8, 16, 15); @@ -111,6 +127,9 @@ void exec_vget_lane (void) TEST_VGET_LANE(q, uint, u, 64, 2, 1); TEST_VGET_LANE(q, poly, p, 8, 16, 14); TEST_VGET_LANE(q, poly, p, 16, 8, 6); +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) + TEST_VGET_LANE_FP(q, float, f, 16, 8, 3); +#endif TEST_VGET_LANE_FP(q, float, f, 32, 4, 3); }