From patchwork Wed Sep 13 03:35:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiaolong X-Patchwork-Id: 138589 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp832385vqx; Tue, 12 Sep 2023 20:41:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE2FBp6TXVBpaAahbxaPbSACy7PEaIf25ABh84BjQR51WQOA4zIc1mkKJPHgc1IqEJaOP7I X-Received: by 2002:a17:906:3151:b0:9a2:295a:9bc5 with SMTP id e17-20020a170906315100b009a2295a9bc5mr907639eje.21.1694576496771; Tue, 12 Sep 2023 20:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694576496; cv=none; d=google.com; s=arc-20160816; b=HFhVJvVyYjrutvrESuijErUk9tGQplRCawStgvVcuo2eL9H4yCMLCO03ku1ExIaLwj /4M9EaPK9PbcjyEe8ZGI5kKLtFD8fmaWKwrJayGo83eiJtJWjutg9pnC3I+W+6DO3cae eTyHChqQpizhqRnJcD2Z1TXAhDrMXQPjqTmO8gnpgVrt23L7buAfKNKc+rMmm4QcBskh 6RLiOyO3unb9CtsuyKg0VstM4JH12CClODKOPDDCz/buvZtLAERDMMuSR0ou3wpJ5SN7 nYUA5VnYA8oVegrW8++JhZqQOAxOJ3UQq6eJjl893/pDPmRzjWYt5EupmqcaV9gtQDA+ onUQ== 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=RKS1PuicvJoabOGiO2jr0DLi5OZSyYbkXzOwdyEAafI=; fh=3pFUYcpS/27XRzOf17GfR86AuNQu+P1CET04YURgCLs=; b=yZye3t6jgkOb3zunhEf4JPhRd0qA9kK9BwyFfgpa9JQZHMsUrsZ7QniO+sgpeY9hgR 6LIKMEcERxsRmK4PUracn1oWzfGFA2ceUnmRMLn3Uf6hPAfPDY7Tzavi6WtxF59Yj/H6 OZzotFp1irUNl9HT5KD8D7us9LZp5r7nayRdVbwk7VXKt331ojwwMWF8lYu4HzXz5AST vSTwvfpy4BAoTkyuA1WfaIiQYFdZQyUjHiOxKSL7ifEDzA+ld/+BW6wsKo7S7QaDfCA0 9I74gvx9xefeBNAtjQAyEUiN+Kf0cTfgvh6HV8k4tnZsrPgA00tCros1/zwfK3gzIHjh JlnQ== 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 k9-20020a170906054900b009878e79ba85si9998039eja.302.2023.09.12.20.41.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 20:41:36 -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 CBC693853D22 for ; Wed, 13 Sep 2023 03:36:11 +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 B50F83882ADD for ; Wed, 13 Sep 2023 03:35:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B50F83882ADD 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 _____8AxXOoCLgFlvTAmAA--.47126S3; Wed, 13 Sep 2023 11:35:30 +0800 (CST) Received: from slurm-master.loongson.cn (unknown [10.10.130.252]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cx7y_8LQFlvA8CAA--.3484S6; Wed, 13 Sep 2023 11:35:29 +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 12/23] LoongArch: Add tests for SX vector vabsd/vmskgez/vmskltz/vmsknz/vsigncov instructions. Date: Wed, 13 Sep 2023 11:35:15 +0800 Message-Id: <20230913033522.5983-3-chenxiaolong@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230913033522.5983-1-chenxiaolong@loongson.cn> References: <20230913033522.5983-1-chenxiaolong@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cx7y_8LQFlvA8CAA--.3484S6 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQANBWUBHCIBBAAAsW X-Coremail-Antispam: 1Uk129KBj9UXoWxCw1rGr4xGryUKoXrpFWDXr4rpr12vr13Kr Wxua4YyryDtFyaqFWkAr92ya97JF17t3srKw1DGFsxXF13C34UAr1DtF9rWFy3tFy5GF4j qr47JwcCm3ZEXasCq-sJn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7KY7ZEXasCq-sGcS sGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVr nRJUUUkIb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG6r Wj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2 z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr 1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j 6F4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMc02F4 0EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWrXVW3AwAv7VC2z280aVAFwI0_ Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI4 8JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xv wVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjx v20xvE14v26ryj6F1UMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20E Y4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267 AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU04v3UUUUUU== X-Spam-Status: No, score=-12.7 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: 1776892245003281939 X-GMAIL-MSGID: 1776892245003281939 gcc/testsuite/ChangeLog: * gcc.target/loongarch/vector/lsx/lsx-vabsd-1.c: New test. * gcc.target/loongarch/vector/lsx/lsx-vabsd-2.c: New test. * gcc.target/loongarch/vector/lsx/lsx-vmskgez.c: New test. * gcc.target/loongarch/vector/lsx/lsx-vmskltz.c: New test. * gcc.target/loongarch/vector/lsx/lsx-vmsknz.c: New test. * gcc.target/loongarch/vector/lsx/lsx-vsigncov.c: New test. --- .../loongarch/vector/lsx/lsx-vabsd-1.c | 272 +++++++++++ .../loongarch/vector/lsx/lsx-vabsd-2.c | 398 ++++++++++++++++ .../loongarch/vector/lsx/lsx-vmskgez.c | 119 +++++ .../loongarch/vector/lsx/lsx-vmskltz.c | 321 +++++++++++++ .../loongarch/vector/lsx/lsx-vmsknz.c | 104 +++++ .../loongarch/vector/lsx/lsx-vsigncov.c | 425 ++++++++++++++++++ 6 files changed, 1639 insertions(+) create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vabsd-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vabsd-2.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmskgez.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmskltz.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmsknz.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vsigncov.c diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vabsd-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vabsd-1.c new file mode 100644 index 00000000000..e336581f3b4 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vabsd-1.c @@ -0,0 +1,272 @@ +/* { dg-do run } */ +/* { dg-options "-mlsx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result; + __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result; + __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0xfda9b23a624082fd; + *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffff0000; + *((unsigned long *)&__m128i_result[1]) = 0x03574e3a62407e03; + *((unsigned long *)&__m128i_result[0]) = 0x0000000001010000; + __m128i_out = __lsx_vabsd_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x8000000080000000; + *((unsigned long *)&__m128i_op0[0]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m128i_op1[1]) = 0xfffd000700000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0014fff500000000; + *((unsigned long *)&__m128i_result[1]) = 0x7f03000780000000; + *((unsigned long *)&__m128i_result[0]) = 0x7f15000a7f010101; + __m128i_out = __lsx_vabsd_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x000000060000000e; + *((unsigned long *)&__m128i_op1[0]) = 0x000000127fffffea; + *((unsigned long *)&__m128i_result[1]) = 0x7f0101070101010f; + *((unsigned long *)&__m128i_result[0]) = 0x000000127f010116; + __m128i_out = __lsx_vabsd_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x000000000000000b; + *((unsigned long *)&__m128i_op0[0]) = 0x000000000000000b; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x000000000000000b; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000000b; + __m128i_out = __lsx_vabsd_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x67eb85af0000b000; + *((unsigned long *)&__m128i_op1[0]) = 0xc8847ef6ed3f2000; + *((unsigned long *)&__m128i_result[1]) = 0x67157b5100005000; + *((unsigned long *)&__m128i_result[0]) = 0x387c7e0a133f2000; + __m128i_out = __lsx_vabsd_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xfff7fffefffa01ff; + *((unsigned long *)&__m128i_op0[0]) = 0xfffbfffefffe01ff; + *((unsigned long *)&__m128i_op1[1]) = 0xfcfcfcfcfcfcfcfd; + *((unsigned long *)&__m128i_op1[0]) = 0xfcfcfcfcfcfcfcfd; + *((unsigned long *)&__m128i_result[1]) = 0x0305030203020502; + *((unsigned long *)&__m128i_result[0]) = 0x0301030203020502; + __m128i_out = __lsx_vabsd_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x4ee376188658d85f; + *((unsigned long *)&__m128i_op0[0]) = 0x5728dcc85ac760d2; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x4e1d76187a58285f; + *((unsigned long *)&__m128i_result[0]) = 0x572824385a39602e; + __m128i_out = __lsx_vabsd_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0xf654ad7447e59090; + *((unsigned long *)&__m128i_op1[0]) = 0x27b1b106b8145f50; + *((unsigned long *)&__m128i_result[1]) = 0x0a545374471b7070; + *((unsigned long *)&__m128i_result[0]) = 0x274f4f0648145f50; + __m128i_out = __lsx_vabsd_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x21f32eafa486fd38; + *((unsigned long *)&__m128i_op0[0]) = 0x407c2ca3d3430357; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x21f32eaf5b7a02c8; + *((unsigned long *)&__m128i_result[0]) = 0x407c2ca32cbd0357; + __m128i_out = __lsx_vabsd_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x000000003bfb4000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000003bfb4000; + __m128i_out = __lsx_vabsd_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000ffffffffffff; + *((unsigned long *)&__m128i_op1[0]) = 0x0000ffffffffffff; + *((unsigned long *)&__m128i_result[1]) = 0x0000000100010001; + *((unsigned long *)&__m128i_result[0]) = 0x0000000100010001; + __m128i_out = __lsx_vabsd_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffdf; + *((unsigned long *)&__m128i_op1[1]) = 0xffff0000ffff0000; + *((unsigned long *)&__m128i_op1[0]) = 0xffff0000ffff0000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m128i_result[0]) = 0x0000000100000021; + __m128i_out = __lsx_vabsd_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x003f0000ffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0x003f0000ffffffff; + *((unsigned long *)&__m128i_op1[1]) = 0x000700000004e000; + *((unsigned long *)&__m128i_op1[0]) = 0x0003000000012020; + *((unsigned long *)&__m128i_result[1]) = 0x0038000000051fff; + *((unsigned long *)&__m128i_result[0]) = 0x003c000000022021; + __m128i_out = __lsx_vabsd_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x9c9d9b9bbfaa20e9; + *((unsigned long *)&__m128i_op0[0]) = 0xbe081c963e6fee68; + *((unsigned long *)&__m128i_op1[1]) = 0x0000feff23560000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000fd1654860000; + *((unsigned long *)&__m128i_result[1]) = 0x6363636463abdf17; + *((unsigned long *)&__m128i_result[0]) = 0x41f8e08016161198; + __m128i_out = __lsx_vabsd_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001; + __m128i_out = __lsx_vabsd_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000800000000; + *((unsigned long *)&__m128i_op0[0]) = 0xff01fe0400000006; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x000000000005fffa; + *((unsigned long *)&__m128i_result[1]) = 0x0000000800000000; + *((unsigned long *)&__m128i_result[0]) = 0x00fe01fc0005fff4; + __m128i_out = __lsx_vabsd_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op1[1]) = 0xfffffffffffffffa; + *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffffa; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000005; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000005; + __m128i_out = __lsx_vabsd_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x010003f00000ff00; + *((unsigned long *)&__m128i_op0[0]) = 0x017f03000000ff00; + *((unsigned long *)&__m128i_op1[1]) = 0x010003f00000ff00; + *((unsigned long *)&__m128i_op1[0]) = 0x017f03000000ff00; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000001; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000001; + *((unsigned long *)&__m128i_op1[1]) = 0x000000001fffffff; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x000000001ffffffe; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001; + __m128i_out = __lsx_vabsd_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000ffac0a000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000ffac0a000000; + __m128i_out = __lsx_vabsd_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vabsd-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vabsd-2.c new file mode 100644 index 00000000000..c1af80e1463 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vabsd-2.c @@ -0,0 +1,398 @@ +/* { dg-do run } */ +/* { dg-options "-mlsx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result; + __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result; + __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0xa8beed87bc3f2be1; + *((unsigned long *)&__m128i_op0[0]) = 0x0024d8f6a494006a; + *((unsigned long *)&__m128i_op1[1]) = 0xfeffffffffffffff; + *((unsigned long *)&__m128i_op1[0]) = 0xfeffffffffffffff; + *((unsigned long *)&__m128i_result[1]) = 0x5641127843c0d41e; + *((unsigned long *)&__m128i_result[0]) = 0xfedb27095b6bff95; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000001; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000001; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x00000383ffff1fff; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x00000000ca354688; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000038335ca2777; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x00000000fff8fff8; + *((unsigned long *)&__m128i_op1[0]) = 0x00000000fff80000; + *((unsigned long *)&__m128i_result[1]) = 0x00000000fff8fff8; + *((unsigned long *)&__m128i_result[0]) = 0x00000000fff80000; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xfffd000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0xffffffff00000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0002ffff00000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000001fd0; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000001fd0; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000005; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000005; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000005; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000005; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000005; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000005; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000005; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000005; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffffffff0; + *((unsigned long *)&__m128i_op1[1]) = 0x00000000ff08ffff; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x00000000ff08ffff; + *((unsigned long *)&__m128i_result[0]) = 0xfffffffffffffff0; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000005; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000005; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0xfefff00000001fff; + *((unsigned long *)&__m128i_op1[1]) = 0xffe1ffc100000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000400000; + *((unsigned long *)&__m128i_result[1]) = 0xffe1ffc100000000; + *((unsigned long *)&__m128i_result[0]) = 0xfefff00000401fff; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_bu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0xff000000ff000000; + *((unsigned long *)&__m128i_op1[0]) = 0xff000000ff000000; + *((unsigned long *)&__m128i_result[1]) = 0xff000000ff000000; + *((unsigned long *)&__m128i_result[0]) = 0xff000000ff000000; + __m128i_out = __lsx_vabsd_hu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x13f9c5b60028a415; + *((unsigned long *)&__m128i_op0[0]) = 0x545cab1d7e57c415; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m128i_result[1]) = 0x13f9c5b60028a415; + *((unsigned long *)&__m128i_result[0]) = 0x545cab1d81a83bea; + __m128i_out = __lsx_vabsd_hu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x7fff010181010102; + *((unsigned long *)&__m128i_op0[0]) = 0x7fffffff81010102; + *((unsigned long *)&__m128i_op1[1]) = 0x7fff010181010102; + *((unsigned long *)&__m128i_op1[0]) = 0x7fffffff81010102; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_hu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_hu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_hu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffcfb799f1; + *((unsigned long *)&__m128i_op0[0]) = 0x0282800002828282; + *((unsigned long *)&__m128i_op1[1]) = 0x5555001400005111; + *((unsigned long *)&__m128i_op1[0]) = 0xffabbeab55110140; + *((unsigned long *)&__m128i_result[1]) = 0xaaaaffebcfb748e0; + *((unsigned long *)&__m128i_result[0]) = 0xfd293eab528e7ebe; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x7505443065413aed; + *((unsigned long *)&__m128i_op0[0]) = 0x0100d6effefd0498; + *((unsigned long *)&__m128i_op1[1]) = 0x7505443065413aed; + *((unsigned long *)&__m128i_op1[0]) = 0x0100d6effefd0498; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x56a09e662ab46b31; + *((unsigned long *)&__m128i_op0[0]) = 0xb4b8122ef4054bb3; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x56a09e662ab46b31; + *((unsigned long *)&__m128i_result[0]) = 0xb4b8122ef4054bb3; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffffff01ff01; + *((unsigned long *)&__m128i_op1[1]) = 0x3c600000ff800000; + *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffffe; + *((unsigned long *)&__m128i_result[1]) = 0xc39fffff007fffff; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000fe00fd; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x8006000080020000; + *((unsigned long *)&__m128i_op1[0]) = 0x8004000080020000; + *((unsigned long *)&__m128i_result[1]) = 0x8006000080020000; + *((unsigned long *)&__m128i_result[0]) = 0x8004000080020000; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x00000001ca02f854; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000100013fa0; + *((unsigned long *)&__m128i_result[1]) = 0x00000001ca02f854; + *((unsigned long *)&__m128i_result[0]) = 0x0000000100013fa0; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000400000004; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0xffffffff0015172b; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0xfffffffb00151727; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000400000004; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000400000004; + *((unsigned long *)&__m128i_result[1]) = 0xfffffffbfffffff8; + *((unsigned long *)&__m128i_result[0]) = 0xfffffffbfffffff8; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffdc; + *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000400000004; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000400000004; + *((unsigned long *)&__m128i_result[1]) = 0xfffffffbffffffd8; + *((unsigned long *)&__m128i_result[0]) = 0xfffffffbfffffff8; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_wu (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000003; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000003; + __m128i_out = __lsx_vabsd_du (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_du (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000006; + *((unsigned long *)&__m128i_op1[1]) = 0x000000490000004d; + *((unsigned long *)&__m128i_op1[0]) = 0x00000001ffffffff; + *((unsigned long *)&__m128i_result[1]) = 0x000000490000004d; + *((unsigned long *)&__m128i_result[0]) = 0x00000001fffffff9; + __m128i_out = __lsx_vabsd_du (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x4101010141010100; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x64b680a2ae3af8c8; + *((unsigned long *)&__m128i_op1[0]) = 0x161c0c363c200824; + *((unsigned long *)&__m128i_result[1]) = 0x23b57fa16d39f7c8; + *((unsigned long *)&__m128i_result[0]) = 0x161c0c363c200824; + __m128i_out = __lsx_vabsd_du (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x3ff0010000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x3ff0010000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x7ff0000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x7ff0000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x3fffff0000000000; + *((unsigned long *)&__m128i_result[0]) = 0x3fffff0000000000; + __m128i_out = __lsx_vabsd_du (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x1ffffffff8001000; + *((unsigned long *)&__m128i_op1[0]) = 0xf0bd80bd80bd8000; + *((unsigned long *)&__m128i_result[1]) = 0x1ffffffff8001000; + *((unsigned long *)&__m128i_result[0]) = 0xf0bd80bd80bd8000; + __m128i_out = __lsx_vabsd_du (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffff00; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffff00; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000008; + *((unsigned long *)&__m128i_op1[0]) = 0x0020002000200020; + *((unsigned long *)&__m128i_result[1]) = 0xfffffffffffffef8; + *((unsigned long *)&__m128i_result[0]) = 0xffdfffdfffdffee0; + __m128i_out = __lsx_vabsd_du (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x8080808080808080; + *((unsigned long *)&__m128i_op1[0]) = 0x8080808080808080; + *((unsigned long *)&__m128i_result[1]) = 0x8080808080808080; + *((unsigned long *)&__m128i_result[0]) = 0x8080808080808080; + __m128i_out = __lsx_vabsd_du (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_du (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x000000003ddc5dac; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x000000003ddc5dac; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vabsd_du (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmskgez.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmskgez.c new file mode 100644 index 00000000000..64a950f8135 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmskgez.c @@ -0,0 +1,119 @@ +/* { dg-do run } */ +/* { dg-options "-mlsx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result; + __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result; + __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0403cfcf01c1595e; + *((unsigned long *)&__m128i_op0[0]) = 0x837cd5db43fc55d4; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000cb4a; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffff7f01ff01; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000000d; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000100000001; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000100000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + int_out = __lsx_vpickve2gr_h (__m128i_op0, 0x2); + *((unsigned long *)&__m128i_op0[1]) = 0x0000010000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0xfe813f00fe813f00; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000033; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000fffe00006aea; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffce; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x8080808080808080; + *((unsigned long *)&__m128i_op0[0]) = 0x8080808080808080; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskgez_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmskltz.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmskltz.c new file mode 100644 index 00000000000..8f743ec2e77 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmskltz.c @@ -0,0 +1,321 @@ +/* { dg-do run } */ +/* { dg-options "-mlsx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result; + __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result; + __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000003; + __m128i_out = __lsx_vmskltz_d (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_d (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x007fffff00000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_w (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x85bd6b0e94d89998; + *((unsigned long *)&__m128i_op0[0]) = 0xd83c8081ffff8080; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000000f; + __m128i_out = __lsx_vmskltz_w (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x7505443065413aed; + *((unsigned long *)&__m128i_op0[0]) = 0x0100d6effefd0498; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000013d; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000001; + *((unsigned long *)&__m128i_op0[0]) = 0x00000000f0000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000002; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x000100010001fffd; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x000100010001007c; + *((unsigned long *)&__m128i_op0[0]) = 0x0001000100010001; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000010001; + *((unsigned long *)&__m128i_op0[0]) = 0x000000000001007c; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_d (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x1111113111111141; + *((unsigned long *)&__m128i_op0[0]) = 0x1111113111111121; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x9780697084f07dd7; + *((unsigned long *)&__m128i_op0[0]) = 0x87e3285243051cf3; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000cdc1; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x05d0ae6002e8748e; + *((unsigned long *)&__m128i_op0[0]) = 0xcd1de80217374041; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x00000000000065a0; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x00d3012acc56f9bb; + *((unsigned long *)&__m128i_op0[0]) = 0x00000000000000a0; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000004b01; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000020; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffbfffffffbf; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffbfffffffbf; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ff00; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x21201f1e1d1c1b1a; + *((unsigned long *)&__m128i_op0[0]) = 0x1918171615141312; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000000f; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x00000000ff08ffff; + *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffffffff0; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001; + __m128i_out = __lsx_vmskltz_d (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x370bdfecffecffec; + *((unsigned long *)&__m128i_op0[0]) = 0x370bdfecffecffec; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000003f3f; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_w (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_w (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_w (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000080000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000080000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000022; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000003; + __m128i_out = __lsx_vmskltz_d (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000008080600; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x000000007fff0018; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000004; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x6363636363636363; + *((unsigned long *)&__m128i_op0[0]) = 0x6363636363636363; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_w (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_w (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_w (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000035697d4e; + *((unsigned long *)&__m128i_op0[0]) = 0x000000013ecaadf2; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000006de1; + *((unsigned long *)&__m128i_op0[0]) = 0x5f9ccf33cf600000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_d (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_d (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000001; + *((unsigned long *)&__m128i_op0[0]) = 0x003ffffe00800000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000034; + __m128i_out = __lsx_vmskltz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x4399d3221a29d3f2; + *((unsigned long *)&__m128i_op0[0]) = 0xc3818bffe7b7a7b8; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001; + __m128i_out = __lsx_vmskltz_d (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x63636b6afe486741; + *((unsigned long *)&__m128i_op0[0]) = 0x41f8e880ffffffff; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000027; + __m128i_out = __lsx_vmskltz_h (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmskltz_d (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmsknz.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmsknz.c new file mode 100644 index 00000000000..d547af0d3aa --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmsknz.c @@ -0,0 +1,104 @@ +/* { dg-do run } */ +/* { dg-options "-mlsx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result; + __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result; + __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x000000017fff9000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000210011084; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000001e1f; + __m128i_out = __lsx_vmsknz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x9c9c9c9c9c9c9c9c; + *((unsigned long *)&__m128i_op0[0]) = 0x9c9c9c9c63636363; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmsknz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x009500b10113009c; + *((unsigned long *)&__m128i_op0[0]) = 0x009500b10113009c; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000005d5d; + __m128i_out = __lsx_vmsknz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xfffcfffcfffcfffc; + *((unsigned long *)&__m128i_op0[0]) = 0xfffcfffcfffcfffc; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmsknz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vmsknz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffffff000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x00000000000000fe; + __m128i_out = __lsx_vmsknz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x000fffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0x0010000000000001; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000007f41; + __m128i_out = __lsx_vmsknz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000ff00ff; + *((unsigned long *)&__m128i_op0[0]) = 0x0014001400140000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000554; + __m128i_out = __lsx_vmsknz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x8080808080808080; + *((unsigned long *)&__m128i_op0[0]) = 0x8080808080808080; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmsknz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x202544f490f2de35; + *((unsigned long *)&__m128i_op0[0]) = 0x202544f490f2de35; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff; + __m128i_out = __lsx_vmsknz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x00000a74aa8a55ab; + *((unsigned long *)&__m128i_op0[0]) = 0x6adeb5dfcb000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000003ff8; + __m128i_out = __lsx_vmsknz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x317fce80317fce80; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x000000000000ff00; + __m128i_out = __lsx_vmsknz_b (__m128i_op0); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vsigncov.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vsigncov.c new file mode 100644 index 00000000000..0fb1bc18f24 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vsigncov.c @@ -0,0 +1,425 @@ +/* { dg-do run } */ +/* { dg-options "-mlsx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result; + __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result; + __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0xffffffff00000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x00003f803f800100; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000001; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000001; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x52527d7d52527d7d; + *((unsigned long *)&__m128i_op1[0]) = 0x52527d7d52527d7d; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x870968c1f56bb3cd; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xf000e001bf84df83; + *((unsigned long *)&__m128i_op0[0]) = 0xfff8e001ff84e703; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x00000000ca354688; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0xffffffff35cab978; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000001; + *((unsigned long *)&__m128i_op1[0]) = 0x6a57a30ff0000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x000000000000000d; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xfe00fe00fe00fd01; + *((unsigned long *)&__m128i_op0[0]) = 0xfe00fffefe0100f6; + *((unsigned long *)&__m128i_op1[1]) = 0xffffffff00000001; + *((unsigned long *)&__m128i_op1[0]) = 0xffffff0000010000; + *((unsigned long *)&__m128i_result[1]) = 0x0100010000000001; + *((unsigned long *)&__m128i_result[0]) = 0x0100010000010000; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000020000000; + *((unsigned long *)&__m128i_op0[0]) = 0x000000183fffffe5; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000400000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000400000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0xffff3d06ffff4506; + *((unsigned long *)&__m128i_op1[0]) = 0x7ffffffe7ffff800; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op1[1]) = 0x000a000a000a000a; + *((unsigned long *)&__m128i_op1[0]) = 0x000a000a000a000a; + *((unsigned long *)&__m128i_result[1]) = 0xfff6fff6fff6fff6; + *((unsigned long *)&__m128i_result[0]) = 0xfff6fff6fff6fff6; + __m128i_out = __lsx_vsigncov_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x3fffff0000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x3fffff0000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x3f8000003f800000; + *((unsigned long *)&__m128i_op1[0]) = 0x3f8000003f800000; + *((unsigned long *)&__m128i_result[1]) = 0x3f80000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x3f80000000000000; + __m128i_out = __lsx_vsigncov_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xfff8fff8fff8fff8; + *((unsigned long *)&__m128i_op0[0]) = 0xfff8fff8fff8fff8; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op1[1]) = 0x52525252525252cb; + *((unsigned long *)&__m128i_op1[0]) = 0x52525252525252cb; + *((unsigned long *)&__m128i_result[1]) = 0xaeaeaeaeaeaeae35; + *((unsigned long *)&__m128i_result[0]) = 0xaeaeaeaeaeaeae35; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x370bdfecffecffec; + *((unsigned long *)&__m128i_op0[0]) = 0x370bdfecffecffec; + *((unsigned long *)&__m128i_op1[1]) = 0x370bdfecffecffec; + *((unsigned long *)&__m128i_op1[0]) = 0x370bdfecffecffec; + *((unsigned long *)&__m128i_result[1]) = 0x370bdfec00130014; + *((unsigned long *)&__m128i_result[0]) = 0x370bdfec00130014; + __m128i_out = __lsx_vsigncov_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0002020002020200; + *((unsigned long *)&__m128i_op0[0]) = 0x021f3b0205150600; + *((unsigned long *)&__m128i_op1[1]) = 0x0001000300400002; + *((unsigned long *)&__m128i_op1[0]) = 0x000100010040fffb; + *((unsigned long *)&__m128i_result[1]) = 0x0001000300400002; + *((unsigned long *)&__m128i_result[0]) = 0x000100010040fffb; + __m128i_out = __lsx_vsigncov_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x00000000ff801c9e; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000810000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0080008000800080; + *((unsigned long *)&__m128i_op1[0]) = 0x008003496dea0c61; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0101000100010001; + *((unsigned long *)&__m128i_op0[0]) = 0x0101030100010001; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000400000004; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000400000004; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000400000004; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000400000004; + *((unsigned long *)&__m128i_result[1]) = 0x0000000400000004; + *((unsigned long *)&__m128i_result[0]) = 0x0000000400000004; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op1[1]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000004; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000004; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_op1[1]) = 0x1ab6021f72496458; + *((unsigned long *)&__m128i_op1[0]) = 0x7750af4954c29940; + *((unsigned long *)&__m128i_result[1]) = 0xe64afee18eb79ca8; + *((unsigned long *)&__m128i_result[0]) = 0x89b051b7ac3e67c0; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x441ba9fcffffffff; + *((unsigned long *)&__m128i_op0[0]) = 0x181b2541ffffffff; + *((unsigned long *)&__m128i_op1[1]) = 0x7fffffff7ffffffe; + *((unsigned long *)&__m128i_op1[0]) = 0x7fffffff7ffffffe; + *((unsigned long *)&__m128i_result[1]) = 0x7fff010181010102; + *((unsigned long *)&__m128i_result[0]) = 0x7fffffff81010102; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x00000000045340a6; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000028404044; + *((unsigned long *)&__m128i_op1[1]) = 0x003f0000ffffffff; + *((unsigned long *)&__m128i_op1[0]) = 0x003f0000ffffffff; + *((unsigned long *)&__m128i_result[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m128i_result[0]) = 0x00000000ffffffff; + __m128i_out = __lsx_vsigncov_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0010001000000010; + *((unsigned long *)&__m128i_op0[0]) = 0x0010001000100010; + *((unsigned long *)&__m128i_op1[1]) = 0x67eb85afb2ebb000; + *((unsigned long *)&__m128i_op1[0]) = 0xc8847ef6ed3f2000; + *((unsigned long *)&__m128i_result[1]) = 0x67eb85af0000b000; + *((unsigned long *)&__m128i_result[0]) = 0xc8847ef6ed3f2000; + __m128i_out = __lsx_vsigncov_h (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000100000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000103; + *((unsigned long *)&__m128i_op1[1]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_result[1]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_result[0]) = 0xfffffffffffffffc; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffffffffc; + *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_w (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000034; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000001; + *((unsigned long *)&__m128i_op1[0]) = 0x003ffffe00800000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x004001be00dc008e; + *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x00ffff0100010001; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0xfff9fffefff9ffff; + *((unsigned long *)&__m128i_op1[1]) = 0x04faf60009f5f092; + *((unsigned long *)&__m128i_op1[0]) = 0x04fafa9200000000; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0xfc06066e00000000; + __m128i_out = __lsx_vsigncov_b (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000001; + *((unsigned long *)&__m128i_op0[0]) = 0x00000000fffe0002; + *((unsigned long *)&__m128i_op1[1]) = 0x000000000667ae56; + *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000020; + *((unsigned long *)&__m128i_result[1]) = 0x000000000667ae56; + *((unsigned long *)&__m128i_result[0]) = 0x0000000000000020; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op0[0]) = 0x0002000100020002; + *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_op1[0]) = 0x0002000100020002; + *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m128i_result[0]) = 0x0002000100020002; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + *((unsigned long *)&__m128i_op0[1]) = 0x0001000100010012; + *((unsigned long *)&__m128i_op0[0]) = 0x00000000ffe1ffc0; + *((unsigned long *)&__m128i_op1[1]) = 0x0001000100010012; + *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffe1ffc0; + *((unsigned long *)&__m128i_result[1]) = 0x0001000100010012; + *((unsigned long *)&__m128i_result[0]) = 0x00000000ffe1ffc0; + __m128i_out = __lsx_vsigncov_d (__m128i_op0, __m128i_op1); + ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); + + return 0; +}