From patchwork Wed Sep 13 03:40:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiaolong X-Patchwork-Id: 138620 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp838934vqx; Tue, 12 Sep 2023 21:03:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4N3vhBDxplHlYxNBrjIvZB2JKPoBZrE5onndq9WRXDLMzyCmFOmZ3Zsn8zNIhlmPsRlv5 X-Received: by 2002:a17:907:2c6a:b0:9a1:aea2:d18d with SMTP id ib10-20020a1709072c6a00b009a1aea2d18dmr787315ejc.48.1694577795638; Tue, 12 Sep 2023 21:03:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694577795; cv=none; d=google.com; s=arc-20160816; b=JSmjTL7V2eqFGie0doYoeaDuCuEWeYH0P/qKEnKaCJgW2PPSeS93YZUy2HGg0DabMK OYK1KZ64bFgh9DOaGTN96+hnqbyRTDdPg5NLfE3IGin1iuteDv4noy7O5MXwB2emfSnD XRXdiH7rHEbAIcZpFvP+5e4CzRvnTX2rXmBLZ59pEB+VYw9k1u8+C6qt5EXSgFGeYkOs foyCru5WGyJGk3x++n0lkLBEiXYDgiBlm62giGi8W3IUA6+UjPvtqX9rDHyGcIJ65n0J OVVVKQwqOMufS/5tABWvZJzEtrb2Yoo5jQOsla8IT33/2IgD9VS6VathELiRBI0uHG6n Wu4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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 :from:dmarc-filter:delivered-to; bh=xemtF0hv+PdnZwDyLknYQgG15ogXdtJaGXzWksCSM5w=; fh=3pFUYcpS/27XRzOf17GfR86AuNQu+P1CET04YURgCLs=; b=sZPsExiFiEL/F5xQubV52e87kJ3eDyb9sjiO9myA6hAORM0Tak5CJKgawGZbBHufup wK7Xu2IKBuNGitmWClXyRbrnaJhiLHNaLWpdCsE0jGiBlLtknZ7pNCwx9qiXG1Opjk8K 5My/mtiQV/ZN5tm9O4f5bcxWkh7w3reWieTIu+NkU4CD5c49PJvqxeikVdtkOoYVwNw5 NR4+VxArb2rURlp0sy+uAPPyBfYIZBaT1PUZzlG+kUm6FwpUG9eAjq4eM/8D4Y3M+hBM MwbEP06csC6gBaUu0hZK8z++m4lDQLoblA5q1xfBz4oT8eFXzUmyy/LSpzuRUzRkGuYV HGxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id p6-20020a17090635c600b009a2154511f0si9375273ejb.197.2023.09.12.21.03.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 21:03:15 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 74F383831D6C for ; Wed, 13 Sep 2023 03:42:51 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id E38243831364 for ; Wed, 13 Sep 2023 03:40:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E38243831364 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [10.10.130.252]) by gateway (Coremail) with SMTP id _____8AxV_ExLwFlbjEmAA--.9351S3; Wed, 13 Sep 2023 11:40:33 +0800 (CST) Received: from slurm-master.loongson.cn (unknown [10.10.130.252]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxfNwtLwFlEhECAA--.3650S5; Wed, 13 Sep 2023 11:40:32 +0800 (CST) From: Xiaolong Chen To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn, chenglulu@loongson.cn, Xiaolong Chen Subject: [PATCH v4 11/22] LoongArch: Add tests for ASX vector xvbitclr/xvbitclri/xvbitrev/xvbitrevi/ xvbitsel/xvbitseli/xvbitset/xvbitseti/xvclo/xvclz/xvpcnt instructions. Date: Wed, 13 Sep 2023 11:40:18 +0800 Message-Id: <20230913034026.7751-2-chenxiaolong@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230913034026.7751-1-chenxiaolong@loongson.cn> References: <20230913034026.7751-1-chenxiaolong@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8CxfNwtLwFlEhECAA--.3650S5 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQANBWUBHCIBPgAAss X-Coremail-Antispam: 1Uk129KBj9kXoW8Jr1fKF48ZrWkAw1rAF4kKF1xp5X_XF1DXF 4xpr17Jr1fG3yI9ayUKryDJFyaqrWUAr4qyasrJF47K3sru3WkKFn0qF13A3yDAw4DJFWj vF13tFW5Jr10qr45GwcCm3ZEXasCq-sJn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29K BjDU0xBIdaVrnRJUUU92b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26c xKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vE j48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxV AFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF 7I0E14v26r4UJVWxJr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4 CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_ZF0_GryDMcIj 6I8E87Iv67AKxVW8Jr0_Cr1UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrw ACjcxG6xCI17CEII8vrVW3JVW8Jr1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_ Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1V AY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_tr0E3s1lIxAI cVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMI IF0xvEx4A2jsIE14v26r4UJVWxJr1lIxAIcVC2z280aVCY1x0267AKxVW8Jr0_Cr1UYxBI daVFxhVjvjDU0xZFpf9x07b0c_-UUUUU= X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776893606781566051 X-GMAIL-MSGID: 1776893606781566051 gcc/testsuite/ChangeLog: * gcc.target/loongarch/vector/lasx/lasx-xvbitclr.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvbitclri.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvbitrev.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvbitrevi.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvbitsel.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvbitseli.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvbitset.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvbitseti.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvclo.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvclz.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvpcnt.c: New test. --- .../loongarch/vector/lasx/lasx-xvbitclr.c | 635 +++++++++++++++++ .../loongarch/vector/lasx/lasx-xvbitclri.c | 515 ++++++++++++++ .../loongarch/vector/lasx/lasx-xvbitrev.c | 650 ++++++++++++++++++ .../loongarch/vector/lasx/lasx-xvbitrevi.c | 317 +++++++++ .../loongarch/vector/lasx/lasx-xvbitsel.c | 134 ++++ .../loongarch/vector/lasx/lasx-xvbitseli.c | 185 +++++ .../loongarch/vector/lasx/lasx-xvbitset.c | 620 +++++++++++++++++ .../loongarch/vector/lasx/lasx-xvbitseti.c | 405 +++++++++++ .../loongarch/vector/lasx/lasx-xvclo.c | 449 ++++++++++++ .../loongarch/vector/lasx/lasx-xvclz.c | 504 ++++++++++++++ .../loongarch/vector/lasx/lasx-xvpcnt.c | 526 ++++++++++++++ 11 files changed, 4940 insertions(+) create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitclr.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitclri.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitrev.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitrevi.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitsel.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitseli.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitset.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitseti.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvclo.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvclz.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpcnt.c diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitclr.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitclr.c new file mode 100644 index 00000000000..def7b588eec --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitclr.c @@ -0,0 +1,635 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x000000040000fff8; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffff1f; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffffffffeff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffff1f; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffffffffeff; + *((unsigned long *)&__m256i_op1[3]) = 0x00000105fffffefb; + *((unsigned long *)&__m256i_op1[2]) = 0xffffff02000000fe; + *((unsigned long *)&__m256i_op1[1]) = 0x00000105fffffefb; + *((unsigned long *)&__m256i_op1[0]) = 0xffffff02000000fe; + *((unsigned long *)&__m256i_result[3]) = 0xf7ffffffffffff1f; + *((unsigned long *)&__m256i_result[2]) = 0xbffffffffffffeff; + *((unsigned long *)&__m256i_result[1]) = 0xf7ffffffffffff1f; + *((unsigned long *)&__m256i_result[0]) = 0xbffffffffffffeff; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffffffffffefd; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000101; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xfffffffffffffefd; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000101; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x7fff7fff7fffdefd; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000101; + *((unsigned long *)&__m256i_result[1]) = 0x7fff7fff7fff7fff; + *((unsigned long *)&__m256i_result[0]) = 0x7fff7fff7fff7fff; + __m256i_out = __lasx_xvbitclr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000f0000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000f0000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x1fe01e0000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x1fe01e0000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00000000f0000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x00000000f0000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0006000000040000; + *((unsigned long *)&__m256i_op0[2]) = 0x0002555500000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0006000000040000; + *((unsigned long *)&__m256i_op0[0]) = 0x0002555500000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0006000000040000; + *((unsigned long *)&__m256i_result[2]) = 0x0002555400000000; + *((unsigned long *)&__m256i_result[1]) = 0x0006000000040000; + *((unsigned long *)&__m256i_result[0]) = 0x0002555400000000; + __m256i_out = __lasx_xvbitclr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[0]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000002a542a; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000002a542a; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000002a542a; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000002a542a; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xfff3fff3fff3fff3; + *((unsigned long *)&__m256i_op1[2]) = 0xfff3fff3fff3fff3; + *((unsigned long *)&__m256i_op1[1]) = 0xfff3fff3fff3fff3; + *((unsigned long *)&__m256i_op1[0]) = 0xfff3fff3fff3fff3; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0002000200020002; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0002000200020002; + __m256i_out = __lasx_xvbitclr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff00ffff00ff00; + *((unsigned long *)&__m256i_op0[2]) = 0x00000fff00004542; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff00ffff00ff00; + *((unsigned long *)&__m256i_op0[0]) = 0x00000fff00004542; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00ff00ffff00ff00; + *((unsigned long *)&__m256i_result[2]) = 0x00000fff00004542; + *((unsigned long *)&__m256i_result[1]) = 0x00ff00ffff00ff00; + *((unsigned long *)&__m256i_result[0]) = 0x00000fff00004542; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff00fe00feff02ff; + *((unsigned long *)&__m256i_op0[2]) = 0xff00fe00feff02ff; + *((unsigned long *)&__m256i_op0[1]) = 0xff00fe00feff02ff; + *((unsigned long *)&__m256i_op0[0]) = 0xff00fe00feff02ff; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000003f0000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000030007; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000003f0000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000030007; + *((unsigned long *)&__m256i_result[3]) = 0xff00fe00feff02fe; + *((unsigned long *)&__m256i_result[2]) = 0xff00fe00feff027f; + *((unsigned long *)&__m256i_result[1]) = 0xff00fe00feff02fe; + *((unsigned long *)&__m256i_result[0]) = 0xff00fe00feff027f; + __m256i_out = __lasx_xvbitclr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000010000000100; + *((unsigned long *)&__m256i_op0[2]) = 0x0000010000000100; + *((unsigned long *)&__m256i_op0[1]) = 0x0000010000000100; + *((unsigned long *)&__m256i_op0[0]) = 0x0000010000000100; + *((unsigned long *)&__m256i_op1[3]) = 0x000023a20000a121; + *((unsigned long *)&__m256i_op1[2]) = 0x0000179e0000951d; + *((unsigned long *)&__m256i_op1[1]) = 0x000023a20000a121; + *((unsigned long *)&__m256i_op1[0]) = 0x0000179e0000951d; + *((unsigned long *)&__m256i_result[3]) = 0x0000010000000100; + *((unsigned long *)&__m256i_result[2]) = 0x0000010000000100; + *((unsigned long *)&__m256i_result[1]) = 0x0000010000000100; + *((unsigned long *)&__m256i_result[0]) = 0x0000010000000100; + __m256i_out = __lasx_xvbitclr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000236200005111; + *((unsigned long *)&__m256i_op0[2]) = 0x0000175e0000490d; + *((unsigned long *)&__m256i_op0[1]) = 0x0000236200005111; + *((unsigned long *)&__m256i_op0[0]) = 0x0000175e0000490d; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000ffeeffaf; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000011; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000ffeeffaf; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000011; + *((unsigned long *)&__m256i_result[3]) = 0x0000226200005111; + *((unsigned long *)&__m256i_result[2]) = 0x0000165e0000480d; + *((unsigned long *)&__m256i_result[1]) = 0x0000226200005111; + *((unsigned long *)&__m256i_result[0]) = 0x0000165e0000480d; + __m256i_out = __lasx_xvbitclr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000007fef; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000007fef; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000007fef; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000007fef; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000007fee; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000007fee; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000007fee; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000007fee; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000008000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000008000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000008000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000008000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffffffffffff7; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffffffffffff7; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffff00; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffff00; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x00000000fefe7f00; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x00000000fefe7f00; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x1f001f00000007ef; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00001fff200007ef; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x7fff7fff00000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x7fff7fff00000000; + __m256i_out = __lasx_xvbitclr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000f90; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000f90; + *((unsigned long *)&__m256i_result[3]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[2]) = 0xfffefffe00000000; + *((unsigned long *)&__m256i_result[1]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[0]) = 0xfffefffe00000000; + __m256i_out = __lasx_xvbitclr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff8000ffa3; + *((unsigned long *)&__m256i_op0[2]) = 0x000000007fe70000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff8000ffa3; + *((unsigned long *)&__m256i_op0[0]) = 0x000000007fe70000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ffff8000ffa3; + *((unsigned long *)&__m256i_op1[2]) = 0x000000007fe70000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffff8000ffa3; + *((unsigned long *)&__m256i_op1[0]) = 0x000000007fe70000; + *((unsigned long *)&__m256i_result[3]) = 0x00007f7f80007fa3; + *((unsigned long *)&__m256i_result[2]) = 0x000000007f670000; + *((unsigned long *)&__m256i_result[1]) = 0x00007f7f80007fa3; + *((unsigned long *)&__m256i_result[0]) = 0x000000007f670000; + __m256i_out = __lasx_xvbitclr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xfffeffff10000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xfffeffff10000000; + *((unsigned long *)&__m256i_result[3]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_result[2]) = 0x7ffffffffffffffe; + *((unsigned long *)&__m256i_result[1]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_result[0]) = 0x7ffffffffffffffe; + __m256i_out = __lasx_xvbitclr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x3f8000003f800000; + *((unsigned long *)&__m256i_op0[2]) = 0x3f8000003f800000; + *((unsigned long *)&__m256i_op0[1]) = 0x3f8000003f800000; + *((unsigned long *)&__m256i_op0[0]) = 0x3f8000003f800000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x3e8000003e800000; + *((unsigned long *)&__m256i_result[2]) = 0x3e8000003e800000; + *((unsigned long *)&__m256i_result[1]) = 0x3e8000003e800000; + *((unsigned long *)&__m256i_result[0]) = 0x3e8000003e800000; + __m256i_out = __lasx_xvbitclr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00001ff8d8d8c000; + *((unsigned long *)&__m256i_op0[2]) = 0x00001ff8d8d90000; + *((unsigned long *)&__m256i_op0[1]) = 0x00001ff8d8d8c000; + *((unsigned long *)&__m256i_op0[0]) = 0x00001ff8d8d90000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00001ef8d8d8c000; + *((unsigned long *)&__m256i_result[2]) = 0x00001ef8d8d80000; + *((unsigned long *)&__m256i_result[1]) = 0x00001ef8d8d8c000; + *((unsigned long *)&__m256i_result[0]) = 0x00001ef8d8d80000; + __m256i_out = __lasx_xvbitclr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000000d; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000000d; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000fffe0000000c; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000010000; + *((unsigned long *)&__m256i_result[1]) = 0x0000fffe0000000c; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000010000; + __m256i_out = __lasx_xvbitclr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000003; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000003; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000003; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000003; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000003; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000003; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000003; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000003; + __m256i_out = __lasx_xvbitclr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffe00000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffe00000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x000000ff800000ff; + *((unsigned long *)&__m256i_op1[2]) = 0x000000ff800000ff; + *((unsigned long *)&__m256i_op1[1]) = 0x000000ff800000ff; + *((unsigned long *)&__m256i_op1[0]) = 0x000000ff800000ff; + *((unsigned long *)&__m256i_result[3]) = 0xfefee00000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xfefee00000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000fff000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000fff000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000fff000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000fff000000000; + __m256i_out = __lasx_xvbitclr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000ffff88ff88; + *((unsigned long *)&__m256i_op0[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000ffff88ff88; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000ffff88ff88; + *((unsigned long *)&__m256i_result[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000ffff88ff88; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff00ff00ff00ff00; + *((unsigned long *)&__m256i_op0[2]) = 0xff00ff00ff00ff00; + *((unsigned long *)&__m256i_op0[1]) = 0xff00ff00ff00ff00; + *((unsigned long *)&__m256i_op0[0]) = 0xff00ff00ff00ff00; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xff00ff00ff00ff00; + *((unsigned long *)&__m256i_result[2]) = 0xff00ff007f007f00; + *((unsigned long *)&__m256i_result[1]) = 0xff00ff00ff00ff00; + *((unsigned long *)&__m256i_result[0]) = 0xff00ff007f007f00; + __m256i_out = __lasx_xvbitclr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x1c1c1c1c1c1c1c1c; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffff00; + *((unsigned long *)&__m256i_op0[1]) = 0x1c1c1c1c1c1c1c1c; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffff00; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[3]) = 0x1c1c1c1c1c1c1c1c; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffeffffff00; + *((unsigned long *)&__m256i_result[1]) = 0x1c1c1c1c1c1c1c1c; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffeffffff00; + __m256i_out = __lasx_xvbitclr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitclri.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitclri.c new file mode 100644 index 00000000000..713eb19d56d --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitclri.c @@ -0,0 +1,515 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffe06df8d7; + *((unsigned long *)&__m256i_op0[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffbe8b470f; + *((unsigned long *)&__m256i_result[3]) = 0x7ffffffffffff7ff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffe06df0d7; + *((unsigned long *)&__m256i_result[1]) = 0x7ffffffffffff7ff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffbe8b470f; + __m256i_out = __lasx_xvbitclri_d (__m256i_op0, 0xb); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_b (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0010ffc80010ff52; + *((unsigned long *)&__m256i_op0[2]) = 0xfff1ffca0011ffcb; + *((unsigned long *)&__m256i_op0[1]) = 0x0010ffc80010ff52; + *((unsigned long *)&__m256i_op0[0]) = 0xfff1ffca0011ffcb; + *((unsigned long *)&__m256i_result[3]) = 0x0010bfc80010bf52; + *((unsigned long *)&__m256i_result[2]) = 0xfff1bfca0011bfcb; + *((unsigned long *)&__m256i_result[1]) = 0x0010bfc80010bf52; + *((unsigned long *)&__m256i_result[0]) = 0xfff1bfca0011bfcb; + __m256i_out = __lasx_xvbitclri_w (__m256i_op0, 0xe); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_w (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_w (__m256i_op0, 0x1f); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_d (__m256i_op0, 0xf); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000005536aaaaac; + *((unsigned long *)&__m256i_op0[2]) = 0x55555555aaaaaaac; + *((unsigned long *)&__m256i_op0[1]) = 0x0000005536aaaaac; + *((unsigned long *)&__m256i_op0[0]) = 0x55555555aaaaaaac; + *((unsigned long *)&__m256i_result[3]) = 0x0000005136aaaaa8; + *((unsigned long *)&__m256i_result[2]) = 0x55515551aaaaaaa8; + *((unsigned long *)&__m256i_result[1]) = 0x0000005136aaaaa8; + *((unsigned long *)&__m256i_result[0]) = 0x55515551aaaaaaa8; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0x2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fff000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7fff000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7fff7fff00000000; + *((unsigned long *)&__m256i_op0[0]) = 0x7fff7fff00000000; + *((unsigned long *)&__m256i_result[3]) = 0x7fdf000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x7fdf000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x7fdf7fff00000000; + *((unsigned long *)&__m256i_result[0]) = 0x7fdf7fff00000000; + __m256i_out = __lasx_xvbitclri_d (__m256i_op0, 0x35); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000fd0000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000fd0000; + __m256i_out = __lasx_xvbitclri_w (__m256i_op0, 0x11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7ffe7ffe7ffe7ffe; + *((unsigned long *)&__m256i_op0[2]) = 0x000000007ffe7ffe; + *((unsigned long *)&__m256i_op0[1]) = 0x7ffe7ffe7ffe8000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000807e7ffe; + *((unsigned long *)&__m256i_result[3]) = 0x7f7e7f7e7f7e7f7e; + *((unsigned long *)&__m256i_result[2]) = 0x000000007f7e7f7e; + *((unsigned long *)&__m256i_result[1]) = 0x7f7e7f7e7f7e0000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000007e7f7e; + __m256i_out = __lasx_xvbitclri_b (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0x5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_d (__m256i_op0, 0x24); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0xf); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xdf01010153a10101; + *((unsigned long *)&__m256i_op0[2]) = 0x5b7f01ff5b7f10ff; + *((unsigned long *)&__m256i_op0[1]) = 0xdf01010153a10101; + *((unsigned long *)&__m256i_op0[0]) = 0x5b7f01ff5b7f10ff; + *((unsigned long *)&__m256i_result[3]) = 0xcf01010143a10101; + *((unsigned long *)&__m256i_result[2]) = 0x4b6f01ef4b6f00ef; + *((unsigned long *)&__m256i_result[1]) = 0xcf01010143a10101; + *((unsigned long *)&__m256i_result[0]) = 0x4b6f01ef4b6f00ef; + __m256i_out = __lasx_xvbitclri_b (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000080000000; + *((unsigned long *)&__m256i_result[3]) = 0xdfffffffdfffffff; + *((unsigned long *)&__m256i_result[2]) = 0x8000000080000000; + *((unsigned long *)&__m256i_result[1]) = 0xdfffffffdfffffff; + *((unsigned long *)&__m256i_result[0]) = 0x8000000080000000; + __m256i_out = __lasx_xvbitclri_w (__m256i_op0, 0x1d); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_b (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_w (__m256i_op0, 0x1e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffff02ff; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffff0100; + *((unsigned long *)&__m256i_op0[0]) = 0xff00fe00feff02ff; + *((unsigned long *)&__m256i_result[3]) = 0x00000000ff7fff7f; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ff7f027f; + *((unsigned long *)&__m256i_result[1]) = 0x00000000ff7f0100; + *((unsigned long *)&__m256i_result[0]) = 0xff00fe00fe7f027f; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8011ffee804c004c; + *((unsigned long *)&__m256i_op0[2]) = 0x00faff0500c3ff3c; + *((unsigned long *)&__m256i_op0[1]) = 0x80f900f980780078; + *((unsigned long *)&__m256i_op0[0]) = 0x0057ffa800ceff31; + *((unsigned long *)&__m256i_result[3]) = 0x8011ffae800c000c; + *((unsigned long *)&__m256i_result[2]) = 0x00baff050083ff3c; + *((unsigned long *)&__m256i_result[1]) = 0x80b900b980380038; + *((unsigned long *)&__m256i_result[0]) = 0x0017ffa8008eff31; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0x6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_d (__m256i_op0, 0x3b); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000027262524; + *((unsigned long *)&__m256i_op0[2]) = 0x232221201f1e1d1c; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000027262524; + *((unsigned long *)&__m256i_op0[0]) = 0x232221201f1e1d1c; + *((unsigned long *)&__m256i_result[3]) = 0x0000000027262524; + *((unsigned long *)&__m256i_result[2]) = 0x23222120171e151c; + *((unsigned long *)&__m256i_result[1]) = 0x0000000027262524; + *((unsigned long *)&__m256i_result[0]) = 0x23222120171e151c; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0xb); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_d (__m256i_op0, 0xb); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvbitclri_b (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00ff00fe00ff00fe; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00ff00fe00ff00fe; + *((unsigned long *)&__m256i_result[3]) = 0x0000fefe0000fefe; + *((unsigned long *)&__m256i_result[2]) = 0x00fe00fe00fe00fe; + *((unsigned long *)&__m256i_result[1]) = 0x0000fefe0000fefe; + *((unsigned long *)&__m256i_result[0]) = 0x00fe00fe00fe00fe; + __m256i_out = __lasx_xvbitclri_b (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000009; + __m256i_out = __lasx_xvbitclri_d (__m256i_op0, 0x26); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_b (__m256i_op0, 0x2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x01ff0020ff1f001f; + *((unsigned long *)&__m256i_op0[2]) = 0xffe1ffe0ffe1ffe0; + *((unsigned long *)&__m256i_op0[1]) = 0x01ff0020ff1f001f; + *((unsigned long *)&__m256i_op0[0]) = 0xffe1ffe0ffe1ffe0; + *((unsigned long *)&__m256i_result[3]) = 0x01ff0020ff1f001f; + *((unsigned long *)&__m256i_result[2]) = 0x7fe1ffe0ffe1ffe0; + *((unsigned long *)&__m256i_result[1]) = 0x01ff0020ff1f001f; + *((unsigned long *)&__m256i_result[0]) = 0x7fe1ffe0ffe1ffe0; + __m256i_out = __lasx_xvbitclri_d (__m256i_op0, 0x3f); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0xc); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_d (__m256i_op0, 0x16); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xfffffffbfffffffb; + *((unsigned long *)&__m256i_result[2]) = 0x00000000fffffffb; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffbfffffffb; + *((unsigned long *)&__m256i_result[0]) = 0x00000000fffffffb; + __m256i_out = __lasx_xvbitclri_w (__m256i_op0, 0x2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_w (__m256i_op0, 0x1d); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000800200027; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000800200028; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000800200027; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000800200028; + *((unsigned long *)&__m256i_result[3]) = 0x0000000800200027; + *((unsigned long *)&__m256i_result[2]) = 0x0000000800200028; + *((unsigned long *)&__m256i_result[1]) = 0x0000000800200027; + *((unsigned long *)&__m256i_result[0]) = 0x0000000800200028; + __m256i_out = __lasx_xvbitclri_w (__m256i_op0, 0x1e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_b (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffee00ba; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffee00ba; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xefefefefefee00aa; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xefefefefefee00aa; + __m256i_out = __lasx_xvbitclri_b (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000100010; + *((unsigned long *)&__m256i_op0[2]) = 0x0010001000100010; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000100010; + *((unsigned long *)&__m256i_op0[0]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000100010; + *((unsigned long *)&__m256i_result[2]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000100010; + *((unsigned long *)&__m256i_result[0]) = 0x0010001000100010; + __m256i_out = __lasx_xvbitclri_w (__m256i_op0, 0x17); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ff88ff88; + *((unsigned long *)&__m256i_op0[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ff88ff88; + *((unsigned long *)&__m256i_result[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000f788f788; + *((unsigned long *)&__m256i_result[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000f788f788; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0xb); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_w (__m256i_op0, 0x5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_b (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_b (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitclri_w (__m256i_op0, 0x1d); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[2]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[1]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[0]) = 0xfffefffefffefffe; + __m256i_out = __lasx_xvbitclri_h (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitrev.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitrev.c new file mode 100644 index 00000000000..2b0e7f8d1de --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitrev.c @@ -0,0 +1,650 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0501030102141923; + *((unsigned long *)&__m256i_op0[2]) = 0xffd5020738b43ddb; + *((unsigned long *)&__m256i_op0[1]) = 0x010200023b8e4174; + *((unsigned long *)&__m256i_op0[0]) = 0xfff4ff4e11410b40; + *((unsigned long *)&__m256i_op1[3]) = 0x01fa022a01a401e5; + *((unsigned long *)&__m256i_op1[2]) = 0x030d03aa0079029b; + *((unsigned long *)&__m256i_op1[1]) = 0x024c01f901950261; + *((unsigned long *)&__m256i_op1[0]) = 0x008102c2008a029f; + *((unsigned long *)&__m256i_result[3]) = 0x0101070102041903; + *((unsigned long *)&__m256i_result[2]) = 0xdfd506073ab435db; + *((unsigned long *)&__m256i_result[1]) = 0x110202023bae4176; + *((unsigned long *)&__m256i_result[0]) = 0xfff6ff4a15418b40; + __m256i_out = __lasx_xvbitrev_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffe0edf8d7; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffbe8bc70f; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffe0edf8d7; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffbe8bc70f; + *((unsigned long *)&__m256i_result[3]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffe06df8d7; + *((unsigned long *)&__m256i_result[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffbe8b470f; + __m256i_out = __lasx_xvbitrev_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000ffe0; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000001e18; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000ffe0; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000001e18; + *((unsigned long *)&__m256i_op1[3]) = 0x000000000000ffe0; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000001e18; + *((unsigned long *)&__m256i_op1[1]) = 0x000000000000ffe0; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000001e18; + *((unsigned long *)&__m256i_result[3]) = 0x000000010000ffe1; + *((unsigned long *)&__m256i_result[2]) = 0x0000000101001e18; + *((unsigned long *)&__m256i_result[1]) = 0x000000010000ffe1; + *((unsigned long *)&__m256i_result[0]) = 0x0000000101001e18; + __m256i_out = __lasx_xvbitrev_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x8000000000000000; + __m256i_out = __lasx_xvbitrev_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_result[2]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_result[1]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_result[0]) = 0xfefefefefefefefe; + __m256i_out = __lasx_xvbitrev_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[2]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[1]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[0]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x1d1a1b181d1a1b18; + *((unsigned long *)&__m256i_result[2]) = 0x9c9b9a999c9b9a99; + *((unsigned long *)&__m256i_result[1]) = 0x1d1a1b181d1a1b18; + *((unsigned long *)&__m256i_result[0]) = 0x9c9b9a999c9b9a99; + __m256i_out = __lasx_xvbitrev_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000001010101; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000001010101; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010100000000; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x0101010100000000; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvbitrev_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000033e87ef1; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000002e2100; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x7fff7fff7fff7fff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x7fff7fff7fff7fff; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x80008000b3e8fef1; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x80008000802ea100; + __m256i_out = __lasx_xvbitrev_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x1c80780000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000004000; + *((unsigned long *)&__m256i_op1[1]) = 0x1c80780000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000004000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvbitrev_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0200000200000000; + *((unsigned long *)&__m256i_op1[2]) = 0x2c27000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0200000200000000; + *((unsigned long *)&__m256i_op1[0]) = 0x2c27000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000400000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000400000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvbitrev_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvbitrev_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvbitrev_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x8000800080008000; + *((unsigned long *)&__m256i_result[2]) = 0x8000800080008000; + *((unsigned long *)&__m256i_result[1]) = 0x8000800080008000; + *((unsigned long *)&__m256i_result[0]) = 0x8000800080008000; + __m256i_out = __lasx_xvbitrev_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffff00ff00ffff00; + *((unsigned long *)&__m256i_op1[2]) = 0xff000000ff00ff00; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffff00ffff; + *((unsigned long *)&__m256i_op1[0]) = 0xff00000000ff00ff; + *((unsigned long *)&__m256i_result[3]) = 0x8000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x8000000080000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000180000000; + __m256i_out = __lasx_xvbitrev_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xfff8fff8fff8fff8; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xfff8fff8fff8fff8; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x8001800180018001; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x8001800180018001; + __m256i_out = __lasx_xvbitrev_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op0[2]) = 0x0000ffff00010003; + *((unsigned long *)&__m256i_op0[1]) = 0x0080000200000002; + *((unsigned long *)&__m256i_op0[0]) = 0x0000ffff00010003; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000200000003; + *((unsigned long *)&__m256i_result[2]) = 0x0000ffff00010002; + *((unsigned long *)&__m256i_result[1]) = 0x0080000200000003; + *((unsigned long *)&__m256i_result[0]) = 0x0000ffff00010002; + __m256i_out = __lasx_xvbitrev_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x80000000ffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x80000000ffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvbitrev_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvbitrev_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x8000000000000000; + __m256i_out = __lasx_xvbitrev_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op1[2]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op1[1]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op1[0]) = 0x8000000080000000; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvbitrev_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvbitrev_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_op0[2]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_op0[1]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_op0[0]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_op1[3]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xf7f7f7f6f7f7f7f6; + *((unsigned long *)&__m256i_result[2]) = 0xf7f7f7f6f7f7f7f6; + *((unsigned long *)&__m256i_result[1]) = 0xf7f7f7f6f7f7f7f6; + *((unsigned long *)&__m256i_result[0]) = 0xf7f7f7f6f7f7f7f6; + __m256i_out = __lasx_xvbitrev_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvbitrev_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x7eeefefefefefefe; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x7eeefefefefefefe; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvbitrev_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000000010000fffe; + *((unsigned long *)&__m256i_result[2]) = 0x000000010000fffe; + *((unsigned long *)&__m256i_result[1]) = 0x000000010000fffe; + *((unsigned long *)&__m256i_result[0]) = 0x000000010000fffe; + __m256i_out = __lasx_xvbitrev_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvbitrev_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000200000002; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000004; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000004; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000004; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000004; + __m256i_out = __lasx_xvbitrev_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00003fe000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00003fe000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvbitrev_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000008000b; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000000b; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000008000b; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000000b; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000000000008000a; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000000a; + *((unsigned long *)&__m256i_result[1]) = 0x000000000008000a; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000000a; + __m256i_out = __lasx_xvbitrev_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x8000800080008000; + *((unsigned long *)&__m256i_result[2]) = 0x000100010001fffe; + *((unsigned long *)&__m256i_result[1]) = 0x8000800080008000; + *((unsigned long *)&__m256i_result[0]) = 0x000100010001fffe; + __m256i_out = __lasx_xvbitrev_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvbitrev_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00fe00fe00fe00fe; + *((unsigned long *)&__m256i_op0[2]) = 0x00fe00fe00fe00fe; + *((unsigned long *)&__m256i_op0[1]) = 0x00fe00fe00fe00fe; + *((unsigned long *)&__m256i_op0[0]) = 0x00fe00fe00fe00fe; + *((unsigned long *)&__m256i_op1[3]) = 0x00fe00fe00fe00fe; + *((unsigned long *)&__m256i_op1[2]) = 0x00fe00fe00fe00fe; + *((unsigned long *)&__m256i_op1[1]) = 0x00fe00fe00fe00fe; + *((unsigned long *)&__m256i_op1[0]) = 0x00fe00fe00fe00fe; + *((unsigned long *)&__m256i_result[3]) = 0x40fe00fe00fe00fe; + *((unsigned long *)&__m256i_result[2]) = 0x40fe00fe00fe00fe; + *((unsigned long *)&__m256i_result[1]) = 0x40fe00fe00fe00fe; + *((unsigned long *)&__m256i_result[0]) = 0x40fe00fe00fe00fe; + __m256i_out = __lasx_xvbitrev_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fff80007fff0000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000008000; + *((unsigned long *)&__m256i_op0[1]) = 0x7fff80007fff0000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000008000; + *((unsigned long *)&__m256i_op1[3]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_op1[1]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_result[3]) = 0xffffc0007ffe0002; + *((unsigned long *)&__m256i_result[2]) = 0x8000400000018002; + *((unsigned long *)&__m256i_result[1]) = 0xffffc0007ffe0002; + *((unsigned long *)&__m256i_result[0]) = 0x8000400000018002; + __m256i_out = __lasx_xvbitrev_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_result[2]) = 0xfefefefe01010101; + *((unsigned long *)&__m256i_result[1]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_result[0]) = 0xfefefefe01010101; + __m256i_out = __lasx_xvbitrev_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000006d; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000400008; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000006d; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000400008; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000080040; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000010006d; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000080040; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000010006d; + *((unsigned long *)&__m256i_result[3]) = 0x010101010101016c; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101410128; + *((unsigned long *)&__m256i_result[1]) = 0x010101010101016c; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101410128; + __m256i_out = __lasx_xvbitrev_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000ff000000ff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000ff000000ff; + *((unsigned long *)&__m256i_op1[3]) = 0x7fffffff80000000; + *((unsigned long *)&__m256i_op1[2]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x7fffffff80000000; + *((unsigned long *)&__m256i_op1[0]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x800000ff000000ff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x800000ff000000ff; + __m256i_out = __lasx_xvbitrev_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffb6811fffff80; + *((unsigned long *)&__m256i_op0[2]) = 0xffff97c120000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffb6811fffff80; + *((unsigned long *)&__m256i_op0[0]) = 0xffff97c120000000; + *((unsigned long *)&__m256i_op1[3]) = 0x00000001fffffff9; + *((unsigned long *)&__m256i_op1[2]) = 0x4980008068400000; + *((unsigned long *)&__m256i_op1[1]) = 0x00000001fffffff9; + *((unsigned long *)&__m256i_op1[0]) = 0x4980008068400000; + *((unsigned long *)&__m256i_result[3]) = 0xfffeb6839ffffd80; + *((unsigned long *)&__m256i_result[2]) = 0xfffe97c020010001; + *((unsigned long *)&__m256i_result[1]) = 0xfffeb6839ffffd80; + *((unsigned long *)&__m256i_result[0]) = 0xfffe97c020010001; + __m256i_out = __lasx_xvbitrev_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000027; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000027; + *((unsigned long *)&__m256i_result[3]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_result[2]) = 0xfefefefefefefe7f; + *((unsigned long *)&__m256i_result[1]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_result[0]) = 0xfefefefefefefe7f; + __m256i_out = __lasx_xvbitrev_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000002; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000080; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000002; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000080; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010003; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010081; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010003; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100018080; + __m256i_out = __lasx_xvbitrev_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvbitrev_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x000000000000000c; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x000000000000000c; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010110; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010110; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvbitrev_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvbitrev_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitrevi.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitrevi.c new file mode 100644 index 00000000000..2b8327d91b0 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitrevi.c @@ -0,0 +1,317 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ff00ff00; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ff00ff00; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x01010101fe01fe01; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x01010101fe01fe01; + __m256i_out = __lasx_xvbitrevi_b (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x2000200020002000; + *((unsigned long *)&__m256i_result[2]) = 0x2000200020002000; + *((unsigned long *)&__m256i_result[1]) = 0x2000200020002000; + *((unsigned long *)&__m256i_result[0]) = 0x2000200020002000; + __m256i_out = __lasx_xvbitrevi_h (__m256i_op0, 0xd); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvbitrevi_b (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7fff7fff7fff7fff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x7fff7fff7fff7fff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[2]) = 0x7fff7ff77fff7ff7; + *((unsigned long *)&__m256i_result[1]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[0]) = 0x7fff7ff77fff7ff7; + __m256i_out = __lasx_xvbitrevi_w (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000020001; + *((unsigned long *)&__m256i_result[3]) = 0x1010101010101010; + *((unsigned long *)&__m256i_result[2]) = 0x1010101010101010; + *((unsigned long *)&__m256i_result[1]) = 0x1010101010101010; + *((unsigned long *)&__m256i_result[0]) = 0x1010101010121011; + __m256i_out = __lasx_xvbitrevi_b (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvbitrevi_d (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000004000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000004000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000004000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000004000000040; + __m256i_out = __lasx_xvbitrevi_w (__m256i_op0, 0x6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x2020202020202020; + *((unsigned long *)&__m256i_result[2]) = 0x2020202020202020; + *((unsigned long *)&__m256i_result[1]) = 0x2020202020202020; + *((unsigned long *)&__m256i_result[0]) = 0x2020202020202020; + __m256i_out = __lasx_xvbitrevi_b (__m256i_op0, 0x5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000020000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000020000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000020000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000020000000000; + __m256i_out = __lasx_xvbitrevi_d (__m256i_op0, 0x29); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvbitrevi_b (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x4040404040404040; + *((unsigned long *)&__m256i_result[2]) = 0x4040404040404040; + *((unsigned long *)&__m256i_result[1]) = 0x4040404040404040; + *((unsigned long *)&__m256i_result[0]) = 0x4040404040404040; + __m256i_out = __lasx_xvbitrevi_b (__m256i_op0, 0x6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0001c4e8ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0001c4e8ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0080000000800000; + *((unsigned long *)&__m256i_result[2]) = 0x0081c4e8ff7fffff; + *((unsigned long *)&__m256i_result[1]) = 0x0080000000800000; + *((unsigned long *)&__m256i_result[0]) = 0x0081c4e8ff7fffff; + __m256i_out = __lasx_xvbitrevi_w (__m256i_op0, 0x17); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffff81ff7d; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffff81ff7d; + *((unsigned long *)&__m256i_result[3]) = 0x7f7f7f7f7f7f7f7f; + *((unsigned long *)&__m256i_result[2]) = 0x7f7f7f7f7f017ffd; + *((unsigned long *)&__m256i_result[1]) = 0x7f7f7f7f7f7f7f7f; + *((unsigned long *)&__m256i_result[0]) = 0x7f7f7f7f7f017ffd; + __m256i_out = __lasx_xvbitrevi_b (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x4000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x4000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x4000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x4000000000000000; + __m256i_out = __lasx_xvbitrevi_d (__m256i_op0, 0x3e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000002080100; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000002080100; + *((unsigned long *)&__m256i_result[3]) = 0x0000000008000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000a080100; + *((unsigned long *)&__m256i_result[1]) = 0x0000000008000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000a080100; + __m256i_out = __lasx_xvbitrevi_d (__m256i_op0, 0x1b); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0100010001000100; + *((unsigned long *)&__m256i_result[2]) = 0x0100010001000100; + *((unsigned long *)&__m256i_result[1]) = 0x0100010001000100; + *((unsigned long *)&__m256i_result[0]) = 0x0100010001000100; + __m256i_out = __lasx_xvbitrevi_h (__m256i_op0, 0x8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffe0047d00e00480; + *((unsigned long *)&__m256i_op0[2]) = 0x001fc0200060047a; + *((unsigned long *)&__m256i_op0[1]) = 0xffe0047d00e00480; + *((unsigned long *)&__m256i_op0[0]) = 0x001fc0200060047a; + *((unsigned long *)&__m256i_result[3]) = 0xfee1057c01e10581; + *((unsigned long *)&__m256i_result[2]) = 0x011ec1210161057b; + *((unsigned long *)&__m256i_result[1]) = 0xfee1057c01e10581; + *((unsigned long *)&__m256i_result[0]) = 0x011ec1210161057b; + __m256i_out = __lasx_xvbitrevi_b (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xe07de0801f20607a; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xe07de0801f20607a; + *((unsigned long *)&__m256i_result[3]) = 0xfdfdfdfdfdfdfdfd; + *((unsigned long *)&__m256i_result[2]) = 0xe27fe2821d226278; + *((unsigned long *)&__m256i_result[1]) = 0xfdfdfdfdfdfdfdfd; + *((unsigned long *)&__m256i_result[0]) = 0xe27fe2821d226278; + __m256i_out = __lasx_xvbitrevi_b (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000200000002; + *((unsigned long *)&__m256i_result[2]) = 0x0000000200000002; + *((unsigned long *)&__m256i_result[1]) = 0x0000000200000002; + *((unsigned long *)&__m256i_result[0]) = 0x0000000200000002; + __m256i_out = __lasx_xvbitrevi_w (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[2]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[1]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[0]) = 0x0000000800000008; + __m256i_out = __lasx_xvbitrevi_w (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000800200027; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000800200028; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000800200027; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000800200028; + *((unsigned long *)&__m256i_result[3]) = 0x080808000828082f; + *((unsigned long *)&__m256i_result[2]) = 0x0808080008280820; + *((unsigned long *)&__m256i_result[1]) = 0x080808000828082f; + *((unsigned long *)&__m256i_result[0]) = 0x0808080008280820; + __m256i_out = __lasx_xvbitrevi_b (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvbitrevi_h (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000800000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000800000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000800000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000800000000000; + __m256i_out = __lasx_xvbitrevi_d (__m256i_op0, 0x2f); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0200000002000000; + *((unsigned long *)&__m256i_result[2]) = 0x02000000fdffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0200000002000000; + *((unsigned long *)&__m256i_result[0]) = 0x02000000fdffffff; + __m256i_out = __lasx_xvbitrevi_w (__m256i_op0, 0x19); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffed; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffed; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffed; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffed; + *((unsigned long *)&__m256i_result[3]) = 0xfffffffffffeffed; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffffffeffed; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffffffeffed; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffffffeffed; + __m256i_out = __lasx_xvbitrevi_d (__m256i_op0, 0x10); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xc039000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xc039000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xc039000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xc039000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xc03b000200020002; + *((unsigned long *)&__m256i_result[2]) = 0xc03b000200020002; + *((unsigned long *)&__m256i_result[1]) = 0xc03b000200020002; + *((unsigned long *)&__m256i_result[0]) = 0xc03b000200020002; + __m256i_out = __lasx_xvbitrevi_h (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7fff80007fff0000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x7fff80007fff0000; + *((unsigned long *)&__m256i_result[3]) = 0x0000010000000100; + *((unsigned long *)&__m256i_result[2]) = 0x7fff81007fff0100; + *((unsigned long *)&__m256i_result[1]) = 0x0000010000000100; + *((unsigned long *)&__m256i_result[0]) = 0x7fff81007fff0100; + __m256i_out = __lasx_xvbitrevi_w (__m256i_op0, 0x8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitsel.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitsel.c new file mode 100644 index 00000000000..c9847a6152d --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitsel.c @@ -0,0 +1,134 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op2[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op2[2]) = 0xe9e9e9e9e9e9e9e9; + *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op2[0]) = 0xe9e9e9e9e9e9e9e9; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitsel_v (__m256i_op0, __m256i_op1, __m256i_op2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op2[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op2[0]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitsel_v (__m256i_op0, __m256i_op1, __m256i_op2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x001f001f001f001f; + *((unsigned long *)&__m256i_op0[2]) = 0x001f001f02c442af; + *((unsigned long *)&__m256i_op0[1]) = 0x001f001f001f001f; + *((unsigned long *)&__m256i_op0[0]) = 0x001f001f02c442af; + *((unsigned long *)&__m256i_op1[3]) = 0x00fe01f000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x00fe01f000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op2[3]) = 0xfffffffffefefeff; + *((unsigned long *)&__m256i_op2[2]) = 0xffffffffff295329; + *((unsigned long *)&__m256i_op2[1]) = 0xfffffffffefefeff; + *((unsigned long *)&__m256i_op2[0]) = 0xffffffffff295329; + *((unsigned long *)&__m256i_result[3]) = 0x00fe01f000010000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000c40086; + *((unsigned long *)&__m256i_result[1]) = 0x00fe01f000010000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000c40086; + __m256i_out = __lasx_xvbitsel_v (__m256i_op0, __m256i_op1, __m256i_op2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_op1[3]) = 0xbe21000100000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000505300000000; + *((unsigned long *)&__m256i_op1[1]) = 0xbe21000100000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000505300000000; + *((unsigned long *)&__m256i_op2[3]) = 0x41dfffffffc00000; + *((unsigned long *)&__m256i_op2[2]) = 0xc1d75053f0000000; + *((unsigned long *)&__m256i_op2[1]) = 0x41dfffffffc00000; + *((unsigned long *)&__m256i_op2[0]) = 0xc1d75053f0000000; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100000000; + *((unsigned long *)&__m256i_result[2]) = 0x00005053000000ff; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100000000; + *((unsigned long *)&__m256i_result[0]) = 0x00005053000000ff; + __m256i_out = __lasx_xvbitsel_v (__m256i_op0, __m256i_op1, __m256i_op2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000040000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000040000; + *((unsigned long *)&__m256i_op2[3]) = 0x00000e0000000e00; + *((unsigned long *)&__m256i_op2[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op2[1]) = 0x00000e0000000e00; + *((unsigned long *)&__m256i_op2[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000040000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000040000; + __m256i_out = __lasx_xvbitsel_v (__m256i_op0, __m256i_op1, __m256i_op2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op2[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op2[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x8000000000000000; + __m256i_out = __lasx_xvbitsel_v (__m256i_op0, __m256i_op1, __m256i_op2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitseli.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitseli.c new file mode 100644 index 00000000000..1edb4fca251 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitseli.c @@ -0,0 +1,185 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitseli_b (__m256i_op0, __m256i_op1, 0x3a); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000000004fb; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000000004fb; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitseli_b (__m256i_op0, __m256i_op1, 0xef); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitseli_b (__m256i_op0, __m256i_op1, 0xcd); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffd10000006459; + *((unsigned long *)&__m256i_op0[2]) = 0x0000441000000004; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000004; + *((unsigned long *)&__m256i_op0[0]) = 0x0000040400000104; + *((unsigned long *)&__m256i_op1[3]) = 0xdb801b6d0962003f; + *((unsigned long *)&__m256i_op1[2]) = 0xdb8a3109fe0f0024; + *((unsigned long *)&__m256i_op1[1]) = 0x0000007fff01ffff; + *((unsigned long *)&__m256i_op1[0]) = 0xdb8e209d0cce025a; + *((unsigned long *)&__m256i_result[3]) = 0x88888a6d0962002e; + *((unsigned long *)&__m256i_result[2]) = 0xdb8a3109fe0f0020; + *((unsigned long *)&__m256i_result[1]) = 0x0000007fff01fffb; + *((unsigned long *)&__m256i_result[0]) = 0xdb8e20990cce025a; + __m256i_out = __lasx_xvbitseli_b (__m256i_op0, __m256i_op1, 0x88); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000002b902b3e; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x000000002b902b3e; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000000002a102a3a; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x000000002a102a3a; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitseli_b (__m256i_op0, __m256i_op1, 0x3a); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvbitseli_b (__m256i_op0, __m256i_op1, 0xd9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000f0f0f0f0; + *((unsigned long *)&__m256i_op0[2]) = 0xf0f0f0f0f0f0f0f0; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000f0f0f0f0; + *((unsigned long *)&__m256i_op0[0]) = 0xf0f0f0f0f0f0f0f0; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000f0f0f0f0; + *((unsigned long *)&__m256i_op1[2]) = 0xf0f0f0f0f0f0f0f0; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000f0f0f0f0; + *((unsigned long *)&__m256i_op1[0]) = 0xf0f0f0f0f0f0f0f0; + *((unsigned long *)&__m256i_result[3]) = 0x0000000090909090; + *((unsigned long *)&__m256i_result[2]) = 0x9090909090909090; + *((unsigned long *)&__m256i_result[1]) = 0x0000000090909090; + *((unsigned long *)&__m256i_result[0]) = 0x9090909090909090; + __m256i_out = __lasx_xvbitseli_b (__m256i_op0, __m256i_op1, 0x95); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x5555555555555555; + *((unsigned long *)&__m256i_op0[2]) = 0x5555555555555555; + *((unsigned long *)&__m256i_op0[1]) = 0x5555555555555555; + *((unsigned long *)&__m256i_op0[0]) = 0x5555555555555555; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x4545454545454545; + *((unsigned long *)&__m256i_result[2]) = 0x4545454545454545; + *((unsigned long *)&__m256i_result[1]) = 0x4545454545454545; + *((unsigned long *)&__m256i_result[0]) = 0x4545454545454545; + __m256i_out = __lasx_xvbitseli_b (__m256i_op0, __m256i_op1, 0x4d); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_op0[2]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_op0[1]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_op0[0]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_op1[3]) = 0x21bb481000ff0000; + *((unsigned long *)&__m256i_op1[2]) = 0x01bf481000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x21bb481000ff0000; + *((unsigned long *)&__m256i_op1[0]) = 0x01bf481000000000; + *((unsigned long *)&__m256i_result[3]) = 0xb1b3b1b1b1b7b1b1; + *((unsigned long *)&__m256i_result[2]) = 0xb1b7b1b1b1b1b1b1; + *((unsigned long *)&__m256i_result[1]) = 0xb1b3b1b1b1b7b1b1; + *((unsigned long *)&__m256i_result[0]) = 0xb1b7b1b1b1b1b1b1; + __m256i_out = __lasx_xvbitseli_b (__m256i_op0, __m256i_op1, 0xb7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000003f; + *((unsigned long *)&__m256i_op0[2]) = 0xc03fc03fc03fc03f; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000003f; + *((unsigned long *)&__m256i_op0[0]) = 0xc03fc03fc03fc03f; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000002d; + *((unsigned long *)&__m256i_result[2]) = 0xc02dc02dc02dc02d; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000002d; + *((unsigned long *)&__m256i_result[0]) = 0xc02dc02dc02dc02d; + __m256i_out = __lasx_xvbitseli_b (__m256i_op0, __m256i_op1, 0xed); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000ffff0000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000ffff0000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x60600000ffff0000; + *((unsigned long *)&__m256i_result[2]) = 0x6060000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x60600000ffff0000; + *((unsigned long *)&__m256i_result[0]) = 0x6060000000000000; + __m256i_out = __lasx_xvbitseli_b (__m256i_op0, __m256i_op1, 0x60); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitset.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitset.c new file mode 100644 index 00000000000..c195cd91ca8 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitset.c @@ -0,0 +1,620 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0xffff000000010000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000095120000; + *((unsigned long *)&__m256i_op0[1]) = 0xc9da000063f50000; + *((unsigned long *)&__m256i_op0[0]) = 0xc7387fff6bbfffff; + *((unsigned long *)&__m256i_op1[3]) = 0xfffdffffffc81aca; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ffff3a0b9512; + *((unsigned long *)&__m256i_op1[1]) = 0x280bc9db313a63f5; + *((unsigned long *)&__m256i_op1[0]) = 0xe032c738adcb6bbb; + *((unsigned long *)&__m256i_result[3]) = 0xffff800001010400; + *((unsigned long *)&__m256i_result[2]) = 0x000180009d120004; + *((unsigned long *)&__m256i_result[1]) = 0xc9da080067f50020; + *((unsigned long *)&__m256i_result[0]) = 0xc73c7fff6bbfffff; + __m256i_out = __lasx_xvbitset_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffff8046867f79; + *((unsigned long *)&__m256i_op1[2]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op1[1]) = 0xfffffffff328dfff; + *((unsigned long *)&__m256i_op1[0]) = 0x6651bfff80000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffff00010001; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffff00010001; + __m256i_out = __lasx_xvbitset_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x000000040000fff8; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x00001f41ffffbf00; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x010180068080fff9; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvbitset_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvbitset_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvbitset_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0x8000000080000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0x8000000080000000; + __m256i_out = __lasx_xvbitset_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x3ff0000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x3ff0000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ffff00010000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffff00010000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x3ff1808001020101; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x3ff1808001020101; + __m256i_out = __lasx_xvbitset_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvbitset_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvbitset_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000000004fb; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0800000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvbitset_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000102; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010103; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvbitset_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000010; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000010; + *((unsigned long *)&__m256i_op1[3]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffffefffffefc; + *((unsigned long *)&__m256i_op1[1]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_result[3]) = 0x8000000040000000; + *((unsigned long *)&__m256i_result[2]) = 0x4000000010000010; + *((unsigned long *)&__m256i_result[1]) = 0x8000000040000000; + *((unsigned long *)&__m256i_result[0]) = 0x8000000040000010; + __m256i_out = __lasx_xvbitset_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xbea2e127c046721f; + *((unsigned long *)&__m256i_op0[2]) = 0x1729c073816edebe; + *((unsigned long *)&__m256i_op0[1]) = 0xde91f010000006f9; + *((unsigned long *)&__m256i_op0[0]) = 0x5ef1f90efefaf30d; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000060000108; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000001060005; + *((unsigned long *)&__m256i_op1[1]) = 0x000000007fef0001; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[3]) = 0xbfa3e127c147721f; + *((unsigned long *)&__m256i_result[2]) = 0x1729c173836edfbe; + *((unsigned long *)&__m256i_result[1]) = 0xdf91f111808007fb; + *((unsigned long *)&__m256i_result[0]) = 0x5ff1f90ffffbf30f; + __m256i_out = __lasx_xvbitset_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xe161616161614e60; + *((unsigned long *)&__m256i_op0[2]) = 0xe161616161614e60; + *((unsigned long *)&__m256i_op0[1]) = 0xe161616161614e60; + *((unsigned long *)&__m256i_op0[0]) = 0xe161616161614e60; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xe161616161614f61; + *((unsigned long *)&__m256i_result[2]) = 0xe161616161614f61; + *((unsigned long *)&__m256i_result[1]) = 0xe161616161614f61; + *((unsigned long *)&__m256i_result[0]) = 0xe161616161614f61; + __m256i_out = __lasx_xvbitset_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8080808080808080; + *((unsigned long *)&__m256i_op0[2]) = 0x8080808080808080; + *((unsigned long *)&__m256i_op0[1]) = 0x8080808080808080; + *((unsigned long *)&__m256i_op0[0]) = 0x8080808080808080; + *((unsigned long *)&__m256i_op1[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op1[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op1[1]) = 0x01010101010000ff; + *((unsigned long *)&__m256i_op1[0]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[3]) = 0x8080808280808082; + *((unsigned long *)&__m256i_result[2]) = 0x8080808280808082; + *((unsigned long *)&__m256i_result[1]) = 0x8080808280808080; + *((unsigned long *)&__m256i_result[0]) = 0x8080808280808082; + __m256i_out = __lasx_xvbitset_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000082f8989a; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000d58f43c8; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010183f9999b; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x01010101d58f43c9; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvbitset_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0707feb60707b7d0; + *((unsigned long *)&__m256i_op0[2]) = 0x45baa7ef6a95a985; + *((unsigned long *)&__m256i_op0[1]) = 0x0707feb60707b7d0; + *((unsigned long *)&__m256i_op0[0]) = 0x45baa7ef6a95a985; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x7ffe7ffd7ffe7fff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x7ffe7ffd7ffe8001; + *((unsigned long *)&__m256i_result[3]) = 0x0707feb70707b7d1; + *((unsigned long *)&__m256i_result[2]) = 0x65baa7efea95a985; + *((unsigned long *)&__m256i_result[1]) = 0x0707feb70707b7d1; + *((unsigned long *)&__m256i_result[0]) = 0x65baa7ef6a95a987; + __m256i_out = __lasx_xvbitset_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x41cc5bb8a95fd1eb; + *((unsigned long *)&__m256i_op0[2]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x41cc5bb8a95fd1eb; + *((unsigned long *)&__m256i_op0[0]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x7b7b7b7b80000000; + *((unsigned long *)&__m256i_op1[2]) = 0xcacacb1011040500; + *((unsigned long *)&__m256i_op1[1]) = 0x7b7b7b7b80000000; + *((unsigned long *)&__m256i_op1[0]) = 0xcacacb1011040500; + *((unsigned long *)&__m256i_result[3]) = 0x49cc5bb8a95fd1eb; + *((unsigned long *)&__m256i_result[2]) = 0x7ff4080102102001; + *((unsigned long *)&__m256i_result[1]) = 0x49cc5bb8a95fd1eb; + *((unsigned long *)&__m256i_result[0]) = 0x7ff4080102102001; + __m256i_out = __lasx_xvbitset_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvbitset_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvbitset_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010401; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010401; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010401; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010401; + __m256i_out = __lasx_xvbitset_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xdf00000052a00000; + *((unsigned long *)&__m256i_op0[2]) = 0x5b7f00ff5b7f00ff; + *((unsigned long *)&__m256i_op0[1]) = 0xdf00000052a00000; + *((unsigned long *)&__m256i_op0[0]) = 0x5b7f00ff5b7f00ff; + *((unsigned long *)&__m256i_op1[3]) = 0x2020202020202020; + *((unsigned long *)&__m256i_op1[2]) = 0x2020202020206431; + *((unsigned long *)&__m256i_op1[1]) = 0x2020202020202020; + *((unsigned long *)&__m256i_op1[0]) = 0x2020202020206431; + *((unsigned long *)&__m256i_result[3]) = 0xdf01010153a10101; + *((unsigned long *)&__m256i_result[2]) = 0x5b7f01ff5b7f10ff; + *((unsigned long *)&__m256i_result[1]) = 0xdf01010153a10101; + *((unsigned long *)&__m256i_result[0]) = 0x5b7f01ff5b7f10ff; + __m256i_out = __lasx_xvbitset_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xdbcbdbcbecececec; + *((unsigned long *)&__m256i_op1[2]) = 0xdbcbdbcb0000dbcb; + *((unsigned long *)&__m256i_op1[1]) = 0xdbcbdbcbecececec; + *((unsigned long *)&__m256i_op1[0]) = 0xdbcbdbcb0000dbcb; + *((unsigned long *)&__m256i_result[3]) = 0x0000080000001000; + *((unsigned long *)&__m256i_result[2]) = 0x0000080000000800; + *((unsigned long *)&__m256i_result[1]) = 0x0000080000001000; + *((unsigned long *)&__m256i_result[0]) = 0x0000080000000800; + __m256i_out = __lasx_xvbitset_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000027262524; + *((unsigned long *)&__m256i_op0[2]) = 0x23222120171e151c; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000027262524; + *((unsigned long *)&__m256i_op0[0]) = 0x23222120171e151c; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x201fdfe0201fdfe0; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x201fdfe0201fdfe0; + *((unsigned long *)&__m256i_result[3]) = 0x0101010127272525; + *((unsigned long *)&__m256i_result[2]) = 0x23a2a121179e951d; + *((unsigned long *)&__m256i_result[1]) = 0x0101010127272525; + *((unsigned long *)&__m256i_result[0]) = 0x23a2a121179e951d; + __m256i_out = __lasx_xvbitset_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvbitset_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000007fee; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000007fee; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000007fee; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000007fee; + *((unsigned long *)&__m256i_op1[3]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x800080008000ffee; + *((unsigned long *)&__m256i_result[2]) = 0x800080008000ffee; + *((unsigned long *)&__m256i_result[1]) = 0x800080008000ffee; + *((unsigned long *)&__m256i_result[0]) = 0x800080008000ffee; + __m256i_out = __lasx_xvbitset_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvbitset_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[3]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000100010001ffff; + *((unsigned long *)&__m256i_result[2]) = 0x000100010001ffff; + *((unsigned long *)&__m256i_result[1]) = 0x000100010001ffff; + *((unsigned long *)&__m256i_result[0]) = 0x000100010001ffff; + __m256i_out = __lasx_xvbitset_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[3]) = 0x00010000fffe0000; + *((unsigned long *)&__m256i_op1[2]) = 0x00010000fffe0000; + *((unsigned long *)&__m256i_op1[1]) = 0x00010000fffe0000; + *((unsigned long *)&__m256i_op1[0]) = 0x00010000fffe0000; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000ffff; + __m256i_out = __lasx_xvbitset_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000000c9; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000000c9; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000000000f0; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x01010101010101c9; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x01010101010101c9; + __m256i_out = __lasx_xvbitset_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvbitset_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000200000008; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000200000008; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvbitset_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000affff800b; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000affff800b; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000affff800b; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000affff800b; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000800; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000800; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000800; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000800; + __m256i_out = __lasx_xvbitset_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0200000202000002; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0200000202000002; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x0001000400010004; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000400010004; + __m256i_out = __lasx_xvbitset_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000e0000000e; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000e0000000d; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000e0000000e; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000e0000000d; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0001000f0001000f; + *((unsigned long *)&__m256i_result[2]) = 0x0001000f0001000d; + *((unsigned long *)&__m256i_result[1]) = 0x0001000f0001000f; + *((unsigned long *)&__m256i_result[0]) = 0x0001000f0001000d; + __m256i_out = __lasx_xvbitset_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x007f010000000100; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x007f010000000100; + *((unsigned long *)&__m256i_op1[3]) = 0x4000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x4000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0x007f010100000101; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0x007f010100000101; + __m256i_out = __lasx_xvbitset_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvbitset_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x498000804843ffe0; + *((unsigned long *)&__m256i_op0[2]) = 0x4980008068400000; + *((unsigned long *)&__m256i_op0[1]) = 0x498000804843ffe0; + *((unsigned long *)&__m256i_op0[0]) = 0x4980008068400000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x498100814843ffe1; + *((unsigned long *)&__m256i_result[2]) = 0x4981008168410001; + *((unsigned long *)&__m256i_result[1]) = 0x498100814843ffe1; + *((unsigned long *)&__m256i_result[0]) = 0x4981008168410001; + __m256i_out = __lasx_xvbitset_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000090b0906; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100002000; + __m256i_out = __lasx_xvbitset_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x03af03af03af03af; + *((unsigned long *)&__m256i_op0[2]) = 0x03acfc5303260e80; + *((unsigned long *)&__m256i_op0[1]) = 0x03af03af03af03af; + *((unsigned long *)&__m256i_op0[0]) = 0x03acfc5303260e80; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000002780; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000002780; + *((unsigned long *)&__m256i_result[3]) = 0x03af03af03af03af; + *((unsigned long *)&__m256i_result[2]) = 0x03acfc5303260e81; + *((unsigned long *)&__m256i_result[1]) = 0x03af03af03af03af; + *((unsigned long *)&__m256i_result[0]) = 0x03acfc5303260e81; + __m256i_out = __lasx_xvbitset_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitseti.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitseti.c new file mode 100644 index 00000000000..47f37e4b3d4 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvbitseti.c @@ -0,0 +1,405 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000800; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000800; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvbitseti_d (__m256i_op0, 0xb); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvbitseti_w (__m256i_op0, 0x15); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfffcf800fffcf800; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000080000000800; + *((unsigned long *)&__m256i_result[2]) = 0xfffcf800fffcf800; + *((unsigned long *)&__m256i_result[1]) = 0x0000080000000800; + *((unsigned long *)&__m256i_result[0]) = 0x0000080000000800; + __m256i_out = __lasx_xvbitseti_w (__m256i_op0, 0xb); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00007f7f00000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00007f7f00007fff; + *((unsigned long *)&__m256i_result[3]) = 0x0000040000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00007f7f00000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000040000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00007f7f00007fff; + __m256i_out = __lasx_xvbitseti_d (__m256i_op0, 0x2a); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0202020202020202; + *((unsigned long *)&__m256i_result[2]) = 0x0202020202020202; + *((unsigned long *)&__m256i_result[1]) = 0x0202020202020202; + *((unsigned long *)&__m256i_result[0]) = 0x0202020202020202; + __m256i_out = __lasx_xvbitseti_b (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000800000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000800000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000800000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000800000000; + __m256i_out = __lasx_xvbitseti_d (__m256i_op0, 0x23); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x1010101010101010; + *((unsigned long *)&__m256i_result[2]) = 0x1010101010101010; + *((unsigned long *)&__m256i_result[1]) = 0x1010101010101010; + *((unsigned long *)&__m256i_result[0]) = 0x1010101010101010; + __m256i_out = __lasx_xvbitseti_b (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000004000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000004000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000004000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000004000000; + __m256i_out = __lasx_xvbitseti_d (__m256i_op0, 0x1a); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000100000013; + *((unsigned long *)&__m256i_op0[2]) = 0x00000001000000fe; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000100000013; + *((unsigned long *)&__m256i_op0[0]) = 0x00000001000000fb; + *((unsigned long *)&__m256i_result[3]) = 0x8080808180808093; + *((unsigned long *)&__m256i_result[2]) = 0x80808081808080fe; + *((unsigned long *)&__m256i_result[1]) = 0x8080808180808093; + *((unsigned long *)&__m256i_result[0]) = 0x80808081808080fb; + __m256i_out = __lasx_xvbitseti_b (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000020; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000020; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000020; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000020; + __m256i_out = __lasx_xvbitseti_d (__m256i_op0, 0x5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[1]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[0]) = 0x0808080808080808; + __m256i_out = __lasx_xvbitseti_b (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0010000000100000; + *((unsigned long *)&__m256i_result[2]) = 0x0010000000100000; + *((unsigned long *)&__m256i_result[1]) = 0x0010000000100000; + *((unsigned long *)&__m256i_result[0]) = 0x0010000000100000; + __m256i_out = __lasx_xvbitseti_w (__m256i_op0, 0x14); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[2]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[1]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[0]) = 0x0010001000100010; + __m256i_out = __lasx_xvbitseti_h (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000044444443; + *((unsigned long *)&__m256i_op0[2]) = 0x7bbbbbbbf7777778; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000044444443; + *((unsigned long *)&__m256i_op0[0]) = 0x7bbbbbbbf7777778; + *((unsigned long *)&__m256i_result[3]) = 0x1000100054445443; + *((unsigned long *)&__m256i_result[2]) = 0x7bbbbbbbf7777778; + *((unsigned long *)&__m256i_result[1]) = 0x1000100054445443; + *((unsigned long *)&__m256i_result[0]) = 0x7bbbbbbbf7777778; + __m256i_out = __lasx_xvbitseti_h (__m256i_op0, 0xc); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x2020202020202020; + *((unsigned long *)&__m256i_result[2]) = 0x2020202020202020; + *((unsigned long *)&__m256i_result[1]) = 0x2020202020202020; + *((unsigned long *)&__m256i_result[0]) = 0x2020202020202020; + __m256i_out = __lasx_xvbitseti_b (__m256i_op0, 0x5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000200; + __m256i_out = __lasx_xvbitseti_d (__m256i_op0, 0x9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_op0[2]) = 0xfffa0078fffa0074; + *((unsigned long *)&__m256i_op0[1]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_op0[0]) = 0xfffa0078fffa0074; + *((unsigned long *)&__m256i_result[3]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[2]) = 0xfffa2078fffa2074; + *((unsigned long *)&__m256i_result[1]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[0]) = 0xfffa2078fffa2074; + __m256i_out = __lasx_xvbitseti_w (__m256i_op0, 0xd); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfffeffebfb7afb62; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfffeffebfb7afb62; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000800; + *((unsigned long *)&__m256i_result[2]) = 0xfffeffebfb7afb62; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000800; + *((unsigned long *)&__m256i_result[0]) = 0xfffeffebfb7afb62; + __m256i_out = __lasx_xvbitseti_d (__m256i_op0, 0xb); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xe7e7e7e7e7e7e7e7; + *((unsigned long *)&__m256i_op0[2]) = 0xe7e7e7e7e7e7e7e7; + *((unsigned long *)&__m256i_op0[1]) = 0xe7e7e7e7e7e7e7e7; + *((unsigned long *)&__m256i_op0[0]) = 0xe7e7e7e7e7e7e7e7; + *((unsigned long *)&__m256i_result[3]) = 0xe7e7e7e7e7e7e7e7; + *((unsigned long *)&__m256i_result[2]) = 0xe7e7e7e7e7e7e7e7; + *((unsigned long *)&__m256i_result[1]) = 0xe7e7e7e7e7e7e7e7; + *((unsigned long *)&__m256i_result[0]) = 0xe7e7e7e7e7e7e7e7; + __m256i_out = __lasx_xvbitseti_h (__m256i_op0, 0xd); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000004411; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000004411; + *((unsigned long *)&__m256i_result[3]) = 0x2020202020202020; + *((unsigned long *)&__m256i_result[2]) = 0x2020202020206431; + *((unsigned long *)&__m256i_result[1]) = 0x2020202020202020; + *((unsigned long *)&__m256i_result[0]) = 0x2020202020206431; + __m256i_out = __lasx_xvbitseti_b (__m256i_op0, 0x5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0003030300000300; + *((unsigned long *)&__m256i_op0[2]) = 0x0003030300000300; + *((unsigned long *)&__m256i_op0[1]) = 0x0003030300000100; + *((unsigned long *)&__m256i_op0[0]) = 0x0003030300000100; + *((unsigned long *)&__m256i_result[3]) = 0x0043030300400300; + *((unsigned long *)&__m256i_result[2]) = 0x0043030300400300; + *((unsigned long *)&__m256i_result[1]) = 0x0043030300400100; + *((unsigned long *)&__m256i_result[0]) = 0x0043030300400100; + __m256i_out = __lasx_xvbitseti_w (__m256i_op0, 0x16); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x223d76f09f3881ff; + *((unsigned long *)&__m256i_op0[2]) = 0x3870ca8d013e76a0; + *((unsigned long *)&__m256i_op0[1]) = 0x223d76f09f37e357; + *((unsigned long *)&__m256i_op0[0]) = 0x43ec0a1b2aba7ed0; + *((unsigned long *)&__m256i_result[3]) = 0x223d76f09f3881ff; + *((unsigned long *)&__m256i_result[2]) = 0x3870ca9d013e76b0; + *((unsigned long *)&__m256i_result[1]) = 0x223d76f09f37e357; + *((unsigned long *)&__m256i_result[0]) = 0x43ec0a1b2aba7ed0; + __m256i_out = __lasx_xvbitseti_w (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xf7f8f7f8f800f800; + *((unsigned long *)&__m256i_op0[2]) = 0x00003f780000ff80; + *((unsigned long *)&__m256i_op0[1]) = 0xf7f8f7f80000fff9; + *((unsigned long *)&__m256i_op0[0]) = 0x00003f780000ff80; + *((unsigned long *)&__m256i_result[3]) = 0xf7f8f7f8f800f800; + *((unsigned long *)&__m256i_result[2]) = 0x00003f784000ff80; + *((unsigned long *)&__m256i_result[1]) = 0xf7f8f7f84000fff9; + *((unsigned long *)&__m256i_result[0]) = 0x00003f784000ff80; + __m256i_out = __lasx_xvbitseti_d (__m256i_op0, 0x1e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x4040404040404040; + *((unsigned long *)&__m256i_result[2]) = 0x4040404040404040; + *((unsigned long *)&__m256i_result[1]) = 0x4040404040404040; + *((unsigned long *)&__m256i_result[0]) = 0x4040404040404040; + __m256i_out = __lasx_xvbitseti_b (__m256i_op0, 0x6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff0020ff1f001f; + *((unsigned long *)&__m256i_op0[2]) = 0xffe1ffe0ffe1ffe0; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff0020ff1f001f; + *((unsigned long *)&__m256i_op0[0]) = 0xffe1ffe0ffe1ffe0; + *((unsigned long *)&__m256i_result[3]) = 0x01ff0020ff1f001f; + *((unsigned long *)&__m256i_result[2]) = 0xffe1ffe0ffe1ffe0; + *((unsigned long *)&__m256i_result[1]) = 0x01ff0020ff1f001f; + *((unsigned long *)&__m256i_result[0]) = 0xffe1ffe0ffe1ffe0; + __m256i_out = __lasx_xvbitseti_w (__m256i_op0, 0x18); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffffefef800; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffffefef800; + *((unsigned long *)&__m256i_result[3]) = 0x0000008000000000; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffffefef800; + *((unsigned long *)&__m256i_result[1]) = 0x0000008000000000; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffffefef800; + __m256i_out = __lasx_xvbitseti_d (__m256i_op0, 0x27); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0002000000020000; + *((unsigned long *)&__m256i_result[2]) = 0x0002000000020000; + *((unsigned long *)&__m256i_result[1]) = 0x0002000000020000; + *((unsigned long *)&__m256i_result[0]) = 0x0002000000020000; + __m256i_out = __lasx_xvbitseti_w (__m256i_op0, 0x11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000030b8; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000030b8; + *((unsigned long *)&__m256i_result[3]) = 0x0002000200020002; + *((unsigned long *)&__m256i_result[2]) = 0x00020002000230ba; + *((unsigned long *)&__m256i_result[1]) = 0x0002000200020002; + *((unsigned long *)&__m256i_result[0]) = 0x00020002000230ba; + __m256i_out = __lasx_xvbitseti_h (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000800080008000; + *((unsigned long *)&__m256i_result[3]) = 0x0100010001000100; + *((unsigned long *)&__m256i_result[2]) = 0x8100810081008100; + *((unsigned long *)&__m256i_result[1]) = 0x0100010001000100; + *((unsigned long *)&__m256i_result[0]) = 0x8100810081008100; + __m256i_out = __lasx_xvbitseti_h (__m256i_op0, 0x8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000007878; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000007878; + *((unsigned long *)&__m256i_result[3]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[2]) = 0x0010001000107878; + *((unsigned long *)&__m256i_result[1]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[0]) = 0x0010001000107878; + __m256i_out = __lasx_xvbitseti_h (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[1]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[0]) = 0x0808080808080808; + __m256i_out = __lasx_xvbitseti_b (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[2]) = 0xffffb2f600006f48; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[0]) = 0xffffb2f600006f48; + *((unsigned long *)&__m256i_result[3]) = 0x4000400140004001; + *((unsigned long *)&__m256i_result[2]) = 0xfffff2f640006f48; + *((unsigned long *)&__m256i_result[1]) = 0x4000400140004001; + *((unsigned long *)&__m256i_result[0]) = 0xfffff2f640006f48; + __m256i_out = __lasx_xvbitseti_h (__m256i_op0, 0xe); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000008; + __m256i_out = __lasx_xvbitseti_d (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x4040404040404040; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x4040404040404040; + __m256i_out = __lasx_xvbitseti_b (__m256i_op0, 0x6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfd02fd02fd02fd02; + *((unsigned long *)&__m256i_op0[2]) = 0xfd02fd02fd02fd02; + *((unsigned long *)&__m256i_op0[1]) = 0xfd02fd02fd02fd02; + *((unsigned long *)&__m256i_op0[0]) = 0xfd02fd02fd02fd02; + *((unsigned long *)&__m256i_result[3]) = 0xfd12fd12fd12fd12; + *((unsigned long *)&__m256i_result[2]) = 0xfd12fd12fd12fd12; + *((unsigned long *)&__m256i_result[1]) = 0xfd12fd12fd12fd12; + *((unsigned long *)&__m256i_result[0]) = 0xfd12fd12fd12fd12; + __m256i_out = __lasx_xvbitseti_b (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvclo.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvclo.c new file mode 100644 index 00000000000..dbc52f92b7c --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvclo.c @@ -0,0 +1,449 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0xffd1b24e00000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfffcea54ffff29a8; + *((unsigned long *)&__m256i_op0[1]) = 0xff8cad88ff8306b4; + *((unsigned long *)&__m256i_op0[0]) = 0xfffc1278fffce4c8; + *((unsigned long *)&__m256i_result[3]) = 0x0802010000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0806030008080001; + *((unsigned long *)&__m256i_result[1]) = 0x0801010108010001; + *((unsigned long *)&__m256i_result[0]) = 0x0806000008060302; + __m256i_out = __lasx_xvclo_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000fffffffe; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000fffffffe; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000fffffffe; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000fffffffe; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfafafafafafafafa; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000fefefe; + *((unsigned long *)&__m256i_result[3]) = 0x0005000500050005; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0007000700070007; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000007; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[2]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[1]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[0]) = 0x0010001000100010; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xb70036db12c4007e; + *((unsigned long *)&__m256i_op0[2]) = 0xb7146213fc1e0049; + *((unsigned long *)&__m256i_op0[1]) = 0x000000fefe02fffe; + *((unsigned long *)&__m256i_op0[0]) = 0xb71c413b199d04b5; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvclo_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0fff0fff00000020; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0fff0fff00000020; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000000; + __m256i_out = __lasx_xvclo_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffffffffffffc; + *((unsigned long *)&__m256i_op0[2]) = 0x01fc03fc01fc03fc; + *((unsigned long *)&__m256i_op0[1]) = 0xfffffffffffffffc; + *((unsigned long *)&__m256i_op0[0]) = 0x01fc03fc01fc03fc; + *((unsigned long *)&__m256i_result[3]) = 0x000000200000001e; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x000000200000001e; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000808; + __m256i_out = __lasx_xvclo_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xd04752cdd5543b56; + *((unsigned long *)&__m256i_op0[2]) = 0x6906e68064f3d78b; + *((unsigned long *)&__m256i_op0[1]) = 0xd04752cdd5543b56; + *((unsigned long *)&__m256i_op0[0]) = 0x6906e68064f3d78b; + *((unsigned long *)&__m256i_result[3]) = 0x0002000000020000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000300000002; + *((unsigned long *)&__m256i_result[1]) = 0x0002000000020000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000300000002; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xc0000000c0000000; + *((unsigned long *)&__m256i_op0[2]) = 0xc000000080400000; + *((unsigned long *)&__m256i_op0[1]) = 0xc0000000c0000000; + *((unsigned long *)&__m256i_op0[0]) = 0xc000000080400000; + *((unsigned long *)&__m256i_result[3]) = 0x0002000000020000; + *((unsigned long *)&__m256i_result[2]) = 0x0002000000010000; + *((unsigned long *)&__m256i_result[1]) = 0x0002000000020000; + *((unsigned long *)&__m256i_result[0]) = 0x0002000000010000; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000012; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000012; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000012; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000012; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffff800000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0010000100000000; + *((unsigned long *)&__m256i_result[2]) = 0x0010000100000000; + *((unsigned long *)&__m256i_result[1]) = 0x0010000100000000; + *((unsigned long *)&__m256i_result[0]) = 0x0010000100000000; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000004000000020; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000004000000020; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000201220001011c; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000201220001011c; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000800080008000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvclo_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000100010; + *((unsigned long *)&__m256i_result[2]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000100010; + *((unsigned long *)&__m256i_result[0]) = 0x0010001000100010; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op0[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op0[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op0[0]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000100010; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000100010; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000100010; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000100010; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclo_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvclz.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvclz.c new file mode 100644 index 00000000000..89191c46757 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvclz.c @@ -0,0 +1,504 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x04481940fbb7e6bf; + *((unsigned long *)&__m256i_op0[2]) = 0xf2781966e6991966; + *((unsigned long *)&__m256i_op0[1]) = 0x51258839aeda77c6; + *((unsigned long *)&__m256i_op0[0]) = 0xcf25f0e00f1ff0e0; + *((unsigned long *)&__m256i_result[3]) = 0x0501030100000000; + *((unsigned long *)&__m256i_result[2]) = 0x0001030100000301; + *((unsigned long *)&__m256i_result[1]) = 0x0102000200000100; + *((unsigned long *)&__m256i_result[0]) = 0x0002000004030000; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[3]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[2]) = 0x0000000f0000000f; + *((unsigned long *)&__m256i_result[1]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[0]) = 0x0000000f0000000f; + __m256i_out = __lasx_xvclz_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000003868686a20; + *((unsigned long *)&__m256i_op0[2]) = 0x0045b8ae81bce1d8; + *((unsigned long *)&__m256i_op0[1]) = 0x0000003868686a20; + *((unsigned long *)&__m256i_op0[0]) = 0x0045b8ae81bce1d8; + *((unsigned long *)&__m256i_result[3]) = 0x0000001a00000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000900000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000001a00000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000900000000; + __m256i_out = __lasx_xvclz_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[2]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[1]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[0]) = 0x0010001000100010; + __m256i_out = __lasx_xvclz_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclz_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[1]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[0]) = 0x0808080808080808; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000040; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[1]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0808080808080807; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0808080808080807; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000007fff; + *((unsigned long *)&__m256i_op0[1]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000007fff; + *((unsigned long *)&__m256i_result[3]) = 0x0001000000010000; + *((unsigned long *)&__m256i_result[2]) = 0x0010001000100001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000000010000; + *((unsigned long *)&__m256i_result[0]) = 0x0010001000100001; + __m256i_out = __lasx_xvclz_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000040; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xff00ffffff00ffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xff00ffffff00ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0008000000080000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0008000000080000; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[1]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[0]) = 0x0808080808080808; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[2]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[1]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[0]) = 0x0010001000100010; + __m256i_out = __lasx_xvclz_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000000000fe; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000007f; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000002; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000007f; + *((unsigned long *)&__m256i_result[3]) = 0x0000002000000018; + *((unsigned long *)&__m256i_result[2]) = 0x0000002000000019; + *((unsigned long *)&__m256i_result[1]) = 0x000000200000001e; + *((unsigned long *)&__m256i_result[0]) = 0x0000002000000019; + __m256i_out = __lasx_xvclz_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0b085bfc00000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0b004bc000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0b085bfc00000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0b004bc000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0404010008080808; + *((unsigned long *)&__m256i_result[2]) = 0x0408010008080808; + *((unsigned long *)&__m256i_result[1]) = 0x0404010008080808; + *((unsigned long *)&__m256i_result[0]) = 0x0408010008080808; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffc040ffffc09d; + *((unsigned long *)&__m256i_op0[2]) = 0x00003fc00000428a; + *((unsigned long *)&__m256i_op0[1]) = 0xffffc040ffffc09d; + *((unsigned long *)&__m256i_op0[0]) = 0x00003fc00000428a; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000012; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000012; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0404010008080808; + *((unsigned long *)&__m256i_op0[2]) = 0x0408010008080808; + *((unsigned long *)&__m256i_op0[1]) = 0x0404010008080808; + *((unsigned long *)&__m256i_op0[0]) = 0x0408010008080808; + *((unsigned long *)&__m256i_result[3]) = 0x0505070804040404; + *((unsigned long *)&__m256i_result[2]) = 0x0504070804040404; + *((unsigned long *)&__m256i_result[1]) = 0x0505070804040404; + *((unsigned long *)&__m256i_result[0]) = 0x0504070804040404; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[2]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[1]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[0]) = 0x0000002000000020; + __m256i_out = __lasx_xvclz_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[2]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[1]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[0]) = 0x0000002000000020; + __m256i_out = __lasx_xvclz_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[2]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[1]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[0]) = 0x0000002000000020; + __m256i_out = __lasx_xvclz_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000040; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000001000000010; + *((unsigned long *)&__m256i_result[2]) = 0x0000001000000010; + *((unsigned long *)&__m256i_result[1]) = 0x0000001000000010; + *((unsigned long *)&__m256i_result[0]) = 0x0000001000000010; + __m256i_out = __lasx_xvclz_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0006ffff0004ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0002ffff0000ff00; + *((unsigned long *)&__m256i_op0[1]) = 0x0006ffff0004ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0002ffff0000ff00; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000000d; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000000e; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000000d; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000000e; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000032; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000003c000000032; + *((unsigned long *)&__m256i_result[3]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[2]) = 0x001000100010000a; + *((unsigned long *)&__m256i_result[1]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[0]) = 0x001000060010000a; + __m256i_out = __lasx_xvclz_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0003800400038004; + *((unsigned long *)&__m256i_op0[2]) = 0x000a800b000a800b; + *((unsigned long *)&__m256i_op0[1]) = 0x0003800400038004; + *((unsigned long *)&__m256i_op0[0]) = 0x000a800b000a800b; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000000e; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000000c; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000000e; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000000c; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[2]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[1]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[0]) = 0x0000002000000020; + __m256i_out = __lasx_xvclz_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffff00000080; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff00000080; + *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0000000008080800; + *((unsigned long *)&__m256i_result[1]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[0]) = 0x0000000008080800; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[1]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[0]) = 0x0808080808080808; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0a0a000000000a0a; + *((unsigned long *)&__m256i_op0[2]) = 0x0a0a0a0a00000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0a0a000000000a0a; + *((unsigned long *)&__m256i_op0[0]) = 0x0a0a0a0a00000000; + *((unsigned long *)&__m256i_result[3]) = 0x0004001000100004; + *((unsigned long *)&__m256i_result[2]) = 0x0004000400100010; + *((unsigned long *)&__m256i_result[1]) = 0x0004001000100004; + *((unsigned long *)&__m256i_result[0]) = 0x0004000400100010; + __m256i_out = __lasx_xvclz_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[2]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[1]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[0]) = 0x0000002000000020; + __m256i_out = __lasx_xvclz_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ff88ff88; + *((unsigned long *)&__m256i_op0[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ff88ff88; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000020; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000020; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000007f8000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000007f8000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000029; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000029; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000040; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[2]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[1]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[0]) = 0x0000002000000020; + __m256i_out = __lasx_xvclz_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000007; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000007; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[1]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[0]) = 0x0808080808080808; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000040; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000001010000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000001010000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000027; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000027; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000040; + __m256i_out = __lasx_xvclz_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[1]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[0]) = 0x0808080808080808; + __m256i_out = __lasx_xvclz_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpcnt.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpcnt.c new file mode 100644 index 00000000000..d2e742e8104 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpcnt.c @@ -0,0 +1,526 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x639c3fffb5dffffe; + *((unsigned long *)&__m256i_op0[0]) = 0xb8c7800094400001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0008000e000c000f; + *((unsigned long *)&__m256i_result[0]) = 0x0009000100040001; + __m256i_out = __lasx_xvpcnt_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x005500550055ffab; + *((unsigned long *)&__m256i_op0[2]) = 0x005500550055ffab; + *((unsigned long *)&__m256i_op0[1]) = 0x005500550055ffab; + *((unsigned long *)&__m256i_op0[0]) = 0x005500550055ffab; + *((unsigned long *)&__m256i_result[3]) = 0x0004000400040805; + *((unsigned long *)&__m256i_result[2]) = 0x0004000400040805; + *((unsigned long *)&__m256i_result[1]) = 0x0004000400040805; + *((unsigned long *)&__m256i_result[0]) = 0x0004000400040805; + __m256i_out = __lasx_xvpcnt_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff00ff00000007; + *((unsigned long *)&__m256i_op0[2]) = 0xfffcf800fffcf800; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff00ff00000007; + *((unsigned long *)&__m256i_op0[0]) = 0x0000080000000800; + *((unsigned long *)&__m256i_result[3]) = 0x0008000800000003; + *((unsigned long *)&__m256i_result[2]) = 0x0806050008060500; + *((unsigned long *)&__m256i_result[1]) = 0x0008000800000003; + *((unsigned long *)&__m256i_result[0]) = 0x0000010000000100; + __m256i_out = __lasx_xvpcnt_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000002e2100; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000040002; + __m256i_out = __lasx_xvpcnt_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x1000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x1000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x1000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x1000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvpcnt_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x34000000fff00000; + *((unsigned long *)&__m256i_op0[2]) = 0xfff6e00000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x3380000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x363c0000fff3c000; + *((unsigned long *)&__m256i_result[3]) = 0x000000030000000c; + *((unsigned long *)&__m256i_result[2]) = 0x0000001100000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000500000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000800000010; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00c100c100c100c1; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00c100c100c100c1; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0003000300030003; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0003000300030003; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000040; + __m256i_out = __lasx_xvpcnt_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0000080800000808; + *((unsigned long *)&__m256i_result[1]) = 0x0000080808080808; + *((unsigned long *)&__m256i_result[0]) = 0x0000080800000808; + __m256i_out = __lasx_xvpcnt_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[1]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[0]) = 0x0808080808080808; + __m256i_out = __lasx_xvpcnt_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000040; + __m256i_out = __lasx_xvpcnt_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000003; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000003; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000010001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000002; + __m256i_out = __lasx_xvpcnt_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffe36780; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000100000001; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffe36780; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000100000001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000008050501; + *((unsigned long *)&__m256i_result[2]) = 0x0100000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000008050501; + *((unsigned long *)&__m256i_result[0]) = 0x0100000100000001; + __m256i_out = __lasx_xvpcnt_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000002000000020; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000002000000020; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffff0000ffff0000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffff0000ffff0000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000020; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000020; + __m256i_out = __lasx_xvpcnt_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvpcnt_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000001555; + *((unsigned long *)&__m256i_op0[2]) = 0x000015554001c003; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000001555; + *((unsigned long *)&__m256i_op0[0]) = 0x000015554001c003; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000304; + *((unsigned long *)&__m256i_result[2]) = 0x0000030401010202; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000304; + *((unsigned long *)&__m256i_result[0]) = 0x0000030401010202; + __m256i_out = __lasx_xvpcnt_b (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_d (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000007f433c78; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000007f433c78; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000000a0008; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000000a0008; + __m256i_out = __lasx_xvpcnt_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_result[3]) = 0x0010001000030000; + *((unsigned long *)&__m256i_result[2]) = 0x0010001000030000; + *((unsigned long *)&__m256i_result[1]) = 0x0010001000030000; + *((unsigned long *)&__m256i_result[0]) = 0x0010001000030000; + __m256i_out = __lasx_xvpcnt_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000010000685e; + *((unsigned long *)&__m256i_op0[2]) = 0x000020a4ffffbe4f; + *((unsigned long *)&__m256i_op0[1]) = 0x000000010000685e; + *((unsigned long *)&__m256i_op0[0]) = 0x000020a4ffffbe4f; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000008; + *((unsigned long *)&__m256i_result[2]) = 0x000000040000001b; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000008; + *((unsigned long *)&__m256i_result[0]) = 0x000000040000001b; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xff1cff1cff1cff1c; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xff1cff1cff1cff1c; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000b000b000b000b; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000b000b000b000b; + __m256i_out = __lasx_xvpcnt_h (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000001f00000020; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000001f00000020; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff01ff01ff01ff01; + *((unsigned long *)&__m256i_op0[2]) = 0xff01ff01ff01ff01; + *((unsigned long *)&__m256i_op0[1]) = 0xff01ff01ff01ff01; + *((unsigned long *)&__m256i_op0[0]) = 0xff01ff01ff01ff01; + *((unsigned long *)&__m256i_result[3]) = 0x0000001200000012; + *((unsigned long *)&__m256i_result[2]) = 0x0000001200000012; + *((unsigned long *)&__m256i_result[1]) = 0x0000001200000012; + *((unsigned long *)&__m256i_result[0]) = 0x0000001200000012; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000400000004000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000400000004000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000400000004000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000400000004000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvpcnt_w (__m256i_op0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +}