From patchwork Tue Aug 8 07:20:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiang, Haochen" X-Patchwork-Id: 132512 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1936750vqr; Tue, 8 Aug 2023 00:21:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOEU59ty8myadpecYrzsDyYBZ2iTmcHwK0mFjEzwoOUkCcgFCnxyZBPPd5yw5OzgPDfX69 X-Received: by 2002:a17:906:28c:b0:99b:bca6:cf90 with SMTP id 12-20020a170906028c00b0099bbca6cf90mr10060954ejf.9.1691479289525; Tue, 08 Aug 2023 00:21:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691479289; cv=none; d=google.com; s=arc-20160816; b=vo7JrUwdThagjidzKYnsNC0oYatDN2WPlu1aw+q3DR0KgKptzh/dWyHCRyBi6CNFCr el64rb69vj5e6+1Tazi2vw/noWo6dwSykVMXk4LlHg5OpSlw1XpTlxuulS4DW3hNZ8cf ns7+YSpHoSnkBA8fOz06y2QXghscppAiESjkWwhqGoiM1841lzJ+rgsLkuaexKFw3jQr d7G5LvNyF+uBfr1fEsqz23NnyWZo5vTF6siRUdbMnIxrLrItMxJmDED66P8uWJtCK+D7 elgjjGF3DOPf1jLQ6oZMrXaJmynqd2FcRpFb3U8oAgCIA7bkoeoXW/U2r+TT+50O4AYE aYcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=71tcFStNzQXuW1v+BaHzHb2oJxx5dYlGogVoW8BjWz0=; fh=pQVlhs2+rlZ1Q5n//Pi5Wub1q9awKW2/7mZGTpWj3XA=; b=Ne+dv/TPS0BrRYdkCWLc9N3EMIS8AbdkdWEyL5/ToPCnmn0r8t++SyE9InqIiWpDrf WeKQyNYGz3O0ufviLwjQ4VPvddF8ns77LNXsnKcFd2/o8KLcGSxvrS32mLY09GjSz7lK WKAdBV0FibUBk6FKu1GWdTldGY8QaNR8uYA6wze2yIqARiQg5PtQk3BpmGEtNP7jCQZi gwz+fTJY5IpQdCkU3n/xAqXZD4XukRaoQJjzgstFgyp/3x9IaEpQ+tx1vI6vw272pQ3+ Crbw5wCBh61/YnebhFJkFzCzuHtXEzQSJMxDUhLdAJHoFafmFRtespOtciSULqvZoLrD F83g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="un1GwG5/"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id j6-20020a17090643c600b0098871664f55si1757504ejn.800.2023.08.08.00.21.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 00:21:29 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="un1GwG5/"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 59C11385771E for ; Tue, 8 Aug 2023 07:21:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 59C11385771E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691479260; bh=71tcFStNzQXuW1v+BaHzHb2oJxx5dYlGogVoW8BjWz0=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=un1GwG5/LVeCtE+tOgVbKHQEIwIJ6C0cMmjjzHjhvXjfw0qdZ0/E0BODTq7MwOQdO gyrLAc4yH8Hrax1JdimKUIDJwvcthrHPOQeRLGHLbBbSTOlTnYxCQqlOsroWnpyJad zFL9rmqx4r12hOZkU8u+FQYdSUfq/Rx+EdVYh6QM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by sourceware.org (Postfix) with ESMTPS id E339D3858280 for ; Tue, 8 Aug 2023 07:20:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E339D3858280 X-IronPort-AV: E=McAfee;i="6600,9927,10795"; a="369642523" X-IronPort-AV: E=Sophos;i="6.01,263,1684825200"; d="scan'208";a="369642523" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2023 00:20:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="874620675" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by fmsmga001.fm.intel.com with ESMTP; 08 Aug 2023 00:20:08 -0700 Received: from shliclel4217.sh.intel.com (shliclel4217.sh.intel.com [10.239.240.127]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 75BB01005608; Tue, 8 Aug 2023 15:20:04 +0800 (CST) To: gcc-patches@gcc.gnu.org Cc: ubizjak@gmail.com, hongtao.liu@intel.com Subject: [PATCH 2/6] Support AVX10.1 for AVX512DQ+AVX512VL intrins Date: Tue, 8 Aug 2023 15:20:04 +0800 Message-Id: <20230808072004.1570107-1-haochen.jiang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230808071312.1569559-1-haochen.jiang@intel.com> References: <20230808071312.1569559-1-haochen.jiang@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Haochen Jiang via Gcc-patches From: "Jiang, Haochen" Reply-To: Haochen Jiang Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773644548037755749 X-GMAIL-MSGID: 1773644587579719654 gcc/testsuite/ChangeLog: * gcc.target/i386/avx10_1-vandnpd-1.c: New test. * gcc.target/i386/avx10_1-vandnps-1.c: Ditto. * gcc.target/i386/avx10_1-vbroadcastf32x2-1.c: Ditto. * gcc.target/i386/avx10_1-vbroadcastf64x2-1.c: Ditto. * gcc.target/i386/avx10_1-vbroadcasti32x2-1.c: Ditto. * gcc.target/i386/avx10_1-vbroadcasti64x2-1.c: Ditto. * gcc.target/i386/avx10_1-vcvtpd2qq-1.c: Ditto. * gcc.target/i386/avx10_1-vcvtpd2uqq-1.c: Ditto. * gcc.target/i386/avx10_1-vcvttpd2qq-1.c: Ditto. * gcc.target/i386/avx10_1-vcvttpd2uqq-1.c: Ditto. * gcc.target/i386/avx10_1-vcvttps2qq-1.c: Ditto. * gcc.target/i386/avx10_1-vcvttps2uqq-1.c: Ditto. * gcc.target/i386/avx10_1-vpmullq-1.c: Ditto. --- .../gcc.target/i386/avx10_1-vandnpd-1.c | 21 +++++++++++++ .../gcc.target/i386/avx10_1-vandnps-1.c | 21 +++++++++++++ .../i386/avx10_1-vbroadcastf32x2-1.c | 19 ++++++++++++ .../i386/avx10_1-vbroadcastf64x2-1.c | 19 ++++++++++++ .../i386/avx10_1-vbroadcasti32x2-1.c | 25 ++++++++++++++++ .../i386/avx10_1-vbroadcasti64x2-1.c | 19 ++++++++++++ .../gcc.target/i386/avx10_1-vcvtpd2qq-1.c | 29 ++++++++++++++++++ .../gcc.target/i386/avx10_1-vcvtpd2uqq-1.c | 29 ++++++++++++++++++ .../gcc.target/i386/avx10_1-vcvttpd2qq-1.c | 30 +++++++++++++++++++ .../gcc.target/i386/avx10_1-vcvttpd2uqq-1.c | 29 ++++++++++++++++++ .../gcc.target/i386/avx10_1-vcvttps2qq-1.c | 27 +++++++++++++++++ .../gcc.target/i386/avx10_1-vcvttps2uqq-1.c | 26 ++++++++++++++++ .../gcc.target/i386/avx10_1-vpmullq-1.c | 24 +++++++++++++++ 13 files changed, 318 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vandnpd-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vandnps-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf32x2-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf64x2-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti32x2-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti64x2-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2qq-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2uqq-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2qq-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2uqq-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2qq-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2uqq-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vpmullq-1.c diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vandnpd-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vandnpd-1.c new file mode 100644 index 00000000000..a9a8bd7ca8b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vandnpd-1.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vandnpd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vandnpd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vandnpd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vandnpd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256d y; +volatile __m128d x; +volatile __mmask8 m; + +void extern +avx10_1_test (void) +{ + y = _mm256_mask_andnot_pd (y, m, y, y); + y = _mm256_maskz_andnot_pd (m, y, y); + x = _mm_mask_andnot_pd (x, m, x, x); + x = _mm_maskz_andnot_pd (m, x, x); +} diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vandnps-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vandnps-1.c new file mode 100644 index 00000000000..c33141021cc --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vandnps-1.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vandnps\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vandnps\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vandnps\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vandnps\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256 y; +volatile __m128 x; +volatile __mmask8 m; + +void extern +avx10_1_test (void) +{ + y = _mm256_mask_andnot_ps (y, m, y, y); + y = _mm256_maskz_andnot_ps (m, y, y); + x = _mm_mask_andnot_ps (x, m, x, x); + x = _mm_maskz_andnot_ps (m, x, x); +} diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf32x2-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf32x2-1.c new file mode 100644 index 00000000000..b6d73714282 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf32x2-1.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vbroadcastf32x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vbroadcastf32x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vbroadcastf32x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}{z}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256 x; +volatile __m128 y; +volatile __mmask8 m; + +void extern +avx10_1_test (void) +{ + x = _mm256_broadcast_f32x2 (y); + x = _mm256_mask_broadcast_f32x2 (x, m, y); + x = _mm256_maskz_broadcast_f32x2 (m, y); +} diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf64x2-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf64x2-1.c new file mode 100644 index 00000000000..26a391552c7 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf64x2-1.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vbroadcastf64x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\]|vshuff64x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vbroadcastf64x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\[^\{\]|vshuff64x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vbroadcastf64x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}|vshuff64x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256d y; +volatile __m128d x; +volatile __mmask8 m; + +void extern +avx10_1_test (void) +{ + y = _mm256_broadcast_f64x2 (x); + y = _mm256_mask_broadcast_f64x2 (y, m, x); + y = _mm256_maskz_broadcast_f64x2 (m, x); +} diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti32x2-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti32x2-1.c new file mode 100644 index 00000000000..b26e2a3f33a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti32x2-1.c @@ -0,0 +1,25 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256i x; +volatile __m128i y; +volatile __mmask8 m; + +void extern +avx10_1_test (void) +{ + x = _mm256_broadcast_i32x2 (y); + x = _mm256_mask_broadcast_i32x2 (x, m, y); + x = _mm256_maskz_broadcast_i32x2 (m, y); + y = _mm_broadcast_i32x2 (y); + y = _mm_mask_broadcast_i32x2 (y, m, y); + y = _mm_maskz_broadcast_i32x2 (m, y); +} diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti64x2-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti64x2-1.c new file mode 100644 index 00000000000..29e255a8724 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti64x2-1.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vbroadcasti64x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\]|vshufi64x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vbroadcasti64x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\[^\{\]|vshufi64x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vbroadcasti64x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}|vshufi64x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256i y; +volatile __m128i x; +volatile __mmask8 m; + +void extern +avx10_1_test (void) +{ + y = _mm256_broadcast_i64x2 (x); + y = _mm256_mask_broadcast_i64x2 (y, m, x); + y = _mm256_maskz_broadcast_i64x2 (m, x); +} diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2qq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2qq-1.c new file mode 100644 index 00000000000..ec213071f68 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2qq-1.c @@ -0,0 +1,29 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256d s1; +volatile __m128d s2; +volatile __m256i res1; +volatile __m128i res2; +volatile __mmask8 m; + +void extern +avx10_1_test (void) +{ + res1 = _mm256_cvtpd_epi64 (s1); + res2 = _mm_cvtpd_epi64 (s2); + + res1 = _mm256_mask_cvtpd_epi64 (res1, m, s1); + res2 = _mm_mask_cvtpd_epi64 (res2, m, s2); + + res1 = _mm256_maskz_cvtpd_epi64 (m, s1); + res2 = _mm_maskz_cvtpd_epi64 (m, s2); +} diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2uqq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2uqq-1.c new file mode 100644 index 00000000000..d84e96860c6 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2uqq-1.c @@ -0,0 +1,29 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256d s1; +volatile __m128d s2; +volatile __m256i res1; +volatile __m128i res2; +volatile __mmask8 m; + +void extern +avx10_1_test (void) +{ + res1 = _mm256_cvtpd_epu64 (s1); + res2 = _mm_cvtpd_epu64 (s2); + + res1 = _mm256_mask_cvtpd_epu64 (res1, m, s1); + res2 = _mm_mask_cvtpd_epu64 (res2, m, s2); + + res1 = _mm256_maskz_cvtpd_epu64 (m, s1); + res2 = _mm_maskz_cvtpd_epu64 (m, s2); +} diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2qq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2qq-1.c new file mode 100644 index 00000000000..a677176102f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2qq-1.c @@ -0,0 +1,30 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256d s1; +volatile __m128d s2; +volatile __m256i res1; +volatile __m128i res2; +volatile __mmask8 m; + +void extern +avx10_1_test (void) +{ + res1 = _mm256_cvttpd_epi64 (s1); + res2 = _mm_cvttpd_epi64 (s2); + + res1 = _mm256_mask_cvttpd_epi64 (res1, m, s1); + res2 = _mm_mask_cvttpd_epi64 (res2, m, s2); + + res1 = _mm256_maskz_cvttpd_epi64 (m, s1); + res2 = _mm_maskz_cvttpd_epi64 (m, s2); + +} diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2uqq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2uqq-1.c new file mode 100644 index 00000000000..d970b2ee633 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2uqq-1.c @@ -0,0 +1,29 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256d s1; +volatile __m128d s2; +volatile __m256i res1; +volatile __m128i res2; +volatile __mmask8 m; + +void extern +avx10_1_test (void) +{ + res1 = _mm256_cvttpd_epu64 (s1); + res2 = _mm_cvttpd_epu64 (s2); + + res1 = _mm256_mask_cvttpd_epu64 (res1, m, s1); + res2 = _mm_mask_cvttpd_epu64 (res2, m, s2); + + res1 = _mm256_maskz_cvttpd_epu64 (m, s1); + res2 = _mm_maskz_cvttpd_epu64 (m, s2); +} diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2qq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2qq-1.c new file mode 100644 index 00000000000..95610023b3b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2qq-1.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256i x1; +volatile __m128i x2; +volatile __m256 z1; +volatile __m128 z2; +volatile __mmask8 m; + +void extern +avx10_1_test (void) +{ + x1 = _mm256_cvttps_epi64 (z2); + x1 = _mm256_mask_cvttps_epi64 (x1, m, z2); + x1 = _mm256_maskz_cvttps_epi64 (m, z2); + x2 = _mm_cvttps_epi64 (z2); + x2 = _mm_mask_cvttps_epi64 (x2, m, z2); + x2 = _mm_maskz_cvttps_epi64 (m, z2); +} diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2uqq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2uqq-1.c new file mode 100644 index 00000000000..8e42fcf9caf --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2uqq-1.c @@ -0,0 +1,26 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256i x1; +volatile __m128i x2; +volatile __m128 z; +volatile __mmask8 m; + +void extern +avx10_1_test (void) +{ + x1 = _mm256_cvttps_epu64 (z); + x1 = _mm256_mask_cvttps_epu64 (x1, m, z); + x1 = _mm256_maskz_cvttps_epu64 (m, z); + x2 = _mm_cvttps_epu64 (z); + x2 = _mm_mask_cvttps_epu64 (x2, m, z); + x2 = _mm_maskz_cvttps_epu64 (m, z); +} diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vpmullq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vpmullq-1.c new file mode 100644 index 00000000000..a26fc70c1dc --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx10_1-vpmullq-1.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx10.1 -O2" } */ +/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m256i _x1, _y1, _z1; +volatile __m128i _x2, _y2, _z2; + +void extern +avx10_1_test (void) +{ + _x2 = _mm_mullo_epi64 (_y2, _z2); + _x2 = _mm_mask_mullo_epi64 (_x2, 2, _y2, _z2); + _x2 = _mm_maskz_mullo_epi64 (2, _y2, _z2); + _x1 = _mm256_mullo_epi64 (_y1, _z1); + _x1 = _mm256_mask_mullo_epi64 (_x1, 3, _y1, _z1); + _x1 = _mm256_maskz_mullo_epi64 (3, _y1, _z1); +}