From patchwork Wed Sep 13 03:38:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiaolong X-Patchwork-Id: 138615 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp837419vqx; Tue, 12 Sep 2023 20:59:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFm1Pec64K3uKRJM9WHYY7ZcCo2w0MlljCOc5KhRiBV0x72ILLzc+8d4fgSrjs0LrsVvrFA X-Received: by 2002:aa7:d682:0:b0:522:ab06:7213 with SMTP id d2-20020aa7d682000000b00522ab067213mr1083367edr.27.1694577572453; Tue, 12 Sep 2023 20:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694577572; cv=none; d=google.com; s=arc-20160816; b=df5DGAFgilj69il40zod2m0HzJgE3/C0ZrY+h1K+mADTfFP4sFX11H2BXpyMgfTvGZ /z0uCvtI3+YDwm6gC3CxqXbKRExQNtVTMYu5eP7yUn2ks3gWL17HOVdjsfVjxQYIhCxZ cpBliWIgh3ahhiDZGzKsh6gvKzWr7MGOjH/bJxUAK4KRtKQRuOqDy95qDz2xFG9Ft2y+ FVJby71Dzr6jKhp3eUKwsmPMSEyVpl9tlkL48Dklno3uekyqEuNFLrsGv+vLluGj8Yi8 b6FBYBnEEDtgOXluhD5Sz5dPfRmQcXgPvpGV6tPrs0hYZgxzTU/3/qpUQVHaapEj6RYA o5PA== 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=KqPqlP8BT/4oWut7qAvxMg/j96GhAW1CuIrahH4+Qf8=; fh=3pFUYcpS/27XRzOf17GfR86AuNQu+P1CET04YURgCLs=; b=p7SVqKxnktA/YlAP9y8HHM36j8YoeG9XBboQpSnoJfbuOsyWdRqdecgwP+YKW4er04 vQ5UBwZV7YSXPTmtwfaBo60F68LlDvqxrO0zQ4C1CKcQ3QNIiutxWai27+GBmb/VKfqE kPzvZ0ou9lj5hcWndRUEvctXmA5N2cQwi0DptrQYRM9bMhB/qnbxlcw537giftUrKZ2R GYO4hIy3s9lbZ2HH0lk9hWTeaFp7fJPWBKHs/MDDOPRHeF8edeDhFTDyeaLtQ7J1CVTU iydA/Z/15Go+mLFL0Yl680yvei8nttYnzK3f/O7fZ4rET9VFejPEdx1iK8v3ejjqOSxs 4Taw== 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 c20-20020aa7d614000000b0052889552052si10185150edr.270.2023.09.12.20.59.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 20:59:32 -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 C44883831D9B for ; Wed, 13 Sep 2023 03:41:46 +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 30D0A3830B40 for ; Wed, 13 Sep 2023 03:39:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 30D0A3830B40 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 _____8DxxPDmLgFlTjEmAA--.9332S3; Wed, 13 Sep 2023 11:39:18 +0800 (CST) Received: from slurm-master.loongson.cn (unknown [10.10.130.252]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxK9zYLgFlsRACAA--.3526S9; Wed, 13 Sep 2023 11:39:17 +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 05/22] LoongArch: Add tests for ASX vector xvmax/xvmaxi/xvmin/xvmini instructions. Date: Wed, 13 Sep 2023 11:38:42 +0800 Message-Id: <20230913033859.6734-6-chenxiaolong@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230913033859.6734-1-chenxiaolong@loongson.cn> References: <20230913033859.6734-1-chenxiaolong@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8BxK9zYLgFlsRACAA--.3526S9 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQANBWUBHCIBLgAAs8 X-Coremail-Antispam: 1Uk129KBj9DXoWkCFykKrW7ZrW8XFW8ur43twc_yoW5JrW7Wr g_JF1UJFW0gFsa9r1kXr1UZF98Wr17GwnFv3WUCF1vq3WSyw4kA3s8AF12gw17Kw1UZrnx AFyDuryUGrs8Gry8KosvyTuYvTs0mTUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1T uYvTs0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9f nUUIcSsGvfJTRUUUbckYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4 v20xvaj40_Wr0E3s1l1IIY67AEw4v_JrI_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0 rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267 AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7Cj xVAFwI0_Gr1j6F4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zV CFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVW3AVW8Xw1lYx0E x4A2jsIE14v26F4j6r4UJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42 xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWU GwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI4 8JMIIF0xvE2Ix0cI8IcVAFwI0_tr0E3s1lIxAIcVC0I7IYx2IY6xkF7I0E14v26F4j6r4U JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Cr0_Gr1UMIIF0x vEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07jzoGQUUUUU= X-Spam-Status: No, score=-12.8 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: 1776893372709770102 X-GMAIL-MSGID: 1776893372709770102 gcc/testsuite/ChangeLog: * gcc.target/loongarch/vector/lasx/lasx-xvmax-1.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvmax-2.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvmaxi-1.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvmaxi-2.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvmin-1.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvmin-2.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvmini-1.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvmini-2.c: New test. --- .../loongarch/vector/lasx/lasx-xvmax-1.c | 545 ++++++++++++++ .../loongarch/vector/lasx/lasx-xvmax-2.c | 560 +++++++++++++++ .../loongarch/vector/lasx/lasx-xvmaxi-1.c | 471 ++++++++++++ .../loongarch/vector/lasx/lasx-xvmaxi-2.c | 504 +++++++++++++ .../loongarch/vector/lasx/lasx-xvmin-1.c | 575 +++++++++++++++ .../loongarch/vector/lasx/lasx-xvmin-2.c | 680 ++++++++++++++++++ .../loongarch/vector/lasx/lasx-xvmini-1.c | 416 +++++++++++ .../loongarch/vector/lasx/lasx-xvmini-2.c | 284 ++++++++ 8 files changed, 4035 insertions(+) create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmax-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmax-2.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmaxi-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmaxi-2.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmin-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmin-2.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmini-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmini-2.c diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmax-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmax-1.c new file mode 100644 index 00000000000..96c6671f247 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmax-1.c @@ -0,0 +1,545 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x7f0000007f000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x7f0000007f000000; + __m256i_out = __lasx_xvmax_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffff000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffff000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffff000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffff000000; + __m256i_out = __lasx_xvmax_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x7f00000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x7fff000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x7fff000000000000; + __m256i_out = __lasx_xvmax_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0004000400040004; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0004000400040004; + __m256i_out = __lasx_xvmax_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x5980000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x5980000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x5900000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x5900000000000000; + __m256i_out = __lasx_xvmax_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[2]) = 0x00ff00ff00ffce20; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[0]) = 0x00ff00ff00ffce20; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000ee1100; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000004560408; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000ee1100; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000004560408; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000ff1100; + *((unsigned long *)&__m256i_result[2]) = 0x0000000004560420; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000ff1100; + *((unsigned long *)&__m256i_result[0]) = 0x0000000004560420; + __m256i_out = __lasx_xvmax_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000001ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000001ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x00000001ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00000001ffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000000; + __m256i_out = __lasx_xvmax_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000100; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000100; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000100; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000100; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000100; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000100; + __m256i_out = __lasx_xvmax_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000007f433c78; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000007f433c78; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000007f433c78; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000007f433c78; + __m256i_out = __lasx_xvmax_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff01ff01ff01ff01; + *((unsigned long *)&__m256i_op0[2]) = 0xff01ff01ff01ff01; + *((unsigned long *)&__m256i_op0[1]) = 0xff01ff01ff01ff01; + *((unsigned long *)&__m256i_op0[0]) = 0xff01ff01ff01ff01; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvmax_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000ffffffce; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000ffffffce; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x7ff0000000000000; + __m256i_out = __lasx_xvmax_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[2]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[0]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[2]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[0]) = 0x00ff00ff00ff00ff; + __m256i_out = __lasx_xvmax_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x4000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x4000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x4000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x4000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x4000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x4000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x4000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x4000000000000000; + __m256i_out = __lasx_xvmax_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffff800080000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffff800080000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000e0000000e; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000e0000000e; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000e0000000e; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000e0000000e; + *((unsigned long *)&__m256i_op1[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[2]) = 0x0001000400010004; + *((unsigned long *)&__m256i_op1[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[0]) = 0x0001000400010004; + *((unsigned long *)&__m256i_result[3]) = 0x0001000e0001000e; + *((unsigned long *)&__m256i_result[2]) = 0x0001000e0001000e; + *((unsigned long *)&__m256i_result[1]) = 0x0001000e0001000e; + *((unsigned long *)&__m256i_result[0]) = 0x0001000e0001000e; + __m256i_out = __lasx_xvmax_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0080000000000002; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0080000000000002; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0080000000000002; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0080000000000002; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x1090918800000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x1090918800000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x1c80780000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000004000; + *((unsigned long *)&__m256i_op1[1]) = 0x1c80780000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000004000; + *((unsigned long *)&__m256i_result[3]) = 0x1c80780000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000004000; + *((unsigned long *)&__m256i_result[1]) = 0x1c80780000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000004000; + __m256i_out = __lasx_xvmax_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_op1[2]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_op1[1]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_op1[0]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op1[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op1[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op1[0]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvmax_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmax_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x9ff87ef07f7f817f; + *((unsigned long *)&__m256i_op1[2]) = 0x7f807f007f7f817f; + *((unsigned long *)&__m256i_op1[1]) = 0x9ff87ef07f7f817f; + *((unsigned long *)&__m256i_op1[0]) = 0x7f807f007f7f817f; + *((unsigned long *)&__m256i_result[3]) = 0x000000007f7f817f; + *((unsigned long *)&__m256i_result[2]) = 0x7f807f007f7f817f; + *((unsigned long *)&__m256i_result[1]) = 0x000000007f7f817f; + *((unsigned long *)&__m256i_result[0]) = 0x7f807f007f7f817f; + __m256i_out = __lasx_xvmax_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xfffffebeeaaefafb; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffebeeaaeeeeb; + *((unsigned long *)&__m256i_op1[1]) = 0xfffffebeeaaefafb; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffebeeaaeeeeb; + *((unsigned long *)&__m256i_result[3]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xebebebebebebebeb; + *((unsigned long *)&__m256i_op0[2]) = 0xebebebebebebebeb; + *((unsigned long *)&__m256i_op0[1]) = 0xebebebebebebebeb; + *((unsigned long *)&__m256i_op0[0]) = 0xebebebebebebebeb; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000000ff00; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000000ff00; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000ff00; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000ff00; + __m256i_out = __lasx_xvmax_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000038ea4d4a; + *((unsigned long *)&__m256i_op1[2]) = 0x7fff00007fff0000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000038ea4d4a; + *((unsigned long *)&__m256i_op1[0]) = 0x7fff00007fff0000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000038ea4d4a; + *((unsigned long *)&__m256i_result[2]) = 0x7fff00007fff0000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000038ea4d4a; + *((unsigned long *)&__m256i_result[0]) = 0x7fff00007fff0000; + __m256i_out = __lasx_xvmax_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffff97a2; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffff97a2; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmax_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffffffbfffc; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000001000000010; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000001000000010; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000001000000010; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000001000000010; + __m256i_out = __lasx_xvmax_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000004a557baac4; + *((unsigned long *)&__m256i_op1[2]) = 0x556caad9aabbaa88; + *((unsigned long *)&__m256i_op1[1]) = 0x0000004a557baac4; + *((unsigned long *)&__m256i_op1[0]) = 0x556caad9aabbaa88; + *((unsigned long *)&__m256i_result[3]) = 0x0000004a557baac4; + *((unsigned long *)&__m256i_result[2]) = 0x556caad9aabbaa88; + *((unsigned long *)&__m256i_result[1]) = 0x0000004a557baac4; + *((unsigned long *)&__m256i_result[0]) = 0x556caad9aabbaa88; + __m256i_out = __lasx_xvmax_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000020006; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000020006; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000020006; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000020006; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000020006; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000020006; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000020006; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000020006; + __m256i_out = __lasx_xvmax_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffff0000000f; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffff0000000d; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffff0000000f; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffff0000000d; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op0[1]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op1[3]) = 0xfffeb6839ffffd80; + *((unsigned long *)&__m256i_op1[2]) = 0xfffe97c020010001; + *((unsigned long *)&__m256i_op1[1]) = 0xfffeb6839ffffd80; + *((unsigned long *)&__m256i_op1[0]) = 0xfffe97c020010001; + *((unsigned long *)&__m256i_result[3]) = 0xfffeb6839ffffd80; + *((unsigned long *)&__m256i_result[2]) = 0xfffe97c020010001; + *((unsigned long *)&__m256i_result[1]) = 0xfffeb6839ffffd80; + *((unsigned long *)&__m256i_result[0]) = 0xfffe97c020010001; + __m256i_out = __lasx_xvmax_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmax-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmax-2.c new file mode 100644 index 00000000000..38f2c0afec0 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmax-2.c @@ -0,0 +1,560 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffdfffffffdfffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffdfffffffdfffff; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmax_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ffee0000ff4c; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ff050000ff3c; + *((unsigned long *)&__m256i_op1[1]) = 0x0000fff90000ff78; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffa80000ff31; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmax_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000000000fe; + *((unsigned long *)&__m256i_op0[2]) = 0x817f11ed81800ff0; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000000000fe; + *((unsigned long *)&__m256i_op0[0]) = 0x817f11ed81800ff0; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00000000000000fe; + *((unsigned long *)&__m256i_result[2]) = 0x817f11ed81800ff0; + *((unsigned long *)&__m256i_result[1]) = 0x00000000000000fe; + *((unsigned long *)&__m256i_result[0]) = 0x817f11ed81800ff0; + __m256i_out = __lasx_xvmax_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmax_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00003fe000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00003fe000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00003fe000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00003fe000000000; + __m256i_out = __lasx_xvmax_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op0[2]) = 0x800000ff800000ff; + *((unsigned long *)&__m256i_op0[1]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op0[0]) = 0x800000ff800000ff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x8000800080008000; + *((unsigned long *)&__m256i_result[2]) = 0x800000ff800000ff; + *((unsigned long *)&__m256i_result[1]) = 0x8000800080008000; + *((unsigned long *)&__m256i_result[0]) = 0x800000ff800000ff; + __m256i_out = __lasx_xvmax_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x8000000000000000; + __m256i_out = __lasx_xvmax_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff00000001; + *((unsigned long *)&__m256i_op0[2]) = 0x1010100f10100fd4; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff00000001; + *((unsigned long *)&__m256i_op0[0]) = 0x1010100f10100fd4; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000ffeeffaf; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000011; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000ffeeffaf; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000011; + *((unsigned long *)&__m256i_result[3]) = 0x0000ffffffeeffaf; + *((unsigned long *)&__m256i_result[2]) = 0x1010100f10100fd4; + *((unsigned long *)&__m256i_result[1]) = 0x0000ffffffeeffaf; + *((unsigned long *)&__m256i_result[0]) = 0x1010100f10100fd4; + __m256i_out = __lasx_xvmax_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000f0f0f0f0; + *((unsigned long *)&__m256i_op1[2]) = 0xf0f0f0f0f0f0f0f0; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000f0f0f0f0; + *((unsigned long *)&__m256i_op1[0]) = 0xf0f0f0f0f0f0f0f0; + *((unsigned long *)&__m256i_result[3]) = 0x00000000f0f0f0f0; + *((unsigned long *)&__m256i_result[2]) = 0xf0f0f0f0f0f0f0f0; + *((unsigned long *)&__m256i_result[1]) = 0x00000000f0f0f0f0; + *((unsigned long *)&__m256i_result[0]) = 0xf0f0f0f0f0f0f0f0; + __m256i_out = __lasx_xvmax_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xc03ae000ffff6000; + *((unsigned long *)&__m256i_op1[2]) = 0xc600000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xc03ae000ffff6000; + *((unsigned long *)&__m256i_op1[0]) = 0xc600000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xc03ae000ffff6000; + *((unsigned long *)&__m256i_result[2]) = 0xc600000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xc03ae000ffff6000; + *((unsigned long *)&__m256i_result[0]) = 0xc600000000000000; + __m256i_out = __lasx_xvmax_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[0]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvmax_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffd8ffc7ffdaff8a; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffd8ffc7ffdaff8a; + *((unsigned long *)&__m256i_op1[3]) = 0x0000d0d8ffffeecf; + *((unsigned long *)&__m256i_op1[2]) = 0x0000383fffffdf0d; + *((unsigned long *)&__m256i_op1[1]) = 0x0000d0d8ffffeecf; + *((unsigned long *)&__m256i_op1[0]) = 0x0000383fffffdf0d; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffd8ffc7ffffdf0d; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffd8ffc7ffffdf0d; + __m256i_out = __lasx_xvmax_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x00000003f8000004; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x00000003f8000004; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00000003f8000004; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x00000003f8000004; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000014402080144; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000014402080144; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000014402080144; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000014402080144; + __m256i_out = __lasx_xvmax_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000007f433c78; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000007f433c78; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000000a0008; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000000a0008; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000007f433c78; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000007f433c78; + __m256i_out = __lasx_xvmax_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffff97a2; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffff97a2; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffff97a2; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ffff97a2; + __m256i_out = __lasx_xvmax_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000600000006; + *((unsigned long *)&__m256i_op0[2]) = 0x000000070002000a; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000600000006; + *((unsigned long *)&__m256i_op0[0]) = 0x000000070002000a; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000600000006; + *((unsigned long *)&__m256i_op1[2]) = 0x000000070002000a; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000600000006; + *((unsigned long *)&__m256i_op1[0]) = 0x000000070002000a; + *((unsigned long *)&__m256i_result[3]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[2]) = 0x000000070002000a; + *((unsigned long *)&__m256i_result[1]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[0]) = 0x000000070002000a; + __m256i_out = __lasx_xvmax_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000004fb; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000000004fb; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000000004fb; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff00ff00000007; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000000e7; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff00ff00000007; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000007; + *((unsigned long *)&__m256i_op1[3]) = 0x0000080000000800; + *((unsigned long *)&__m256i_op1[2]) = 0xfffcf800fffcf800; + *((unsigned long *)&__m256i_op1[1]) = 0x0000080000000800; + *((unsigned long *)&__m256i_op1[0]) = 0x0000080000000800; + *((unsigned long *)&__m256i_result[3]) = 0x00ff00ff00000007; + *((unsigned long *)&__m256i_result[2]) = 0xfffcf800fffcf800; + *((unsigned long *)&__m256i_result[1]) = 0x00ff00ff00000007; + *((unsigned long *)&__m256i_result[0]) = 0x0000080000000800; + __m256i_out = __lasx_xvmax_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000005e02; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000005e02; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmax_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000002a5429; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000002a5429; + *((unsigned long *)&__m256i_op1[3]) = 0xffffc7418a023680; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffff8845bb954b00; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffc7418a023680; + *((unsigned long *)&__m256i_result[2]) = 0x00000000002a5429; + *((unsigned long *)&__m256i_result[1]) = 0xffff8845bb954b00; + *((unsigned long *)&__m256i_result[0]) = 0x00000000002a5429; + __m256i_out = __lasx_xvmax_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmax_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmax_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffffffefefefe; + *((unsigned long *)&__m256i_op0[2]) = 0x000000003f800000; + *((unsigned long *)&__m256i_op0[1]) = 0xfffffffffefefefe; + *((unsigned long *)&__m256i_op0[0]) = 0x000000003f800000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000040404040; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000040404040; + *((unsigned long *)&__m256i_result[3]) = 0xfffffffffefefefe; + *((unsigned long *)&__m256i_result[2]) = 0x0000000040404040; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffffefefefe; + *((unsigned long *)&__m256i_result[0]) = 0x0000000040404040; + __m256i_out = __lasx_xvmax_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvmax_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000001400; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000003c01ff9; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000003c01ff9; + *((unsigned long *)&__m256i_op1[3]) = 0xfffffffff08a7de0; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffffff07c4170; + *((unsigned long *)&__m256i_op1[1]) = 0xfffffffff08a7de0; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffffff07c4170; + *((unsigned long *)&__m256i_result[3]) = 0xfffffffff08a7de0; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffff07c4170; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffff08a7de0; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffff07c4170; + __m256i_out = __lasx_xvmax_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmax_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmaxi-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmaxi-1.c new file mode 100644 index 00000000000..e804a0a45ec --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmaxi-1.c @@ -0,0 +1,471 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0xffffd10000006459; + *((unsigned long *)&__m256i_op0[2]) = 0x0000441000000004; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000004; + *((unsigned long *)&__m256i_op0[0]) = 0x0000040400000104; + *((unsigned long *)&__m256i_result[3]) = 0x0f0f0f0f0f0f6459; + *((unsigned long *)&__m256i_result[2]) = 0x0f0f44100f0f0f0f; + *((unsigned long *)&__m256i_result[1]) = 0x0f0f0f0f0f0f0f0f; + *((unsigned long *)&__m256i_result[0]) = 0x0f0f0f0f0f0f0f0f; + __m256i_out = __lasx_xvmaxi_b (__m256i_op0, 15); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8080808180808093; + *((unsigned long *)&__m256i_op0[2]) = 0x80808081808080fe; + *((unsigned long *)&__m256i_op0[1]) = 0x8080808180808093; + *((unsigned long *)&__m256i_op0[0]) = 0x80808081808080fb; + *((unsigned long *)&__m256i_result[3]) = 0xf5f5f5f5f5f5f5f5; + *((unsigned long *)&__m256i_result[2]) = 0xf5f5f5f5f5f5f5fe; + *((unsigned long *)&__m256i_result[1]) = 0xf5f5f5f5f5f5f5f5; + *((unsigned long *)&__m256i_result[0]) = 0xf5f5f5f5f5f5f5fb; + __m256i_out = __lasx_xvmaxi_b (__m256i_op0, -11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0909090909090909; + *((unsigned long *)&__m256i_result[2]) = 0x0909090909090909; + *((unsigned long *)&__m256i_result[1]) = 0x0909090909090909; + *((unsigned long *)&__m256i_result[0]) = 0x0909090909090909; + __m256i_out = __lasx_xvmaxi_b (__m256i_op0, 9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmaxi_b (__m256i_op0, -4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0002000200020002; + *((unsigned long *)&__m256i_result[3]) = 0x0d0d0d0d0d0d0d0d; + *((unsigned long *)&__m256i_result[2]) = 0x0d0d0d0d0d0d0d0d; + *((unsigned long *)&__m256i_result[1]) = 0x0d0d0d0d0d0d0d0d; + *((unsigned long *)&__m256i_result[0]) = 0x0d0d0d0d0d0d0d0d; + __m256i_out = __lasx_xvmaxi_b (__m256i_op0, 13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0a0a0a0a7f0a0a0a; + *((unsigned long *)&__m256i_result[2]) = 0x0a0a0a0a7f0a0a0a; + *((unsigned long *)&__m256i_result[1]) = 0x0a0a0a0a7f0a0a0a; + *((unsigned long *)&__m256i_result[0]) = 0x0a0a0a0a7f0a0a0a; + __m256i_out = __lasx_xvmaxi_b (__m256i_op0, 10); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0707070707070707; + *((unsigned long *)&__m256i_result[2]) = 0x0707070707070707; + *((unsigned long *)&__m256i_result[1]) = 0x0707070707070707; + *((unsigned long *)&__m256i_result[0]) = 0x0707070707070707; + __m256i_out = __lasx_xvmaxi_b (__m256i_op0, 7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0d0d0d0d0d0d0d0d; + *((unsigned long *)&__m256i_result[2]) = 0x0d0d0d0d0d0d0d0d; + *((unsigned long *)&__m256i_result[1]) = 0x0d0d0d0d0d0d0d0d; + *((unsigned long *)&__m256i_result[0]) = 0x0d0d0d0d0d0d0d0d; + __m256i_out = __lasx_xvmaxi_b (__m256i_op0, 13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x2a2a2a2a2a2a2a2a; + *((unsigned long *)&__m256i_op0[2]) = 0x2a2a2a2a2a2a2a2a; + *((unsigned long *)&__m256i_op0[1]) = 0x2a2a2a2a2a2a2a2a; + *((unsigned long *)&__m256i_op0[0]) = 0x2a2a2a2a2a2a2a2a; + *((unsigned long *)&__m256i_result[3]) = 0x2a2a2a2a2a2a2a2a; + *((unsigned long *)&__m256i_result[2]) = 0x2a2a2a2a2a2a2a2a; + *((unsigned long *)&__m256i_result[1]) = 0x2a2a2a2a2a2a2a2a; + *((unsigned long *)&__m256i_result[0]) = 0x2a2a2a2a2a2a2a2a; + __m256i_out = __lasx_xvmaxi_b (__m256i_op0, -14); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmaxi_b (__m256i_op0, 0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0c0c0c0c0c0c0c0c; + *((unsigned long *)&__m256i_result[2]) = 0x0c0c0c0c0c0c0c0c; + *((unsigned long *)&__m256i_result[1]) = 0x0c0c0c0c0c0c0c0c; + *((unsigned long *)&__m256i_result[0]) = 0x0c0c0c0c0c0c0c0c; + __m256i_out = __lasx_xvmaxi_b (__m256i_op0, 12); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0005000500050005; + *((unsigned long *)&__m256i_result[2]) = 0x0005000500050005; + *((unsigned long *)&__m256i_result[1]) = 0x0005000500050005; + *((unsigned long *)&__m256i_result[0]) = 0x0005000500050005; + __m256i_out = __lasx_xvmaxi_h (__m256i_op0, 5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[0]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvmaxi_h (__m256i_op0, -11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffc0ffc0ffc0ffc0; + *((unsigned long *)&__m256i_op0[2]) = 0xffc00000ffc0ffc0; + *((unsigned long *)&__m256i_op0[1]) = 0xffc0ffc0ffc0ffc0; + *((unsigned long *)&__m256i_op0[0]) = 0xffc00000ffc0ffc0; + *((unsigned long *)&__m256i_result[3]) = 0xfff9fff9fff9fff9; + *((unsigned long *)&__m256i_result[2]) = 0xfff90000fff9fff9; + *((unsigned long *)&__m256i_result[1]) = 0xfff9fff9fff9fff9; + *((unsigned long *)&__m256i_result[0]) = 0xfff90000fff9fff9; + __m256i_out = __lasx_xvmaxi_h (__m256i_op0, -7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmaxi_h (__m256i_op0, -13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[2]) = 0x00ff00ff000c0000; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[0]) = 0x00ff00ff00040000; + *((unsigned long *)&__m256i_result[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[2]) = 0x00ff00ff000c0000; + *((unsigned long *)&__m256i_result[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[0]) = 0x00ff00ff00040000; + __m256i_out = __lasx_xvmaxi_h (__m256i_op0, -2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000000001ff; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffe0000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000000001ff; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffe0000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00080008000801ff; + *((unsigned long *)&__m256i_result[2]) = 0x0008000800080008; + *((unsigned long *)&__m256i_result[1]) = 0x00080008000801ff; + *((unsigned long *)&__m256i_result[0]) = 0x0008000800080008; + __m256i_out = __lasx_xvmaxi_h (__m256i_op0, 8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmaxi_h (__m256i_op0, 0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000000c9; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000000c9; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000000000c9; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000000000c9; + __m256i_out = __lasx_xvmaxi_h (__m256i_op0, -15); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff8000ffa3; + *((unsigned long *)&__m256i_op0[2]) = 0x000000008000165a; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff8000ffa3; + *((unsigned long *)&__m256i_op0[0]) = 0x000000008000165a; + *((unsigned long *)&__m256i_result[3]) = 0x0009000900090009; + *((unsigned long *)&__m256i_result[2]) = 0x000900090009165a; + *((unsigned long *)&__m256i_result[1]) = 0x0009000900090009; + *((unsigned long *)&__m256i_result[0]) = 0x000900090009165a; + __m256i_out = __lasx_xvmaxi_h (__m256i_op0, 9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmaxi_h (__m256i_op0, 0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfd12fd12fd12fd12; + *((unsigned long *)&__m256i_op0[2]) = 0xfd12fd12fd12fd12; + *((unsigned long *)&__m256i_op0[1]) = 0xfd12fd12fd12fd12; + *((unsigned long *)&__m256i_op0[0]) = 0xfd12fd12fd12fd12; + *((unsigned long *)&__m256i_result[3]) = 0x000a000a000a000a; + *((unsigned long *)&__m256i_result[2]) = 0x000a000a000a000a; + *((unsigned long *)&__m256i_result[1]) = 0x000a000a000a000a; + *((unsigned long *)&__m256i_result[0]) = 0x000a000a000a000a; + __m256i_out = __lasx_xvmaxi_h (__m256i_op0, 10); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000001000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000001000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000001000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000001000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000401000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000401000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000401000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000401000000; + __m256i_out = __lasx_xvmaxi_w (__m256i_op0, 4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmaxi_w (__m256i_op0, -16); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0110000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0110000000000080; + *((unsigned long *)&__m256i_op0[1]) = 0x0110000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0110000000000080; + *((unsigned long *)&__m256i_result[3]) = 0x0110000000000004; + *((unsigned long *)&__m256i_result[2]) = 0x0110000000000080; + *((unsigned long *)&__m256i_result[1]) = 0x0110000000000004; + *((unsigned long *)&__m256i_result[0]) = 0x0110000000000080; + __m256i_out = __lasx_xvmaxi_w (__m256i_op0, 4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmaxi_w (__m256i_op0, -11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000200000002; + *((unsigned long *)&__m256i_result[2]) = 0x0000000200000002; + *((unsigned long *)&__m256i_result[1]) = 0x0000000200000002; + *((unsigned long *)&__m256i_result[0]) = 0x0000000200000002; + __m256i_out = __lasx_xvmaxi_w (__m256i_op0, 2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000e0000000e; + *((unsigned long *)&__m256i_result[2]) = 0x0000000e0000000e; + *((unsigned long *)&__m256i_result[1]) = 0x0000000e0000000e; + *((unsigned long *)&__m256i_result[0]) = 0x0000000e0000000e; + __m256i_out = __lasx_xvmaxi_w (__m256i_op0, 14); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffff040000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffff040000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xfffffff400000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xfffffff400000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmaxi_w (__m256i_op0, -12); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000900000009; + *((unsigned long *)&__m256i_result[2]) = 0x0000000900000009; + *((unsigned long *)&__m256i_result[1]) = 0x0000000900000009; + *((unsigned long *)&__m256i_result[0]) = 0x0000000900000009; + __m256i_out = __lasx_xvmaxi_w (__m256i_op0, 9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xe07de0801f20607a; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xe07de0801f20607a; + *((unsigned long *)&__m256i_result[3]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[2]) = 0x000000081f20607a; + *((unsigned long *)&__m256i_result[1]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[0]) = 0x000000081f20607a; + __m256i_out = __lasx_xvmaxi_w (__m256i_op0, 8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ffffffff; + __m256i_out = __lasx_xvmaxi_w (__m256i_op0, -2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000ff80; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000ff80; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000ffff; + __m256i_out = __lasx_xvmaxi_d (__m256i_op0, -16); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000009; + __m256i_out = __lasx_xvmaxi_d (__m256i_op0, 9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmaxi_d (__m256i_op0, -2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000ff1100; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000004560420; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000ff1100; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000004560420; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000ff1100; + *((unsigned long *)&__m256i_result[2]) = 0x0000000004560420; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000ff1100; + *((unsigned long *)&__m256i_result[0]) = 0x0000000004560420; + __m256i_out = __lasx_xvmaxi_d (__m256i_op0, -14); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmaxi_d (__m256i_op0, -1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000007e1c7e1c; + *((unsigned long *)&__m256i_op0[2]) = 0x7e00000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x000000007e1c7e1c; + *((unsigned long *)&__m256i_op0[0]) = 0x7e00000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000000007e1c7e1c; + *((unsigned long *)&__m256i_result[2]) = 0x7e00000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x000000007e1c7e1c; + *((unsigned long *)&__m256i_result[0]) = 0x7e00000000000000; + __m256i_out = __lasx_xvmaxi_d (__m256i_op0, -9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[3]) = 0xfffffffffffffff5; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffffffffff5; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffffffffff5; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffffffffff5; + __m256i_out = __lasx_xvmaxi_d (__m256i_op0, -11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000007; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000007; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000007; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000007; + __m256i_out = __lasx_xvmaxi_d (__m256i_op0, 7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000007b007e; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000007b007e; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[2]) = 0x00000000007b007e; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[0]) = 0x00000000007b007e; + __m256i_out = __lasx_xvmaxi_d (__m256i_op0, 2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmaxi-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmaxi-2.c new file mode 100644 index 00000000000..b6b34063cd9 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmaxi-2.c @@ -0,0 +1,504 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmaxi_bu (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000102; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0a0a0a0a0a0a0a0a; + *((unsigned long *)&__m256i_result[2]) = 0x0a0a0a0a0a0a0a0a; + *((unsigned long *)&__m256i_result[1]) = 0x0a0a0a0a0a0a0a0a; + *((unsigned long *)&__m256i_result[0]) = 0x0a0a0a0a0a0a0a0a; + __m256i_out = __lasx_xvmaxi_bu (__m256i_op0, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x1717171717171717; + *((unsigned long *)&__m256i_result[2]) = 0x1717171717171717; + *((unsigned long *)&__m256i_result[1]) = 0x1717171717171717; + *((unsigned long *)&__m256i_result[0]) = 0x1717171717171717; + __m256i_out = __lasx_xvmaxi_bu (__m256i_op0, 0x17); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x7ffe00007f000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_result[3]) = 0x1616161616161616; + *((unsigned long *)&__m256i_result[2]) = 0x161616167fffffff; + *((unsigned long *)&__m256i_result[1]) = 0x7ffe16167f161616; + *((unsigned long *)&__m256i_result[0]) = 0x161616167fffffff; + __m256i_out = __lasx_xvmaxi_bu (__m256i_op0, 0x16); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000feb60000b7d0; + *((unsigned long *)&__m256i_op0[2]) = 0x0000feb60000c7eb; + *((unsigned long *)&__m256i_op0[1]) = 0x0000feb60000b7d0; + *((unsigned long *)&__m256i_op0[0]) = 0x0000feb60000c7eb; + *((unsigned long *)&__m256i_result[3]) = 0x0707feb60707b7d0; + *((unsigned long *)&__m256i_result[2]) = 0x0707feb60707c7eb; + *((unsigned long *)&__m256i_result[1]) = 0x0707feb60707b7d0; + *((unsigned long *)&__m256i_result[0]) = 0x0707feb60707c7eb; + __m256i_out = __lasx_xvmaxi_bu (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x1111111111111111; + *((unsigned long *)&__m256i_result[2]) = 0x1111111111111111; + *((unsigned long *)&__m256i_result[1]) = 0x1111111111111111; + *((unsigned long *)&__m256i_result[0]) = 0x1111111111111111; + __m256i_out = __lasx_xvmaxi_bu (__m256i_op0, 0x11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvmaxi_bu (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ffa3; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000165a; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000ffa3; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000165a; + *((unsigned long *)&__m256i_result[3]) = 0x1818ffff1818ffa3; + *((unsigned long *)&__m256i_result[2]) = 0x181818181818185a; + *((unsigned long *)&__m256i_result[1]) = 0x1818ffff1818ffa3; + *((unsigned long *)&__m256i_result[0]) = 0x181818181818185a; + __m256i_out = __lasx_xvmaxi_bu (__m256i_op0, 0x18); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x1c1c1c1c1c1c1c1c; + *((unsigned long *)&__m256i_result[2]) = 0x1c1c1c1c1c1c1c1c; + *((unsigned long *)&__m256i_result[1]) = 0x1c1c1c1c1c1c1c1c; + *((unsigned long *)&__m256i_result[0]) = 0x1c1c1c1c1c1c1c1c; + __m256i_out = __lasx_xvmaxi_bu (__m256i_op0, 0x1c); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmaxi_hu (__m256i_op0, 0x18); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xeffc000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xf064c6098d214127; + *((unsigned long *)&__m256i_op0[1]) = 0xeffc000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xf064c6098d214127; + *((unsigned long *)&__m256i_result[3]) = 0xeffc001800180018; + *((unsigned long *)&__m256i_result[2]) = 0xf064c6098d214127; + *((unsigned long *)&__m256i_result[1]) = 0xeffc001800180018; + *((unsigned long *)&__m256i_result[0]) = 0xf064c6098d214127; + __m256i_out = __lasx_xvmaxi_hu (__m256i_op0, 0x18); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000003; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000003; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000010001; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010003; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010003; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvmaxi_hu (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0007000700070007; + *((unsigned long *)&__m256i_result[2]) = 0x0007000700070007; + *((unsigned long *)&__m256i_result[1]) = 0x0007000700070007; + *((unsigned long *)&__m256i_result[0]) = 0x0007000700070007; + __m256i_out = __lasx_xvmaxi_hu (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0018001800180018; + *((unsigned long *)&__m256i_result[2]) = 0x0018001800180018; + *((unsigned long *)&__m256i_result[1]) = 0x0018001800180018; + *((unsigned long *)&__m256i_result[0]) = 0x0018001800180018; + __m256i_out = __lasx_xvmaxi_hu (__m256i_op0, 0x18); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_result[3]) = 0x0017001700176d6d; + *((unsigned long *)&__m256i_result[2]) = 0x0017001700176d6d; + *((unsigned long *)&__m256i_result[1]) = 0x0017001700176d6d; + *((unsigned long *)&__m256i_result[0]) = 0x0017001700176d6d; + __m256i_out = __lasx_xvmaxi_hu (__m256i_op0, 0x17); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x001fffffffe00000; + *((unsigned long *)&__m256i_op0[2]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x001fffffffe00000; + *((unsigned long *)&__m256i_op0[0]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x001fffffffe00011; + *((unsigned long *)&__m256i_result[2]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x001fffffffe00011; + *((unsigned long *)&__m256i_result[0]) = 0x7fffffffffffffff; + __m256i_out = __lasx_xvmaxi_hu (__m256i_op0, 0x11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000001400000014; + *((unsigned long *)&__m256i_result[2]) = 0x0000001400000014; + *((unsigned long *)&__m256i_result[1]) = 0x0000001400000014; + *((unsigned long *)&__m256i_result[0]) = 0x0000001400000014; + __m256i_out = __lasx_xvmaxi_wu (__m256i_op0, 0x14); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000080; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000080; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000080; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000080; + *((unsigned long *)&__m256i_result[3]) = 0x0000000e00000080; + *((unsigned long *)&__m256i_result[2]) = 0x0000000e00000080; + *((unsigned long *)&__m256i_result[1]) = 0x0000000e00000080; + *((unsigned long *)&__m256i_result[0]) = 0x0000000e00000080; + __m256i_out = __lasx_xvmaxi_wu (__m256i_op0, 0xe); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000fd0000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000fd0000; + *((unsigned long *)&__m256i_result[3]) = 0x0000001b0000001b; + *((unsigned long *)&__m256i_result[2]) = 0x0000001b00fd0000; + *((unsigned long *)&__m256i_result[1]) = 0x0000001b0000001b; + *((unsigned long *)&__m256i_result[0]) = 0x0000001b00fd0000; + __m256i_out = __lasx_xvmaxi_wu (__m256i_op0, 0x1b); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000007aff7c00; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffffd017d00; + *((unsigned long *)&__m256i_op0[1]) = 0x000000007aff7c00; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffffd017d00; + *((unsigned long *)&__m256i_result[3]) = 0x0000000c7aff7c00; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffffd017d00; + *((unsigned long *)&__m256i_result[1]) = 0x0000000c7aff7c00; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffffd017d00; + __m256i_out = __lasx_xvmaxi_wu (__m256i_op0, 0xc); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000001f0000001f; + *((unsigned long *)&__m256i_result[0]) = 0x0000001f0000ffff; + __m256i_out = __lasx_xvmaxi_wu (__m256i_op0, 0x1f); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000300000003; + *((unsigned long *)&__m256i_result[2]) = 0x0000000300000003; + *((unsigned long *)&__m256i_result[1]) = 0x0000000300000003; + *((unsigned long *)&__m256i_result[0]) = 0x0000000300000003; + __m256i_out = __lasx_xvmaxi_wu (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x1010101010001000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000ff000000ff; + *((unsigned long *)&__m256i_op0[1]) = 0x1010101000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000ff000000ff; + *((unsigned long *)&__m256i_result[3]) = 0x1010101010001000; + *((unsigned long *)&__m256i_result[2]) = 0x000000ff000000ff; + *((unsigned long *)&__m256i_result[1]) = 0x101010100000000e; + *((unsigned long *)&__m256i_result[0]) = 0x000000ff000000ff; + __m256i_out = __lasx_xvmaxi_wu (__m256i_op0, 0xe); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000007ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000007ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000007ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000007ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000001e0007ffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000001e0007ffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000001e0007ffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000001e0007ffff; + __m256i_out = __lasx_xvmaxi_wu (__m256i_op0, 0x1e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000000fd; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000000000fe; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[3]) = 0x0000000400000004; + *((unsigned long *)&__m256i_result[2]) = 0x00000004000000fd; + *((unsigned long *)&__m256i_result[1]) = 0x00000004000000fe; + *((unsigned long *)&__m256i_result[0]) = 0x0000000400000004; + __m256i_out = __lasx_xvmaxi_wu (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000001f; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000001f; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000001f; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000001f; + __m256i_out = __lasx_xvmaxi_wu (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000010; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000010; + *((unsigned long *)&__m256i_result[3]) = 0x0000001700000017; + *((unsigned long *)&__m256i_result[2]) = 0x0000001700000017; + *((unsigned long *)&__m256i_result[1]) = 0x0000001700000017; + *((unsigned long *)&__m256i_result[0]) = 0x0000001700000017; + __m256i_out = __lasx_xvmaxi_wu (__m256i_op0, 0x17); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x07fee332883f86b0; + *((unsigned long *)&__m256i_op0[2]) = 0x07fed3c8f7ad28d0; + *((unsigned long *)&__m256i_op0[1]) = 0x07fee332883f86b0; + *((unsigned long *)&__m256i_op0[0]) = 0x07fed3c8f7ad28d0; + *((unsigned long *)&__m256i_result[3]) = 0x07fee332883f86b0; + *((unsigned long *)&__m256i_result[2]) = 0x07fed3c8f7ad28d0; + *((unsigned long *)&__m256i_result[1]) = 0x07fee332883f86b0; + *((unsigned long *)&__m256i_result[0]) = 0x07fed3c8f7ad28d0; + __m256i_out = __lasx_xvmaxi_wu (__m256i_op0, 0x10); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000001e; + *((unsigned long *)&__m256i_result[1]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000001e; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x1e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[2]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[1]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[0]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_result[3]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_result[2]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_result[1]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_result[0]) = 0x1c1b1a191c1b1a19; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0xe); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000003f; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000003f; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000003f; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000003f; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000003f; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000003f; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000003f; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000003f; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x1c); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ffffffff; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0xc); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000001c; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000001c; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000001c; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000001c; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x1c); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000005; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000005; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000005; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000005; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000600000006; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000600000006; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000600000006; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[3]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[2]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[1]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[0]) = 0x0000000600000006; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x17); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_op0[1]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_result[3]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffffffffffe; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000012; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000012; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000040; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x12); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x7fffffffffffffff; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x19); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000007; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000007; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000007; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000007; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000000b; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000000b; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000000b; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000000b; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0xb); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000013; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000013; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000013; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000013; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000014; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000014; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000014; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000014; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x14); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000014; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000014; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000014; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000014; + __m256i_out = __lasx_xvmaxi_du (__m256i_op0, 0x14); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmin-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmin-1.c new file mode 100644 index 00000000000..7dbf335c14d --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmin-1.c @@ -0,0 +1,575 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffff00000000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x8001000080000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000800080000728; + *((unsigned long *)&__m256i_op1[1]) = 0x8001800080008000; + *((unsigned long *)&__m256i_op1[0]) = 0x800080008000b8f1; + *((unsigned long *)&__m256i_result[3]) = 0x8000ffff8000ffff; + *((unsigned long *)&__m256i_result[2]) = 0xffff80008000ffff; + *((unsigned long *)&__m256i_result[1]) = 0x8000800080008000; + *((unsigned long *)&__m256i_result[0]) = 0x800080008000b8f1; + __m256i_out = __lasx_xvmin_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ffffffff; + __m256i_out = __lasx_xvmin_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmin_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000017bfffff0; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000180007fe8; + *((unsigned long *)&__m256i_op0[1]) = 0x000000017bfffff0; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000180007fe8; + *((unsigned long *)&__m256i_op1[3]) = 0x000000017bfffff0; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000180007fe8; + *((unsigned long *)&__m256i_op1[1]) = 0x000000017bfffff0; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000180007fe8; + *((unsigned long *)&__m256i_result[3]) = 0x000000017bfffff0; + *((unsigned long *)&__m256i_result[2]) = 0x0000000180007fe8; + *((unsigned long *)&__m256i_result[1]) = 0x000000017bfffff0; + *((unsigned long *)&__m256i_result[0]) = 0x0000000180007fe8; + __m256i_out = __lasx_xvmin_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[3]) = 0xc848c848c848c848; + *((unsigned long *)&__m256i_op1[2]) = 0x8848c848c848c848; + *((unsigned long *)&__m256i_op1[1]) = 0xc848c848c848c848; + *((unsigned long *)&__m256i_op1[0]) = 0x8848c848c848c848; + *((unsigned long *)&__m256i_result[3]) = 0xc800c800c800c800; + *((unsigned long *)&__m256i_result[2]) = 0x8800c800c800c801; + *((unsigned long *)&__m256i_result[1]) = 0xc800c800c800c800; + *((unsigned long *)&__m256i_result[0]) = 0x8800c800c800c801; + __m256i_out = __lasx_xvmin_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7070545438381c1c; + *((unsigned long *)&__m256i_op0[2]) = 0x7070545438381c1c; + *((unsigned long *)&__m256i_op0[1]) = 0x7070545438381c1c; + *((unsigned long *)&__m256i_op0[0]) = 0x7070545438381c1c; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffff00ffff8000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffff00ffff8000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffff00ffff8000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffff00ffff8000; + __m256i_out = __lasx_xvmin_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x003ff18080010201; + *((unsigned long *)&__m256i_op0[2]) = 0x0100000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x003ff18080010201; + *((unsigned long *)&__m256i_op0[0]) = 0x0100000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000f18080010000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000f18080010000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000d24; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_op1[1]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000fffe; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000fffe; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000fffe; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000fffe; + __m256i_out = __lasx_xvmin_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffff81ff7d; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffff81ff7d; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffff81ff7d; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffff81ff7d; + __m256i_out = __lasx_xvmin_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmin_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000017f7f7f7f; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000017f7f7f7f; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmin_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000004; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000004040104; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffd1108199; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000714910f9; + *((unsigned long *)&__m256i_op1[3]) = 0xffffd10000006459; + *((unsigned long *)&__m256i_op1[2]) = 0x0000441000000004; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000004; + *((unsigned long *)&__m256i_op1[0]) = 0x0000040400000104; + *((unsigned long *)&__m256i_result[3]) = 0xffffd10000000004; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000004; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffd1108199; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000104; + __m256i_out = __lasx_xvmin_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ffff00010003; + *((unsigned long *)&__m256i_op1[1]) = 0x0080000200000002; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffff00010003; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffff0100; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000ff00ff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000fd00ffff02ff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000001fffeff; + *((unsigned long *)&__m256i_op1[0]) = 0xff00fe00feff02ff; + *((unsigned long *)&__m256i_result[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffff02ff; + *((unsigned long *)&__m256i_result[1]) = 0x00000000ffff0100; + *((unsigned long *)&__m256i_result[0]) = 0xff00fe00feff02ff; + __m256i_out = __lasx_xvmin_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000008050501; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000008050501; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x8000000000000000; + __m256i_out = __lasx_xvmin_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000000f0; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000000000f0; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x01ff0020ff1f001f; + *((unsigned long *)&__m256i_op0[2]) = 0x7fe1ffe0ffe1ffe0; + *((unsigned long *)&__m256i_op0[1]) = 0x01ff0020ff1f001f; + *((unsigned long *)&__m256i_op0[0]) = 0x7fe1ffe0ffe1ffe0; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00000000ff1f001f; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffe1ffe0; + *((unsigned long *)&__m256i_result[1]) = 0x00000000ff1f001f; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ffe1ffe0; + __m256i_out = __lasx_xvmin_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000002; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000002; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x8000000000000000; + __m256i_out = __lasx_xvmin_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[2]) = 0xf000f00000000001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[0]) = 0xf000f00000000001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xf000f00000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xf000f00000000001; + __m256i_out = __lasx_xvmin_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000ff0102; + *((unsigned long *)&__m256i_op0[2]) = 0x007c000000810081; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000ff0102; + *((unsigned long *)&__m256i_op0[0]) = 0x007c000000810081; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffff0000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff0000ffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffff0000ffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffff0000ffff; + __m256i_out = __lasx_xvmin_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x4545454545454545; + *((unsigned long *)&__m256i_op0[2]) = 0x4545454545454545; + *((unsigned long *)&__m256i_op0[1]) = 0x4545454545454545; + *((unsigned long *)&__m256i_op0[0]) = 0x4545454545454545; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[0]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[0]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvmin_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000ffff0001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000ffff0001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000100000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000100000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmin_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffffbfffffffb; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffbfffffffb; + *((unsigned long *)&__m256i_op0[1]) = 0xfffffffbfffffffb; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffbfffffffb; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xfffffffbfffffffb; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffbfffffffb; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffbfffffffb; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffbfffffffb; + __m256i_out = __lasx_xvmin_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmin-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmin-2.c new file mode 100644 index 00000000000..9eaa0e9e769 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmin-2.c @@ -0,0 +1,680 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[2]) = 0x007f017f807f017d; + *((unsigned long *)&__m256i_op0[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[0]) = 0x007f017f807f017f; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000010001; + *((unsigned long *)&__m256i_result[2]) = 0x0000017f0000017d; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000010001; + *((unsigned long *)&__m256i_result[0]) = 0x0000017f0000017f; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x7f70000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x7f70000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x7f70000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x7f70000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x7f70000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x7f70000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x7f70000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x7f70000000000000; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000fffff800; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000fffff800; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000014402080144; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000014402080144; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000002080100; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000002080100; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00ff0000ffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00ff0000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000ffff; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000001de2dc20; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000001de2dc20; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0001010101010101; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000010100; + *((unsigned long *)&__m256i_op0[0]) = 0x0001000001000100; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffbf7f7fff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffe651bfff; + *((unsigned long *)&__m256i_result[3]) = 0x0001010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000010100; + *((unsigned long *)&__m256i_result[0]) = 0x0001000001000100; + __m256i_out = __lasx_xvmin_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ff80; + *((unsigned long *)&__m256i_op0[2]) = 0x0000468600007f79; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000f3280000dfff; + *((unsigned long *)&__m256i_op1[3]) = 0x1d1d1d1d1d1d1d1d; + *((unsigned long *)&__m256i_op1[2]) = 0x1d1d1d1ddd9d9d1d; + *((unsigned long *)&__m256i_op1[1]) = 0x1d1d1d1d1d1d1d1d; + *((unsigned long *)&__m256i_op1[0]) = 0x1d1d1d1d046fdd1d; + *((unsigned long *)&__m256i_result[3]) = 0x00001d1d00001d1d; + *((unsigned long *)&__m256i_result[2]) = 0x00001d1d00007f79; + *((unsigned long *)&__m256i_result[1]) = 0x00001d1d00001d1d; + *((unsigned long *)&__m256i_result[0]) = 0x00001d1d0000dd1d; + __m256i_out = __lasx_xvmin_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0006000000040000; + *((unsigned long *)&__m256i_op0[2]) = 0x0002000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0006000000040000; + *((unsigned long *)&__m256i_op0[0]) = 0x0002000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0106010601060106; + *((unsigned long *)&__m256i_op0[2]) = 0x0106010601060106; + *((unsigned long *)&__m256i_op0[1]) = 0x0106010601060106; + *((unsigned long *)&__m256i_op0[0]) = 0x0106010601060106; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00011ffb0000bee1; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00011ffb0000bee1; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0001010600000106; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0001010600000106; + __m256i_out = __lasx_xvmin_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffd5d5ffffd5d6; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffd5d5ffffd5d6; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000100; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000100; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8b1414140e0e0e0e; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x36722a7e66972cd6; + *((unsigned long *)&__m256i_op1[3]) = 0xc58a0a0a07070706; + *((unsigned long *)&__m256i_op1[2]) = 0x006b60e4180b0023; + *((unsigned long *)&__m256i_op1[1]) = 0x1b39153f334b966a; + *((unsigned long *)&__m256i_op1[0]) = 0xf1d75d79efcac002; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x006b60e40e0e0e0e; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x36722a7e66972cd6; + __m256i_out = __lasx_xvmin_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000101ff01; + *((unsigned long *)&__m256i_op1[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[0]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000010001; + __m256i_out = __lasx_xvmin_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[2]) = 0x00ff00ff000c0000; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[0]) = 0x00ff00ff00040000; + *((unsigned long *)&__m256i_op1[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[2]) = 0x00ff00ff000c0000; + *((unsigned long *)&__m256i_op1[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[0]) = 0x00ff00ff00040000; + *((unsigned long *)&__m256i_result[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[2]) = 0x00ff00ff000c0000; + *((unsigned long *)&__m256i_result[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[0]) = 0x00ff00ff00040000; + __m256i_out = __lasx_xvmin_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00010e0d00009e0e; + *((unsigned long *)&__m256i_op0[2]) = 0x0000ffff00009000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000e0e; + *((unsigned long *)&__m256i_op0[0]) = 0x0000ffff00009000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000033; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000033; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000033; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000033; + __m256i_out = __lasx_xvmin_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000ffe36780; + *((unsigned long *)&__m256i_op1[2]) = 0x8000000100000001; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000ffe36780; + *((unsigned long *)&__m256i_op1[0]) = 0x8000000100000001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op1[2]) = 0x80008000fff98000; + *((unsigned long *)&__m256i_op1[1]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op1[0]) = 0x80008000fff98000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x00f0000000f00010; + *((unsigned long *)&__m256i_op1[2]) = 0xfff0ff00fff0ff10; + *((unsigned long *)&__m256i_op1[1]) = 0x00f0000000f00010; + *((unsigned long *)&__m256i_op1[0]) = 0xfff0ff00fff0ff10; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000400000003ffb; + *((unsigned long *)&__m256i_op1[2]) = 0x0000400100004001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000400000003ffb; + *((unsigned long *)&__m256i_op1[0]) = 0x0000400100004001; + *((unsigned long *)&__m256i_result[3]) = 0x0000400000003ffb; + *((unsigned long *)&__m256i_result[2]) = 0x0000400100004001; + *((unsigned long *)&__m256i_result[1]) = 0x0000400000003ffb; + *((unsigned long *)&__m256i_result[0]) = 0x0000400100004001; + __m256i_out = __lasx_xvmin_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x60f02081c1c4ce2c; + *((unsigned long *)&__m256i_op0[2]) = 0x8008000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x60f02081c1c4ce2c; + *((unsigned long *)&__m256i_op0[0]) = 0x8008000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0101010183f9999b; + *((unsigned long *)&__m256i_op1[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op1[1]) = 0x01010101d58f43c9; + *((unsigned long *)&__m256i_op1[0]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[3]) = 0x0101010183f9999b; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x01010101d58f43c9; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvmin_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x007f00ff007f00ff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x007f00ff007f00ff; + *((unsigned long *)&__m256i_op1[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[2]) = 0x00ff00ff00ff00ee; + *((unsigned long *)&__m256i_op1[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[0]) = 0x00ff00ff00ff00ee; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x007f00ff007f00ff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x007f00ff007f00ff; + __m256i_out = __lasx_xvmin_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000007f7f7f7f; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000007f7f7f7f; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000001fffe; + __m256i_out = __lasx_xvmin_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000202; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000202; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000202; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000202; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffff0000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffff0000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmin_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmini-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmini-1.c new file mode 100644 index 00000000000..01aabada810 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmini-1.c @@ -0,0 +1,416 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0xf96d674800000000; + *((unsigned long *)&__m256i_op0[2]) = 0x44a4330e2c7116c0; + *((unsigned long *)&__m256i_op0[1]) = 0x14187a7822b653c0; + *((unsigned long *)&__m256i_op0[0]) = 0xfbe0b866962b96d0; + *((unsigned long *)&__m256i_result[3]) = 0xf90c0c0c00000000; + *((unsigned long *)&__m256i_result[2]) = 0x0ca40c0c0c0c0cc0; + *((unsigned long *)&__m256i_result[1]) = 0x0c0c0c0c0cb60cc0; + *((unsigned long *)&__m256i_result[0]) = 0xfbe0b80c960c96d0; + __m256i_out = __lasx_xvmini_b (__m256i_op0, 12); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0010bfc80010bf52; + *((unsigned long *)&__m256i_op0[2]) = 0xfff1bfca0011bfcb; + *((unsigned long *)&__m256i_op0[1]) = 0x0010bfc80010bf52; + *((unsigned long *)&__m256i_op0[0]) = 0xfff1bfca0011bfcb; + *((unsigned long *)&__m256i_result[3]) = 0xf5f5bfc8f5f5bff5; + *((unsigned long *)&__m256i_result[2]) = 0xf5f1bfcaf5f5bfcb; + *((unsigned long *)&__m256i_result[1]) = 0xf5f5bfc8f5f5bff5; + *((unsigned long *)&__m256i_result[0]) = 0xf5f1bfcaf5f5bfcb; + __m256i_out = __lasx_xvmini_b (__m256i_op0, -11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xf8f8f8f8f8f8f8f8; + *((unsigned long *)&__m256i_result[2]) = 0xf8f8f8f8f8f8f8f8; + *((unsigned long *)&__m256i_result[1]) = 0xf8f8f8f8f8f8f8f8; + *((unsigned long *)&__m256i_result[0]) = 0xf8f8f8f8f8f8f8f8; + __m256i_out = __lasx_xvmini_b (__m256i_op0, -8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000aaabffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000aaabffff; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000aaabffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000aaabffff; + *((unsigned long *)&__m256i_result[3]) = 0x00000000aaabffff; + *((unsigned long *)&__m256i_result[2]) = 0x00000000aaabffff; + *((unsigned long *)&__m256i_result[1]) = 0x00000000aaabffff; + *((unsigned long *)&__m256i_result[0]) = 0x00000000aaabffff; + __m256i_out = __lasx_xvmini_b (__m256i_op0, 11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffff47b4ffff5878; + *((unsigned long *)&__m256i_op0[2]) = 0x0000b84b0000a787; + *((unsigned long *)&__m256i_op0[1]) = 0xffff47b4ffff5878; + *((unsigned long *)&__m256i_op0[0]) = 0x0000b84b0000a787; + *((unsigned long *)&__m256i_result[3]) = 0xffff07b4ffff0707; + *((unsigned long *)&__m256i_result[2]) = 0x0000b8070000a787; + *((unsigned long *)&__m256i_result[1]) = 0xffff07b4ffff0707; + *((unsigned long *)&__m256i_result[0]) = 0x0000b8070000a787; + __m256i_out = __lasx_xvmini_b (__m256i_op0, 7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_result[2]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_result[1]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_result[0]) = 0xf7f7f7f7f7f7f7f7; + __m256i_out = __lasx_xvmini_b (__m256i_op0, -9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_b (__m256i_op0, 5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000080; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000080; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_b (__m256i_op0, 14); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xf3f3f3f3f3f3f3f3; + *((unsigned long *)&__m256i_result[2]) = 0xf3f3f3f3f3f3f3f3; + *((unsigned long *)&__m256i_result[1]) = 0xf3f3f3f3f3f3f3f3; + *((unsigned long *)&__m256i_result[0]) = 0xf3f3f3f3f3f3f3f3; + __m256i_out = __lasx_xvmini_b (__m256i_op0, -13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_result[2]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_result[1]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_result[0]) = 0xf9f9f9f9f9f9f9f9; + __m256i_out = __lasx_xvmini_b (__m256i_op0, -7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff800000ff800000; + *((unsigned long *)&__m256i_op0[2]) = 0xc30e0000ff800000; + *((unsigned long *)&__m256i_op0[1]) = 0xff800000ff800000; + *((unsigned long *)&__m256i_op0[0]) = 0xc30e0000ff800000; + *((unsigned long *)&__m256i_result[3]) = 0xff800000ff800000; + *((unsigned long *)&__m256i_result[2]) = 0xc3030000ff800000; + *((unsigned long *)&__m256i_result[1]) = 0xff800000ff800000; + *((unsigned long *)&__m256i_result[0]) = 0xc3030000ff800000; + __m256i_out = __lasx_xvmini_b (__m256i_op0, 3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xfff6fff6fff6fff6; + *((unsigned long *)&__m256i_result[2]) = 0xfff6fff6fff6fff6; + *((unsigned long *)&__m256i_result[1]) = 0xfff6fff6fff6fff6; + *((unsigned long *)&__m256i_result[0]) = 0xfff6fff6fff6fff6; + __m256i_out = __lasx_xvmini_h (__m256i_op0, -10); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x1fffffff1fffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0383634303836343; + *((unsigned long *)&__m256i_op0[1]) = 0x1fffffff1fffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0383634303836343; + *((unsigned long *)&__m256i_result[3]) = 0x0002ffff0002ffff; + *((unsigned long *)&__m256i_result[2]) = 0x0002000200020002; + *((unsigned long *)&__m256i_result[1]) = 0x0002ffff0002ffff; + *((unsigned long *)&__m256i_result[0]) = 0x0002000200020002; + __m256i_out = __lasx_xvmini_h (__m256i_op0, 2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000f7bc0001f7bd; + *((unsigned long *)&__m256i_op0[2]) = 0x0000f93b0000017c; + *((unsigned long *)&__m256i_op0[1]) = 0x0000f7bc0001f7bd; + *((unsigned long *)&__m256i_op0[0]) = 0x0000f93b0000017b; + *((unsigned long *)&__m256i_result[3]) = 0xfff2f7bcfff2f7bd; + *((unsigned long *)&__m256i_result[2]) = 0xfff2f93bfff2fff2; + *((unsigned long *)&__m256i_result[1]) = 0xfff2f7bcfff2f7bd; + *((unsigned long *)&__m256i_result[0]) = 0xfff2f93bfff2fff2; + __m256i_out = __lasx_xvmini_h (__m256i_op0, -14); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmini_h (__m256i_op0, 6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_h (__m256i_op0, 13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xfff9fff9fff9fff9; + *((unsigned long *)&__m256i_result[2]) = 0xfff9fff9fff9fff9; + *((unsigned long *)&__m256i_result[1]) = 0xfff9fff9fff9fff9; + *((unsigned long *)&__m256i_result[0]) = 0xfff9fff9fff9fff9; + __m256i_out = __lasx_xvmini_h (__m256i_op0, -7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xfff3fff3fff3fff3; + *((unsigned long *)&__m256i_result[2]) = 0xfff3fff3fff3fff3; + *((unsigned long *)&__m256i_result[1]) = 0xfff3fff3fff3fff3; + *((unsigned long *)&__m256i_result[0]) = 0xfff3fff3fff3fff3; + __m256i_out = __lasx_xvmini_h (__m256i_op0, -13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xfff2fff2fff2fff2; + *((unsigned long *)&__m256i_result[2]) = 0xfff2fff2fff2fff2; + *((unsigned long *)&__m256i_result[1]) = 0xfff2fff2fff2fff2; + *((unsigned long *)&__m256i_result[0]) = 0xfff2fff2fff2fff2; + __m256i_out = __lasx_xvmini_h (__m256i_op0, -14); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_h (__m256i_op0, 11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x555555ab555555ab; + *((unsigned long *)&__m256i_op0[2]) = 0x555555ab555555ab; + *((unsigned long *)&__m256i_op0[1]) = 0x555555ab555555ab; + *((unsigned long *)&__m256i_op0[0]) = 0x555555ab555555ab; + *((unsigned long *)&__m256i_result[3]) = 0x0000000400000004; + *((unsigned long *)&__m256i_result[2]) = 0x0000000400000004; + *((unsigned long *)&__m256i_result[1]) = 0x0000000400000004; + *((unsigned long *)&__m256i_result[0]) = 0x0000000400000004; + __m256i_out = __lasx_xvmini_w (__m256i_op0, 4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffff8c80; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000fff0e400; + *((unsigned long *)&__m256i_result[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffff8c80; + *((unsigned long *)&__m256i_result[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x00000000fff0e400; + __m256i_out = __lasx_xvmini_w (__m256i_op0, 12); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000100000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xfffffff2fffffff2; + *((unsigned long *)&__m256i_result[2]) = 0xfffffff2fffffff2; + *((unsigned long *)&__m256i_result[1]) = 0xfffffff2fffffff2; + *((unsigned long *)&__m256i_result[0]) = 0xfffffff2fffffff2; + __m256i_out = __lasx_xvmini_w (__m256i_op0, -14); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0001000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000100010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0001000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000100010001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000a00000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000010000000a; + *((unsigned long *)&__m256i_result[1]) = 0x0000000a00000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000010000000a; + __m256i_out = __lasx_xvmini_w (__m256i_op0, 10); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xfffffff8fffffff8; + *((unsigned long *)&__m256i_result[2]) = 0xfffffff8fffffff8; + *((unsigned long *)&__m256i_result[1]) = 0xfffffff8fffffff8; + *((unsigned long *)&__m256i_result[0]) = 0xfffffff8fffffff8; + __m256i_out = __lasx_xvmini_w (__m256i_op0, -8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xfffffff7fffffff7; + *((unsigned long *)&__m256i_result[2]) = 0xfffffff7fffffff7; + *((unsigned long *)&__m256i_result[1]) = 0xfffffff7fffffff7; + *((unsigned long *)&__m256i_result[0]) = 0xfffffff7fffffff7; + __m256i_out = __lasx_xvmini_w (__m256i_op0, -9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmini_w (__m256i_op0, 4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xfffffff0fffffff0; + *((unsigned long *)&__m256i_result[2]) = 0xfffffff0fffffff0; + *((unsigned long *)&__m256i_result[1]) = 0xfffffff0fffffff0; + *((unsigned long *)&__m256i_result[0]) = 0xfffffff0fffffff0; + __m256i_out = __lasx_xvmini_w (__m256i_op0, -16); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmini_w (__m256i_op0, -1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_d (__m256i_op0, 11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x327f010101010102; + *((unsigned long *)&__m256i_op0[2]) = 0x6300000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x327f010101010102; + *((unsigned long *)&__m256i_op0[0]) = 0x6300000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xfffffffffffffff4; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffffffffff4; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffffffffff4; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffffffffff4; + __m256i_out = __lasx_xvmini_d (__m256i_op0, -12); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000900000009; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000900000009; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000900000009; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000900000009; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000009; + __m256i_out = __lasx_xvmini_d (__m256i_op0, 9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_d (__m256i_op0, 13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvmini_d (__m256i_op0, -1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff00ff00ff00ff00; + *((unsigned long *)&__m256i_op0[2]) = 0xff00ff007f007f00; + *((unsigned long *)&__m256i_op0[1]) = 0xff00ff00ff00ff00; + *((unsigned long *)&__m256i_op0[0]) = 0xff00ff007f007f00; + *((unsigned long *)&__m256i_result[3]) = 0xff00ff00ff00ff00; + *((unsigned long *)&__m256i_result[2]) = 0xff00ff007f007f00; + *((unsigned long *)&__m256i_result[1]) = 0xff00ff00ff00ff00; + *((unsigned long *)&__m256i_result[0]) = 0xff00ff007f007f00; + __m256i_out = __lasx_xvmini_d (__m256i_op0, -5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000000c; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000000c; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_d (__m256i_op0, 12); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmini-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmini-2.c new file mode 100644 index 00000000000..8eb7d93558b --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvmini-2.c @@ -0,0 +1,284 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_bu (__m256i_op0, 0x2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xefdfefdf00000000; + *((unsigned long *)&__m256i_op0[2]) = 0xefdfefdfefdfefdf; + *((unsigned long *)&__m256i_op0[1]) = 0xefdfefdf00000000; + *((unsigned long *)&__m256i_op0[0]) = 0xefdfefdfefdfefdf; + *((unsigned long *)&__m256i_result[3]) = 0x0d0d0d0d00000000; + *((unsigned long *)&__m256i_result[2]) = 0x0d0d0d0d0d0d0d0d; + *((unsigned long *)&__m256i_result[1]) = 0x0d0d0d0d00000000; + *((unsigned long *)&__m256i_result[0]) = 0x0d0d0d0d0d0d0d0d; + __m256i_out = __lasx_xvmini_bu (__m256i_op0, 0xd); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_bu (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x1b1b1b1b1b1b1b1b; + *((unsigned long *)&__m256i_result[2]) = 0x1b1b1b1b1b1b1b1b; + *((unsigned long *)&__m256i_result[1]) = 0x1b1b1b1b1b1b1b1b; + *((unsigned long *)&__m256i_result[0]) = 0x1b1b1b1b1b1b1b1b; + __m256i_out = __lasx_xvmini_bu (__m256i_op0, 0x1b); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_bu (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000008; + __m256i_out = __lasx_xvmini_bu (__m256i_op0, 0x8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffff800000000000; + *((unsigned long *)&__m256i_result[3]) = 0x1e1e1e0000000000; + *((unsigned long *)&__m256i_result[2]) = 0x1e1e1e0000000000; + *((unsigned long *)&__m256i_result[1]) = 0x1e1e1e0000000000; + *((unsigned long *)&__m256i_result[0]) = 0x1e1e1e0000000000; + __m256i_out = __lasx_xvmini_bu (__m256i_op0, 0x1e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x6018000000000cd1; + *((unsigned long *)&__m256i_op0[2]) = 0x6040190d00000000; + *((unsigned long *)&__m256i_op0[1]) = 0x6018000000000cd1; + *((unsigned long *)&__m256i_op0[0]) = 0x6040190d00000000; + *((unsigned long *)&__m256i_result[3]) = 0x0a0a000000000a0a; + *((unsigned long *)&__m256i_result[2]) = 0x0a0a0a0a00000000; + *((unsigned long *)&__m256i_result[1]) = 0x0a0a000000000a0a; + *((unsigned long *)&__m256i_result[0]) = 0x0a0a0a0a00000000; + __m256i_out = __lasx_xvmini_bu (__m256i_op0, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000800400010006d; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000800400010006d; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0008001c0010001c; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0008001c0010001c; + __m256i_out = __lasx_xvmini_bu (__m256i_op0, 0x1c); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_bu (__m256i_op0, 0x5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_hu (__m256i_op0, 0xf); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x4000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x4000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0007000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0007000000000000; + __m256i_out = __lasx_xvmini_hu (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000002222; + *((unsigned long *)&__m256i_op0[2]) = 0x00003ddd80007bbb; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000002222; + *((unsigned long *)&__m256i_op0[0]) = 0x00003ddd80007bbb; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000017; + *((unsigned long *)&__m256i_result[2]) = 0x0000001700170017; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000017; + *((unsigned long *)&__m256i_result[0]) = 0x0000001700170017; + __m256i_out = __lasx_xvmini_hu (__m256i_op0, 0x17); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_hu (__m256i_op0, 0x1e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_hu (__m256i_op0, 0x14); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[2]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[1]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[0]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvmini_du (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_du (__m256i_op0, 0x18); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_du (__m256i_op0, 0x12); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_du (__m256i_op0, 0xd); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_du (__m256i_op0, 0xe); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffe400000707; + *((unsigned long *)&__m256i_op0[2]) = 0x00000af100001455; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffe400000707; + *((unsigned long *)&__m256i_op0[0]) = 0x00000af100001455; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvmini_du (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_du (__m256i_op0, 0x15); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffff61010380; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffff61010380; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000006; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000006; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000006; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000006; + __m256i_out = __lasx_xvmini_du (__m256i_op0, 0x6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvmini_du (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +}