From patchwork Thu Mar 16 08:55:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "juzhe.zhong@rivai.ai" X-Patchwork-Id: 70671 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp364405wrt; Thu, 16 Mar 2023 01:57:12 -0700 (PDT) X-Google-Smtp-Source: AK7set+nAWrm84CjE4l08PxK6pxzY7JIXE4IdGHFMglViVhbxyiOjEEcYL3Ga00wI/vybM0mAtC+ X-Received: by 2002:a05:6402:155:b0:4fb:2296:30b3 with SMTP id s21-20020a056402015500b004fb229630b3mr5507449edu.15.1678957031890; Thu, 16 Mar 2023 01:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678957031; cv=none; d=google.com; s=arc-20160816; b=eSBivN+HFA1sEoPgn5uRjphIJ5HQG8d0nGEe8KQ45Cw/sRW5yzo6lmxMe79kxnMh0U u+x8jpqMbZRQY5zpV7WLMgqkhuCa0tpKn6ynpT2ysaegPd/VSGi52ETsUyGEYIJ6GJU3 kDWgz+gjgataRDkfux6tS0+qrZm+JyyKd91bUPoCD0s4/8+JKELybbmCNQ12uKYnHYI8 KVhFRPNY/lCGiUu7qdIwm3RRH0PcIvsC5yuEzb15Nxrtj6gdiXC9zotdE65iJUHuRXMJ lO6GcUp/qXN3/jkM9GsqVR94glm+oZaZGeXSdNO3vZf4KTSwka5gOLGxGhC+dgr9ExbM iEDw== 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:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dmarc-filter:delivered-to; bh=ej7wiV+eHtrXOV/7TXdYXM0AHMBMpbeZvgXZzhVBeBQ=; b=W/T5X/kUS7Q3ect9XkSUfq+fJzaFhSqsZ5M/C/53pJX7WYONGCBIpFXNNAz4yjlzAK 56Yoj3w5aa/jVrvwtdiBkWG60JBOYkwEkHI0IVZsveIClTwoZfosMbTHvtQ24vq6zDOW kyUEHGFy0d//EN7uVHDnV0m/lO/Q9BZWpLgoifqRJfvDD59vxFPoccfU2JmD8Zn03p87 PrvoLp5kAS1J2SmzD+FQ9zc72uRTCqA5DpNuhT2jHhR98MAlGVOldaHfcPzOSfDyd/t6 zvRYIZwhJBJONOXT2ZIn0WGvJ8i6WkSJAQJRpfnGCQULmpz4TQN7ZFVygphh+r7zTntQ nSew== 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 sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d17-20020aa7d691000000b004acc5324381si27033edr.296.2023.03.16.01.57.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 01:57:11 -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 294983858D38 for ; Thu, 16 Mar 2023 08:57:10 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbgau2.qq.com (smtpbgau2.qq.com [54.206.34.216]) by sourceware.org (Postfix) with ESMTPS id 8BD3A3858C1F for ; Thu, 16 Mar 2023 08:55:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8BD3A3858C1F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp87t1678956946t6uix9od Received: from rios-cad5.localdomain ( [58.60.1.11]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 16 Mar 2023 16:55:45 +0800 (CST) X-QQ-SSF: 01400000000000E0N000000A0000000 X-QQ-FEAT: Pbidb3+knnGMl5roSsrALZVRbG2UgTG7Lhfu5cgxmAyQ7Wl6E4t2N/KhS/Pzs KXWzvkK9n+xQP7QEleIeaHxZr8SKUIl/vb9s9ylL9jQGgUZetlc70MiJY//LpMU+17i17N6 MotKVKlkcnao4RXwIIMsroKMTsKez72K+MnJUv5CoWXYQurRHonwo7pymaU9V4/e/5UMT2f S3hnQC5WzB7mhD8nVQh9mns9EFOocI+fhmfIFcM7+skfgaCxJ8qGeElhFUys3wvOmZ5kloq ukbJN4nzbklDSsNUTnENufMfVWZxX1HvksvLQvQZdg0tlPVI+5w8/NS8QGe2zE6/NHiH3/I vSXbh0+oqQT39CH1GIVETliBnssUeE78WCs8dx5/d06ts23xRDJsX9mRuUSX1+W3+4wFY6/ qqpELfLZC+s= X-QQ-GoodBg: 2 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, Ju-Zhe Zhong , kito-cheng Subject: [PATCH] RISC-V: Fix bugs reported by @kito Date: Thu, 16 Mar 2023 16:55:42 +0800 Message-Id: <20230316085542.171023-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvr:qybglogicsvr7 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SCC_10_SHORT_WORD_LINES, SCC_20_SHORT_WORD_LINES, SCC_35_SHORT_WORD_LINES, SCC_5_SHORT_WORD_LINES, SPF_HELO_PASS, 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.29 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760514048414579593?= X-GMAIL-MSGID: =?utf-8?q?1760514048414579593?= From: Ju-Zhe Zhong Co-authored-by: kito-cheng Co-authored-by: kito-cheng gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (reg_available_p): Fix bugs. (pass_vsetvl::compute_local_backward_infos): Fix bugs. (pass_vsetvl::need_vsetvl): Fix bugs. (pass_vsetvl::backward_demand_fusion): Fix bugs. (pass_vsetvl::demand_fusion): Fix bugs. gcc/testsuite/ChangeLog: * g++.target/riscv/rvv/base/bug-10.C: New test. * g++.target/riscv/rvv/base/bug-11.C: New test. * g++.target/riscv/rvv/base/bug-12.C: New test. * g++.target/riscv/rvv/base/bug-13.C: New test. * g++.target/riscv/rvv/base/bug-14.C: New test. * g++.target/riscv/rvv/base/bug-15.C: New test. * g++.target/riscv/rvv/base/bug-2.C: New test. * g++.target/riscv/rvv/base/bug-3.C: New test. * g++.target/riscv/rvv/base/bug-4.C: New test. * g++.target/riscv/rvv/base/bug-5.C: New test. * g++.target/riscv/rvv/base/bug-6.C: New test. * g++.target/riscv/rvv/base/bug-7.C: New test. * g++.target/riscv/rvv/base/bug-8.C: New test. * g++.target/riscv/rvv/base/bug-9.C: New test. Signed-off-by: Ju-Zhe Zhong Co-authored-by: kito-cheng Co-authored-by: kito-cheng --- gcc/config/riscv/riscv-vsetvl.cc | 25 +- .../g++.target/riscv/rvv/base/bug-10.C | 378 ++++++++++++ .../g++.target/riscv/rvv/base/bug-11.C | 463 ++++++++++++++ .../g++.target/riscv/rvv/base/bug-12.C | 410 +++++++++++++ .../g++.target/riscv/rvv/base/bug-13.C | 481 +++++++++++++++ .../g++.target/riscv/rvv/base/bug-14.C | 429 +++++++++++++ .../g++.target/riscv/rvv/base/bug-15.C | 381 ++++++++++++ .../g++.target/riscv/rvv/base/bug-2.C | 473 ++++++++++++++ .../g++.target/riscv/rvv/base/bug-3.C | 385 ++++++++++++ .../g++.target/riscv/rvv/base/bug-4.C | 417 +++++++++++++ .../g++.target/riscv/rvv/base/bug-5.C | 416 +++++++++++++ .../g++.target/riscv/rvv/base/bug-6.C | 321 ++++++++++ .../g++.target/riscv/rvv/base/bug-7.C | 278 +++++++++ .../g++.target/riscv/rvv/base/bug-8.C | 412 +++++++++++++ .../g++.target/riscv/rvv/base/bug-9.C | 580 ++++++++++++++++++ 15 files changed, 5836 insertions(+), 13 deletions(-) create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-10.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-11.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-12.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-13.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-14.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-15.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-2.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-3.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-4.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-5.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-6.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-7.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-8.C create mode 100644 gcc/testsuite/g++.target/riscv/rvv/base/bug-9.C diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index 159e289ccb9..f4c1773da0d 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -1485,16 +1485,16 @@ propagate_avl_across_demands_p (const vector_insn_info &info1, } static bool -reg_available_p (const bb_info *bb, const vector_insn_info &info) +reg_available_p (const insn_info *insn, const vector_insn_info &info) { - if (!info.get_avl_source ()) + if (info.has_avl_reg () && !info.get_avl_source ()) return false; - insn_info *insn = info.get_avl_source ()->insn (); - if (insn->bb () == bb) - return before_p (insn, info.get_insn ()); + insn_info *def_insn = info.get_avl_source ()->insn (); + if (def_insn->bb () == insn->bb ()) + return before_p (def_insn, insn); else - return dominated_by_p (CDI_DOMINATORS, bb->cfg_bb (), - insn->bb ()->cfg_bb ()); + return dominated_by_p (CDI_DOMINATORS, insn->bb ()->cfg_bb (), + def_insn->bb ()->cfg_bb ()); } /* Return true if the instruction support relaxed compatible check. */ @@ -2596,7 +2596,6 @@ private: bool hard_empty_block_p (const bb_info *, const vector_insn_info &) const; bool backward_demand_fusion (void); bool forward_demand_fusion (void); - // bool local_demand_fusion (void); bool cleanup_illegal_dirty_blocks (void); void demand_fusion (void); @@ -2680,8 +2679,8 @@ pass_vsetvl::compute_local_backward_infos (const bb_info *bb) gcc_assert (info.valid_p () && "Unexpected Invalid demanded info"); if (change.valid_p ()) { - if (!(propagate_avl_across_demands_p (info, change) - && !reg_available_p (bb, info)) + if (!(propagate_avl_across_demands_p (change, info) + && !reg_available_p (insn, change)) && change.compatible_p (info)) info = change.merge (info); } @@ -2703,7 +2702,7 @@ pass_vsetvl::need_vsetvl (const vector_insn_info &require, if (!curr_info.valid_p () || curr_info.unknown_p () || curr_info.uninit_p ()) return true; - if (require.compatible_p (curr_info)) + if (require.compatible_p (static_cast (curr_info))) return false; return true; @@ -3228,7 +3227,8 @@ pass_vsetvl::backward_demand_fusion (void) block_info.probability = curr_block_info.probability; if (propagate_avl_across_demands_p (prop, block_info.reaching_out) - && !reg_available_p (crtl->ssa->bb (e->src), new_info)) + && !reg_available_p (crtl->ssa->bb (e->src)->end_insn (), + new_info)) continue; change_vsetvl_insn (new_info.get_insn (), new_info); @@ -3378,7 +3378,6 @@ pass_vsetvl::demand_fusion (void) help for such cases. */ changed_p |= backward_demand_fusion (); changed_p |= forward_demand_fusion (); - // chanded_p |= local_demand_fusion (); } changed_p = true; diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-10.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-10.C new file mode 100644 index 00000000000..cbdfd99a423 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-10.C @@ -0,0 +1,378 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" + +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + + + +int main() +{ +int return_value = 0; + +size_t var_128 = 120u; +uint64_t var_127 [] = {10247815139382195571u, 7553514226738151656u, 8137034001984249717u, 1830988008579804275u, 12485891889796475883u, 3736113326113888510u, 711898336935905414u, 1766420694477792245u, 2953671709036220187u, 5512330794907312127u, 7952990648142234505u, 13869584398819855770u, 2408717139903002058u, 11092170387738276891u, 18397020437758593652u}; +size_t var_125 = 56u; +uint64_t var_124 [] = {17406140965283708416u, 7763514595608731964u, 16115534765690077835u, 11231660409811348566u, 15524877149379504932u, 18332759340072606684u, 13061196588776176296u}; +size_t var_122 = 88u; +uint64_t var_121 [] = {6707184356131601529u, 3297729015471999648u, 8061866611138600782u, 8800452268050799000u, 15020615771672721108u, 641196928272078212u, 11085175814396974197u, 11837733385127913629u, 15049864486786069233u, 11168326475583966677u, 17247135944700039313u}; +size_t var_119 = 8u; +uint64_t var_118 [] = {18331694445854200932u}; +size_t var_116 = 8u; +uint64_t var_115 [] = {10064759157889306246u}; +size_t var_113 = 8u; +uint64_t var_112 [] = {5614222760803579557u}; +size_t var_110 = 8u; +uint64_t var_109 [] = {10005960522681245691u}; +size_t var_107 = 8u; +uint64_t var_106 [] = {1475954422756504086u}; +size_t var_104 = 40u; +uint64_t var_103 [] = {6626590334479776340u, 2241199338160557252u, 16060726272050137143u, 17732233298880458138u, 7263785864330966034u}; +size_t var_101 = 8u; +uint64_t var_100 [] = {7345263286500344069u}; +size_t var_98 = 56u; +uint64_t var_97 [] = {5956735885135481938u, 4182044049298386488u, 7623452711169899944u, 14068300089985942305u, 11493693468971232432u, 7345263286500344069u, 346416287130549105u}; +ptrdiff_t var_95 = 8; +uint64_t var_94 [] = {12414305289291450974u, 16538359851375302352u, 8313132055691416560u, 13867065269079349521u, 1017808771721427764u, 17356330368822779652u, 3290756935902994118u}; +ptrdiff_t var_93 = 0; +uint64_t var_92 [] = {10799832758926747660u}; +ptrdiff_t var_91 = 8; +uint64_t var_90 [] = {13805165872561632310u, 774068163429852672u, 17064778312135541796u, 6875624645824733541u, 423214091817222295u}; +ptrdiff_t var_89 = 0; +uint64_t var_88 [] = {14010031310442528161u}; +ptrdiff_t var_87 = 0; +uint64_t var_86 [] = {7356817956819184451u}; +ptrdiff_t var_85 = 16; +uint64_t var_84 [] = {947422547004695300u}; +ptrdiff_t var_83 = 0; +uint64_t var_82 [] = {6235535364195587831u}; +ptrdiff_t var_81 = 0; +uint64_t var_80 [] = {15193925570144736210u}; +ptrdiff_t var_79 = 16; +uint64_t var_78 [] = {533640416774363423u, 3297729015471999648u, 8489938588667541712u, 8800452268050799000u, 17666107708045901194u, 641196928272078212u, 7559177638472102726u, 11837733385127913629u, 5680384540848464675u, 11168326475583966677u, 3255398313722498431u}; +ptrdiff_t var_77 = 16; +uint64_t var_76 [] = {12533337824753551080u, 7763514595608731964u, 13795692181151647051u, 11231660409811348566u, 250297762503526787u, 18332759340072606684u, 16140613718861239193u}; +ptrdiff_t var_75 = 16; +uint64_t var_74 [] = {7538716940910148046u, 7553514226738151656u, 157158663635958630u, 1830988008579804275u, 7114448579865347051u, 3736113326113888510u, 15309920862503524726u, 1766420694477792245u, 14456186678097064011u, 5512330794907312127u, 2571987622086860087u, 13869584398819855770u, 4551693039826462697u, 11092170387738276891u, 18400979329953061252u}; +uint64_t var_73 [] = {531390701392661486u, 14191860546689599459u, 6397974831436088037u, 6061287482776831231u, 11824792493993797371u, 12986570522226503009u, 2021643368358337136u}; +uint64_t var_72 [] = {17955355009468457553u, 14703297809170010498u, 7622994535709940528u, 9446060281158572795u, 17265810070545762724u, 8550158278057152140u, 4740186099373236988u}; +int32_t var_71 [] = {-844681533, 430047046, -1582399717, -1395793554, -1957933974, 1861214609, -778122672}; +uint64_t var_70 [] = {10247815139382195571u, 8137034001984249717u, 12485891889796475883u, 711898336935905414u, 2953671709036220187u, 7952990648142234505u, 2408717139903002058u, 18397020437758593652u}; +uint64_t var_69 [] = {17406140965283708416u, 16115534765690077835u, 15524877149379504932u, 13061196588776176296u}; +uint64_t var_68 [] = {6707184356131601529u, 8061866611138600782u, 15020615771672721108u, 11085175814396974197u, 15049864486786069233u, 17247135944700039313u}; +uint64_t var_67 [] = {16090077958295291976u, 5058025570064596806u, 18331694445854200932u}; +uint64_t var_66 [] = {9277904776365247519u, 6199737835434958138u, 16283102520881457795u, 11745254990704327140u, 10064759157889306246u}; +uint64_t var_65 [] = {5614222760803579557u}; +uint32_t var_64 [] = {1227690475u, 1502107102u, 801010141u, 2126338631u, 3025649616u, 3487614245u, 14569746u}; +float32_t var_63 [] = {f32(2245967112u), f32(2051163058u), f32(3908244833u), f32(3962722910u), f32(111404444u), f32(2790391727u), f32(2300257459u)}; +// -2.0946218785136287e-35, 2.521696536530322e+35, -9.183435412395947e+24, -8.624621714752208e+26, 6.165116599290094e-35, -7.285795718059635e-16, -1.8674702225979434e-33 + +float32_t var_62 [] = {f32(3938692238u), f32(2212435144u), f32(589281906u), f32(2509035433u), f32(1942403032u), f32(3291053766u), f32(1475222084u)}; +// -1.1827770064878237e+26, -1.3111533152679839e-36, 8.658888601896916e-18, -5.688580141840109e-26, 3.1488146125197364e+31, -677.9808349609375, 523593154822144.0 + +int16_t var_61 [] = {-1663, 11444, -8810, 17993, -9281, 3460, -32008}; +int8_t var_60 [] = {-31, -84, -128, 97, -3, -22, 77}; +uint8_t var_59 [] = {38u, 115u, 20u, 210u, 239u, 182u, 119u}; +uint64_t var_58 [] = {16700153237887578248u, 5031037798225230451u, 5292105904994248007u, 191847662260362543u, 17224332114616326956u, 10438953222179951407u, 3274250116478307575u}; +uint64_t var_57 [] = {5033313200475315879u, 11361079409953223615u, 7140048274794104683u, 2981932693915571701u, 9476848135713847987u, 12261119440308053562u, 9970426093577270632u}; +uint64_t var_56 [] = {2905331234579431349u, 7092114374123614934u, 10005960522681245691u}; +uint64_t var_55 [] = {6906626707180673736u, 1475954422756504086u}; +int16_t var_54 [] = {3175, 29167, -27933, 26903}; +uint64_t var_53 [] = {11254251074008699435u, 5204823814932142037u, 8646232476803655494u, 15091079855619697854u, 12516473234604987981u, 1630341543898427294u, 1369196052764304654u}; +int64_t var_52 [] = {2989185173643568993, -1007222647130467543, 9035883417988087253, 356697895597171625, -688843516243652996, 8367631197042162633, 7921162693062268499}; +uint64_t var_51 [] = {6626590334479776340u, 2241199338160557252u, 16060726272050137143u, 17732233298880458138u, 7263785864330966034u}; +uint64_t var_50 [] = {4933956119501726389u, 6288763602173540886u, 5410560154821202561u, 17226305573183414225u, 7665224654860515905u, 6322483520866588520u, 792086670759048161u}; +uint32_t var_49 = 3538698156u; +int32_t var_48 = -1974267178; +int64_t var_47 = 8792666392265243067; +__riscv_vsetvl_e64m8(7); +vuint64m8_t var_20 = __riscv_vle64_v_u64m8(var_73, 7); +// 531390701392661486, 14191860546689599459, 6397974831436088037, 6061287482776831231, 11824792493993797371, 12986570522226503009, 2021643368358337136 + +vuint64m8_t var_21 = __riscv_vle64_v_u64m8(var_72, 7); +// 17955355009468457553, 14703297809170010498, 7622994535709940528, 9446060281158572795, 17265810070545762724, 8550158278057152140, 4740186099373236988 + +vint32m4_t var_23 = __riscv_vle32_v_i32m4(var_71, 7); +// -844681533, 430047046, -1582399717, -1395793554, -1957933974, 1861214609, -778122672 + +__riscv_vsetvl_e64m4(8); +vuint64m4_t var_24 = __riscv_vle64_v_u64m4(var_70, 8); +// 10247815139382195571, 8137034001984249717, 12485891889796475883, 711898336935905414, 2953671709036220187, 7952990648142234505, 2408717139903002058, 18397020437758593652 + +__riscv_vsetvl_e64m4(4); +vuint64m4_t var_25 = __riscv_vle64_v_u64m4(var_69, 4); +// 17406140965283708416, 16115534765690077835, 15524877149379504932, 13061196588776176296 + +__riscv_vsetvl_e64m4(6); +vuint64m4_t var_26 = __riscv_vle64_v_u64m4(var_68, 6); +// 6707184356131601529, 8061866611138600782, 15020615771672721108, 11085175814396974197, 15049864486786069233, 17247135944700039313 + +__riscv_vsetvl_e64m4(3); +vuint64m4_t var_27 = __riscv_vle64_v_u64m4(var_67, 3); +// 16090077958295291976, 5058025570064596806, 18331694445854200932 + +__riscv_vsetvl_e64m4(5); +vuint64m4_t var_28 = __riscv_vle64_v_u64m4(var_66, 5); +// 9277904776365247519, 6199737835434958138, 16283102520881457795, 11745254990704327140, 10064759157889306246 + +__riscv_vsetvl_e64m4(1); +vuint64m4_t var_29 = __riscv_vle64_v_u64m4(var_65, 1); +// 5614222760803579557 + +__riscv_vsetvl_e32m2(7); +vuint32m2_t var_30 = __riscv_vle32_v_u32m2(var_64, 7); +// 1227690475, 1502107102, 801010141, 2126338631, 3025649616, 3487614245, 14569746 + +vfloat32m2_t var_32 = __riscv_vle32_v_f32m2(var_63, 7); +// -2.0946218785136287e-35, 2.521696536530322e+35, -9.183435412395947e+24, -8.624621714752208e+26, 6.165116599290094e-35, -7.285795718059635e-16, -1.8674702225979434e-33 + +vfloat32m2_t var_33 = __riscv_vle32_v_f32m2(var_62, 7); +// -1.1827770064878237e+26, -1.3111533152679839e-36, 8.658888601896916e-18, -5.688580141840109e-26, 3.1488146125197364e+31, -677.9808349609375, 523593154822144.0 + +vint16m1_t var_34 = __riscv_vle16_v_i16m1(var_61, 7); +// -1663, 11444, -8810, 17993, -9281, 3460, -32008 + +vint8mf2_t var_35 = __riscv_vle8_v_i8mf2(var_60, 7); +// -31, -84, -128, 97, -3, -22, 77 + +vuint8mf2_t var_36 = __riscv_vle8_v_u8mf2(var_59, 7); +// 38, 115, 20, 210, 239, 182, 119 + +vuint64m4_t var_37 = __riscv_vle64_v_u64m4(var_58, 7); +// 16700153237887578248, 5031037798225230451, 5292105904994248007, 191847662260362543, 17224332114616326956, 10438953222179951407, 3274250116478307575 + +vuint64m4_t var_38 = __riscv_vle64_v_u64m4(var_57, 7); +// 5033313200475315879, 11361079409953223615, 7140048274794104683, 2981932693915571701, 9476848135713847987, 12261119440308053562, 9970426093577270632 + +__riscv_vsetvl_e64m4(3); +vuint64m4_t var_39 = __riscv_vle64_v_u64m4(var_56, 3); +// 2905331234579431349, 7092114374123614934, 10005960522681245691 + +__riscv_vsetvl_e64m4(2); +vuint64m4_t var_40 = __riscv_vle64_v_u64m4(var_55, 2); +// 6906626707180673736, 1475954422756504086 + +__riscv_vsetvl_e16mf2(4); +vint16mf2_t var_41 = __riscv_vle16_v_i16mf2(var_54, 4); +// 3175, 29167, -27933, 26903 + +__riscv_vsetvl_e64m4(7); +vuint64m4_t var_42 = __riscv_vle64_v_u64m4(var_53, 7); +// 11254251074008699435, 5204823814932142037, 8646232476803655494, 15091079855619697854, 12516473234604987981, 1630341543898427294, 1369196052764304654 + +vint64m4_t var_44 = __riscv_vle64_v_i64m4(var_52, 7); +// 2989185173643568993, -1007222647130467543, 9035883417988087253, 356697895597171625, -688843516243652996, 8367631197042162633, 7921162693062268499 + +__riscv_vsetvl_e64m4(5); +vuint64m4_t var_45 = __riscv_vle64_v_u64m4(var_51, 5); +// 6626590334479776340, 2241199338160557252, 16060726272050137143, 17732233298880458138, 7263785864330966034 + +__riscv_vsetvl_e64m4(7); +vuint64m4_t var_46 = __riscv_vle64_v_u64m4(var_50, 7); +// 4933956119501726389, 6288763602173540886, 5410560154821202561, 17226305573183414225, 7665224654860515905, 6322483520866588520, 792086670759048161 + +__riscv_vsetvl_e32m4(7); +vbool8_t var_22 = __riscv_vmslt_vx_i32m4_b8(var_23, var_48, 7); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e64m4(8); +__riscv_vsse64_v_u64m4(var_74, var_75, var_24, 8); +__riscv_vsetvl_e64m4(4); +__riscv_vsse64_v_u64m4(var_76, var_77, var_25, 4); +__riscv_vsetvl_e64m4(6); +__riscv_vsse64_v_u64m4(var_78, var_79, var_26, 6); +__riscv_vsetvl_e64m4(3); +__riscv_vsse64_v_u64m4(var_80, var_81, var_27, 3); +__riscv_vsetvl_e64m4(5); +__riscv_vsse64_v_u64m4(var_82, var_83, var_28, 5); +__riscv_vsetvl_e64m4(1); +__riscv_vsse64_v_u64m4(var_84, var_85, var_29, 1); +__riscv_vsetvl_e32m2(7); +vbool16_t var_31 = __riscv_vmflt_vv_f32m2_b16(var_32, var_33, 7); +// 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool16_t var_9 = __riscv_vmadc_vv_u64m4_b16(var_37, var_38, 7); +// 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e64m4(3); +__riscv_vsse64_v_u64m4(var_86, var_87, var_39, 3); +__riscv_vsetvl_e64m4(2); +__riscv_vsse64_v_u64m4(var_88, var_89, var_40, 2); +__riscv_vsetvl_e16mf2(4); +int16_t var_6 = __riscv_vmv_x_s_i16mf2_i16(var_41); +// 3175 + +__riscv_vsetvl_e64m4(7); +vbool16_t var_43 = __riscv_vmsgt_vx_i64m4_b16(var_44, var_47, 7); +// 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e64m4(5); +__riscv_vsse64_v_u64m4(var_90, var_91, var_45, 5); +__riscv_vsetvl_e64m8(7); +vuint64m8_t var_19 = __riscv_vsbc_vvm_u64m8(var_20, var_21, var_22, 7); +// 1022779765633755549, 17935306811229140577, 17221724369435699125, 15061971275327810052, 13005726497157586263, 4436412244169350869, 15728201342694651764 + +if(!check(var_74, var_127, var_128)) {cerr << "check 126 fails" << endl; return_value = 1;} +if(!check(var_76, var_124, var_125)) {cerr << "check 123 fails" << endl; return_value = 1;} +if(!check(var_78, var_121, var_122)) {cerr << "check 120 fails" << endl; return_value = 1;} +if(!check(var_80, var_118, var_119)) {cerr << "check 117 fails" << endl; return_value = 1;} +if(!check(var_82, var_115, var_116)) {cerr << "check 114 fails" << endl; return_value = 1;} +if(!check(var_84, var_112, var_113)) {cerr << "check 111 fails" << endl; return_value = 1;} +__riscv_vsetvl_e32m2(7); +vbool16_t var_12 = __riscv_vmsbc_vxm_u32m2_b16(var_30, var_49, var_31, 7); +// 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +if(!check(var_86, var_109, var_110)) {cerr << "check 108 fails" << endl; return_value = 1;} +if(!check(var_88, var_106, var_107)) {cerr << "check 105 fails" << endl; return_value = 1;} +if(!check(var_90, var_103, var_104)) {cerr << "check 102 fails" << endl; return_value = 1;} +__riscv_vsetvl_e64m8(7); +uint64_t var_11 = __riscv_vmv_x_s_u64m8_u64(var_19); +// 1022779765633755549 + +__riscv_vsetvl_e8mf2(7); +vint16m1_t var_10 = __riscv_vwmaccsu_vv_i16m1_mu(var_12, var_34, var_35, var_36, 7); +// -2841, 1784, -11370, -27173, -9998, -544, -22845 + +vuint64m4_t var_4 = __riscv_vsbc_vxm_u64m4(var_42, var_11, var_43, 7); +// 10231471308374943886, 4182044049298386488, 7623452711169899944, 14068300089985942305, 11493693468971232432, 607561778264671745, 346416287130549105 + +vbool16_t var_5 = __riscv_vmadc_vxm_i16m1_b16(var_10, var_6, var_9, 7); +// 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vuint64m4_t var_2 = __riscv_vadd_vx_u64m4_mu(var_5, var_4, var_46, var_11, 7); +// 5956735885135481938, 4182044049298386488, 7623452711169899944, 14068300089985942305, 11493693468971232432, 7345263286500344069, 346416287130549105 + +__riscv_vsse64_v_u64m4(var_94, var_95, var_2, 7); +__riscv_vsetvl_e64m4(6); +__riscv_vsse64_v_u64m4(var_92, var_93, var_2, 6); +if(!check(var_94, var_97, var_98)) {cerr << "check 96 fails" << endl; return_value = 1;} +if(!check(var_92, var_100, var_101)) {cerr << "check 99 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-11.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-11.C new file mode 100644 index 00000000000..844e45162c9 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-11.C @@ -0,0 +1,463 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" + +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + + + +int main() +{ +int return_value = 0; + +size_t var_147 = 1u; +uint8_t var_146 [] = {150u}; +size_t var_144 = 1u; +int8_t var_143 [] = {5}; +size_t var_141 = 8u; +uint64_t var_140 [] = {2157312243695362217u}; +size_t var_138 = 1u; +int8_t var_137 [] = {5}; +size_t var_135 = 2u; +int16_t var_134 [] = {28606}; +size_t var_132 = 1u; +int8_t var_131 [] = {-3}; +int8_t var_129 [] = {-87}; +int16_t var_128 [] = {23919}; +int16_t var_127 [] = {-24506}; +int16_t var_126 [] = {20994}; +uint8_t var_125 [] = {7u}; +uint8_t var_124 [] = {19u}; +int8_t var_123 [] = {127, -119}; +int8_t var_122 [] = {-45, 89}; +int8_t var_121 [] = {84}; +uint32_t var_120 [] = {3102867433u, 3759812467u}; +uint32_t var_119 [] = {3244721859u, 17611546u}; +int8_t var_118 [] = {-54, 20}; +int8_t var_117 [] = {0, 121}; +uint16_t var_116 [] = {48601u, 39502u}; +uint16_t var_115 [] = {55110u, 60687u}; +int16_t var_114 [] = {-22328}; +int16_t var_113 [] = {28601}; +float32_t var_112 [] = {f32(2923498028u)}; +// -4.3892153800406675e-11 + +int8_t var_111 [] = {69, 42}; +int8_t var_110 [] = {89, 1}; +uint8_t var_109 [] = {78u, 68u}; +int8_t var_108 [] = {-76, 47}; +int8_t var_107 [] = {12, 94}; +uint64_t var_106 [] = {18400157712069531911u, 5717040025913777552u}; +uint64_t var_105 [] = {13184553937407245441u, 14207308214616682331u}; +uint64_t var_104 [] = {2157312243695362217u, 14090007358265115459u}; +uint64_t var_103 [] = {5599154151314945157u}; +uint8_t var_102 [] = {45u, 70u}; +uint8_t var_101 [] = {183u, 68u}; +uint8_t var_100 [] = {95u, 83u}; +int8_t var_99 [] = {-112, -63}; +int8_t var_98 [] = {60}; +uint16_t var_97 [] = {27441u}; +uint8_t var_96 [] = {86u}; +uint8_t var_95 [] = {218u}; +int32_t var_94 [] = {1349881114}; +int32_t var_93 [] = {-1370289438}; +int16_t var_92 [] = {-28549, -886}; +uint8_t var_91 [] = {24u, 242u}; +uint8_t var_90 [] = {96u, 57u}; +uint8_t var_89 [] = {109u}; +uint8_t var_88 [] = {150u}; +float32_t var_87 [] = {f32(482885409u), f32(825021819u)}; +// 1.3251208240642717e-21, 2.5150643789828564e-09 + +float32_t var_86 [] = {f32(3826107470u), f32(1715869719u)}; +// -1.0460544631490656e+22, 2.338682356976554e+23 + +size_t var_85 = 0u; +size_t var_84 = 0u; +size_t var_83 = 1u; +uint8_t var_82 = 75u; +int8_t var_81 = 5; +size_t var_80 = 0u; +int8_t var_79 = -90; +int8_t var_78 = -29; +float32_t var_77 = f32(3828347624u); +// -1.2982733811403788e+22 + +uint8_t var_76 = 110u; +uint16_t var_75 = 11809u; +__riscv_vsetvl_e16mf4(1); +vint16mf4_t var_22 = __riscv_vle16_v_i16mf4(var_128, 1); +// 23919 + +vint16mf4_t var_23 = __riscv_vle16_v_i16mf4(var_127, 1); +// -24506 + +vuint8mf8_t var_25 = __riscv_vle8_v_u8mf8(var_125, 1); +// 7 + +vuint8mf8_t var_26 = __riscv_vle8_v_u8mf8(var_124, 1); +// 19 + +__riscv_vsetvl_e8m1(2); +vint8m1_t var_28 = __riscv_vle8_v_i8m1(var_123, 2); +// 127, -119 + +vint8m1_t var_29 = __riscv_vle8_v_i8m1(var_122, 2); +// -45, 89 + +__riscv_vsetvl_e32mf2(2); +vuint32mf2_t var_31 = __riscv_vle32_v_u32mf2(var_120, 2); +// 3102867433, 3759812467 + +vuint32mf2_t var_32 = __riscv_vle32_v_u32mf2(var_119, 2); +// 3244721859, 17611546 + +__riscv_vsetvl_e8mf2(2); +vint8mf2_t var_34 = __riscv_vle8_v_i8mf2(var_118, 2); +// -54, 20 + +vint8mf2_t var_35 = __riscv_vle8_v_i8mf2(var_117, 2); +// 0, 121 + +vuint16m1_t var_36 = __riscv_vle16_v_u16m1(var_116, 2); +// 48601, 39502 + +vuint16m1_t var_37 = __riscv_vle16_v_u16m1(var_115, 2); +// 55110, 60687 + +__riscv_vsetvl_e16mf4(1); +vint16mf4_t var_39 = __riscv_vle16_v_i16mf4(var_114, 1); +// -22328 + +vint16mf4_t var_40 = __riscv_vle16_v_i16mf4(var_113, 1); +// 28601 + +vfloat32mf2_t var_41 = __riscv_vle32_v_f32mf2(var_112, 1); +// -4.3892153800406675e-11 + +__riscv_vsetvl_e8mf8(2); +vint8mf8_t var_43 = __riscv_vle8_v_i8mf8(var_111, 2); +// 69, 42 + +vint8mf8_t var_44 = __riscv_vle8_v_i8mf8(var_110, 2); +// 89, 1 + +vuint8mf8_t var_45 = __riscv_vle8_v_u8mf8(var_109, 2); +// 78, 68 + +vint8mf8_t var_47 = __riscv_vle8_v_i8mf8(var_108, 2); +// -76, 47 + +vint8mf8_t var_48 = __riscv_vle8_v_i8mf8(var_107, 2); +// 12, 94 + +vuint64m1_t var_49 = __riscv_vle64_v_u64m1(var_106, 2); +// 18400157712069531911, 5717040025913777552 + +vuint64m1_t var_50 = __riscv_vle64_v_u64m1(var_105, 2); +// 13184553937407245441, 14207308214616682331 + +vuint64m1_t var_51 = __riscv_vle64_v_u64m1(var_104, 2); +// 2157312243695362217, 14090007358265115459 + +vuint8mf8_t var_54 = __riscv_vle8_v_u8mf8(var_102, 2); +// 45, 70 + +vuint8mf8_t var_55 = __riscv_vle8_v_u8mf8(var_101, 2); +// 183, 68 + +vuint8mf8_t var_56 = __riscv_vle8_v_u8mf8(var_100, 2); +// 95, 83 + +__riscv_vsetvl_e8m4(2); +vint8m4_t var_57 = __riscv_vle8_v_i8m4(var_99, 2); +// -112, -63 + +__riscv_vsetvl_e16mf4(1); +vuint16mf4_t var_60 = __riscv_vle16_v_u16mf4(var_97, 1); +// 27441 + +vuint8mf8_t var_62 = __riscv_vle8_v_u8mf8(var_96, 1); +// 86 + +vint32mf2_t var_64 = __riscv_vle32_v_i32mf2(var_94, 1); +// 1349881114 + +vint32mf2_t var_65 = __riscv_vle32_v_i32mf2(var_93, 1); +// -1370289438 + +__riscv_vsetvl_e16m1(2); +vint16m1_t var_67 = __riscv_vle16_v_i16m1(var_92, 2); +// -28549, -886 + +vuint8mf2_t var_68 = __riscv_vle8_v_u8mf2(var_91, 2); +// 24, 242 + +vuint8mf2_t var_69 = __riscv_vle8_v_u8mf2(var_90, 2); +// 96, 57 + +__riscv_vsetvl_e8mf8(1); +vuint8mf8_t var_70 = __riscv_vle8_v_u8mf8(var_89, 1); +// 109 + +vuint8mf8_t var_71 = __riscv_vle8_v_u8mf8(var_88, 1); +// 150 + +__riscv_vsetvl_e32mf2(2); +vfloat32mf2_t var_73 = __riscv_vle32_v_f32mf2(var_87, 2); +// 1.3251208240642717e-21, 2.5150643789828564e-09 + +vfloat32mf2_t var_74 = __riscv_vle32_v_f32mf2(var_86, 2); +// -1.0460544631490656e+22, 2.338682356976554e+23 + +__riscv_vsetvl_e8mf8(1); +vbool64_t var_21 = __riscv_vmadc_vv_u8mf8_b64(var_25, var_26, 1); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32mf2(2); +vbool64_t var_27 = __riscv_vmsbc_vv_u32mf2_b64(var_31, var_32, 2); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m1(2); +vbool16_t var_33 = __riscv_vmsltu_vv_u16m1_b16(var_36, var_37, 2); +// 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32mf2(1); +vbool64_t var_38 = __riscv_vmfge_vf_f32mf2_b64(var_41, var_77, 1); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e8mf8(2); +vbool64_t var_42 = __riscv_vmsne_vx_u8mf8_b64(var_45, var_76, 2); +// 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool64_t var_46 = __riscv_vmadc_vv_i8mf8_b64(var_47, var_48, 2); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool64_t var_53 = __riscv_vmsltu_vv_u8mf8_b64(var_55, var_56, 2); +// 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e8m4(2); +int8_t var_9 = __riscv_vmv_x_s_i8m4_i8(var_57); +// -112 + +__riscv_vsetvl_e16mf4(1); +vbool64_t var_58 = __riscv_vmseq_vx_u16mf4_b64(var_60, var_75, 1); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool64_t var_61 = __riscv_vmadc_vv_i32mf2_b64(var_64, var_65, 1); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e8mf2(2); +vbool16_t var_66 = __riscv_vmsltu_vv_u8mf2_b16(var_68, var_69, 2); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32mf2(2); +vbool64_t var_72 = __riscv_vmfeq_vv_f32mf2_b64(var_73, var_74, 2); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e8mf2(2); +vint8mf2_t var_16 = __riscv_vnmsac_vx_i8mf2_mu(var_33, var_34, var_79, var_35, 2); +// -54, -98 + +__riscv_vsetvl_e8mf8(2); +vint8mf8_t var_14 = __riscv_vsll_vx_i8mf8_mu(var_42, var_43, var_44, var_80, 2); +// 89, 1 + +__riscv_vsetvl_e8mf2(2); +vint8mf2_t var_5 = __riscv_vnsra_wx_i8mf2_mu(var_66, var_16, var_67, var_83, 2); +// 61, -98 + +__riscv_vsetvl_e8mf8(2); +vint8mf8_t var_11 = __riscv_vmv_s_x_i8mf8_tu(var_14, var_81, 2); +// 5, 1 + +vint8mf8_t var_13 = __riscv_vrem_vv_i8mf8_mu(var_46, var_14, var_14, var_14, 2); +// 89, 1 + +__riscv_vsetvl_e8mf2(2); +int8_t var_3 = __riscv_vmv_x_s_i8mf2_i8(var_5); +// 61 + +__riscv_vsetvl_e8mf8(1); +vint8mf8_t var_10 = __riscv_vsra_vv_i8mf8_mu(var_53, var_11, var_13, var_54, 1); +// 5, 1 + +vint8mf8_t var_1 = __riscv_vmax_vx_i8mf8_mu(var_72, var_10, var_10, var_9, 1); +// 5, 1 + +vint8mf8_t var_0 = __riscv_vssra_vx_i8mf8(var_1, var_85, 1); +// 5 + +vbool64_t var_2 = __riscv_vmsbc_vx_i8mf8_b64(var_0, var_3, 1); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vint8mf8_t var_7 = __riscv_vmadd_vv_i8mf8(var_0, var_10, var_10, 1); +// 30 + +vint8mf8_t var_8 = __riscv_vnmsac_vv_i8mf8_mu(var_58, var_0, var_10, var_10, 1); +// 5 + +vint16mf4_t var_15 = __riscv_vwadd_wv_i16mf4_mu(var_38, var_39, var_40, var_0, 1); +// 28606 + +vint8m1_t var_17 = __riscv_vredmax_vs_i8mf8_i8m1_tum(var_27, var_28, var_0, var_29, 1); +// 5 + +vuint8mf8_t var_4 = __riscv_vslidedown_vx_u8mf8_mu(var_2, var_70, var_71, var_84, 1); +// 150 + +vuint64m1_t var_12 = __riscv_vminu_vv_u64m1_mu(var_2, var_49, var_50, var_51, 1); +// 2157312243695362217, 5717040025913777552 + +vint8mf8_t var_19 = __riscv_vxor_vx_i8mf8(var_7, var_78, 1); +// -3 + +__riscv_vse8_v_i8mf8(var_98, var_8, 1); +vint16mf4_t var_18 = __riscv_vnmsub_vv_i16mf4_mu(var_21, var_15, var_22, var_23, 1); +// 28606 + +__riscv_vsetvl_e8m1(1); +__riscv_vse8_v_i8m1(var_121, var_17, 1); +__riscv_vsetvl_e8mf8(1); +vuint8mf8_t var_6 = __riscv_vslide1down_vx_u8mf8_mu(var_61, var_4, var_62, var_82, 1); +// 150 + +__riscv_vse64_v_u64m1(var_103, var_12, 1); +__riscv_vse8_v_i8mf8(var_129, var_19, 1); +if(!check(var_98, var_143, var_144)) {cerr << "check 142 fails" << endl; return_value = 1;} +__riscv_vse16_v_i16mf4(var_126, var_18, 1); +if(!check(var_121, var_137, var_138)) {cerr << "check 136 fails" << endl; return_value = 1;} +__riscv_vse8_v_u8mf8(var_95, var_6, 1); +if(!check(var_103, var_140, var_141)) {cerr << "check 139 fails" << endl; return_value = 1;} +if(!check(var_129, var_131, var_132)) {cerr << "check 130 fails" << endl; return_value = 1;} +if(!check(var_126, var_134, var_135)) {cerr << "check 133 fails" << endl; return_value = 1;} +if(!check(var_95, var_146, var_147)) {cerr << "check 145 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-12.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-12.C new file mode 100644 index 00000000000..8a34681ec08 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-12.C @@ -0,0 +1,410 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" + +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + + + +int main() +{ +int return_value = 0; + +size_t var_115 = 40u; +int32_t var_114 [] = {-264546306, -442938235, -25165367, 277197762, 209641142, 362684255, -353277837, 71516967, 528078808, 489972595}; +size_t var_112 = 108u; +int32_t var_111 [] = {-2, -1776580354, -100935733, 1111812123, 840849367, 0, -6, 2, 7, 1965230406, 6, 587048909, 5, -2, 1549864288, -6, -1153689461, -105253108, -6, -341148625, 630712685, 0, -5, 6, 1447136930, -480839967, 5}; +size_t var_109 = 4u; +int32_t var_108 [] = {611390260}; +size_t var_106 = 4u; +int32_t var_105 [] = {1840887747}; +size_t var_103 = 40u; +int32_t var_102 [] = {-816540887, 1074541498, -1467236483, -23091331, -38787, 1943479342, 1158929439, 360172, -218, 2034278775}; +int32_t var_100 [] = {-816540887, 1074541498, -1467236483, -23091331, 1850866656, 1943479342, 1158929439, -1645280479, 33038044, -2008980594}; +int32_t var_99 [] = {313288711, -543659156, 1202816796, -810559622, -1270980824, -1377410090, 1638030817, 368815765, -1832418257, 2034278775}; +uint32_t var_98 [] = {1066929904u, 2075693420u, 3723502362u, 1157306766u, 3542592783u, 173123118u, 3085340519u, 3279843370u, 3114411799u, 3236429568u}; +int32_t var_97 [] = {27471981, 1558226339, 1368532512, 562981792, -699666433, -478438097, 2074857064, 1309781764, 1090945990, -460217404}; +int32_t var_96 [] = {611390260, -494288892, -223532379}; +int32_t var_95 [] = {-931418771, 2058489875, 1158330749}; +uint64_t var_94 [] = {14556376208032475046u, 5833208789700403480u, 1157993479819016279u}; +int32_t var_93 [] = {50124977, -2010901333, -323343415, 2042548864, 1762919923, 1578798468, -1943847888, -497410235, -1124767174, 489354840, -1634495923, 918157273, -1716837845, 1823613130, -506989223, 1123131520, -1036186091, -1164004288, 989073199, -685794952, 2118058458, 969467266, -1385934841, 689762453, 420322602, 731411311, -1070492662}; +int8_t var_92 [] = {14, -41, -71, -96, -35, 48, 53, -110, 39, -37, 76, -63, -96, 22, -23, -72, 117, -44, 26, -75, -34, -110, -108, 28, 44, -100, 55}; +int8_t var_91 [] = {-46, 111, 52, -120, 93, -94, -35, -55, -74, 89, -61, -87, -23, 42, -68, -22, 10, 113, -109, 94, -109, -98, -72, -19, 3, -115, -100}; +int32_t var_90 [] = {-477731693, 305877738, 1066229754, -257473693, 229248137, 1851876802, -1844169038, 46508752, 886475787, -1081571363, -5770198, -190018889, -929421817, -1749474005, 1558894777, -1979485493, 172675213, 1733144472, -1366889298, -388099806, -256437022, -1287006017, 116312829, 555170350, 29975705, 474535880, -12572110}; +int32_t var_89 [] = {-740841267, 1784734444, 885296255, 232626914, 524344314, -1135004276, -1259604814, 1218604527, -1956328319, -166954010, 1475664307, -820302557, 1319489943, -969946802, -922754621, -1977627704, -1642122010, 801249126, 1530252911, 601726132, -1949657604, 356460809, 1094731169, 244866984, -2134078335, 1355714511, -857890000}; +int32_t var_88 [] = {-1252496907, -462718098, -1645171364, 1924878529, 1840728102, -140561770, -1099830450, 1659537665, -735088671, 1575274729, 776451816, 603260147, 1400543513, -664997331, 778304278, -1288440206, -1282898944, 1476453512, -429241306}; +int32_t var_87 [] = {1945585950, 864203635, 1209218859, -554887622, 75881186, 972725791, -1748505186, 759028031, 832315667, 1227849569, 912821100, 93899445, 996939460, 70102251, -1281470572, -441799501, 434534834, -1094736801, 183476140}; +int32_t var_86 [] = {-662548274, -1016283636, -678529289, -1374767402, 547693855, 39374595, -2100415636, 1045036273, 1585896308, 1254672097, 2119844144, 658593947, 217285688, -599825074, -1272961101, 1376247089, 1097792926, 1938510943, 86458189}; +int32_t var_85 [] = {650012133}; +uint32_t var_84 [] = {1506339892u, 3032389102u, 2264141340u}; +uint32_t var_83 [] = {1244272689u, 3605280174u, 249999445u}; +uint16_t var_82 [] = {55425u, 21733u, 24021u}; +int8_t var_81 [] = {-96, 56, -51}; +int32_t var_80 [] = {906489201, 853207045, 1158615947, 385051420, -1881666604, 1056039959, 2029698451, -822148518, -70147701, -28252531}; +int32_t var_79 [] = {-478751518, -686702219, 1850149187}; +int32_t var_78 [] = {1517363023}; +int64_t var_77 [] = {-6384909153631110263, 478084338400603899, 8674034817296499378}; +int32_t var_76 [] = {-295895536, 1165059631, 1083784382, 102253897, -1050158885, 733183529, 649743538, -1370560321}; +int32_t var_75 [] = {630173376, 217474599, -392192168, 1169017537, -1981808051, 234785100, 1967357505, -854508923, -2090575119, 1620103754, -1829875160, -558024100, -1502376466, 718985372, -1758479107, 2059513417, 1320348890, -1412351855, 1831776784, -1482351523, -1490370921, -254109356, 1743677237, -1822233845, 406786422, -1160038665, -1555300747}; +int32_t var_74 [] = {796081589, 738512040, -1663632409, -417640541, -1531128964, 2137278520, 61292819, 1748365108, -1888868476, -539190547, 625293736, 1387000974, -2034806492, 644312826, 4563553, -1746729006, -47891367, -1851767633, -741826656, -458088927, -898387652, -1465478927, 1785251988, 1042338774, -968373069, 1744789043, 1910249816}; +int32_t var_73 [] = {-1000314334, -61728304, 775747052, -514542367, 87389826, -1463823334, 2026550032, 161054669, -736461663, -2063693057}; +int32_t var_72 [] = {1437870564, -855381478, -971412573, 95058807, -1546865772, 396939124, 488867202, 1026994048, 1928357960, -2078295055, 1954001616, -475625183, 1266317530, -204668953, -495147822, -1977722900, -1105363833, -605762683, 746509553}; +uint32_t var_71 [] = {1070824198u, 1140131026u, 1723265041u, 1043871346u}; +int32_t var_70 [] = {2014703800, -1985694148, 1342853562, -1929126064, -1998922839, 459974655, 1705733502, 1212559648, -1995599675, -772689156}; +int32_t var_69 [] = {1015011441, 690758444, 336758560, -1949471345, 1165709957, -1143872113, 371210739, -1269178714, 82762617, -1873001954, -1595860537, -957529004, 1852566624, -1214930274, -852146376, -1761152289, 1211999973, -2037874613, 1760794313}; +int32_t var_68 [] = {8564075, -1155918688, -521130966, -340145790, -427761651, 445629019, 1120575800, -839574359, 332653814, -1757977059, -682054231, -1724102212, 442667484, 2096140064, 151784864, -73841395}; +int32_t var_67 [] = {-1052504337, -1768016279, -92371658, 1120376198, 849413442, 1463253853, -1408397511, 295411381, 2126634640, 1973794481, -1032093961, 595612984, 1676035252, -1444431284, 1558428363, 1964212681, -1145125386, -96689033, 1800758577, -332584550, 639276760, -1358631972, 1569592097, -591212592, 1455701005, -472275892, -1952060344}; +int32_t var_66 = 1840887747; +int32_t var_65 = -1272714578; +int16_t var_64 = -23926; +uint64_t var_63 = 10489413838186398175u; +int8_t var_62 = 41; +uint16_t var_61 = 10386u; +int64_t var_60 = -976687698412213326; +__riscv_vsetvl_e32m8(10); +vint32m8_t var_20 = __riscv_vle32_v_i32m8(var_100, 10); +// -816540887, 1074541498, -1467236483, -23091331, 1850866656, 1943479342, 1158929439, -1645280479, 33038044, -2008980594 + +vint32m8_t var_21 = __riscv_vle32_v_i32m8(var_99, 10); +// 313288711, -543659156, 1202816796, -810559622, -1270980824, -1377410090, 1638030817, 368815765, -1832418257, 2034278775 + +vuint32m8_t var_22 = __riscv_vle32_v_u32m8(var_98, 10); +// 1066929904, 2075693420, 3723502362, 1157306766, 3542592783, 173123118, 3085340519, 3279843370, 3114411799, 3236429568 + +__riscv_vsetvl_e32m1(3); +vint32m1_t var_25 = __riscv_vle32_v_i32m1(var_96, 3); +// 611390260, -494288892, -223532379 + +vint32m1_t var_26 = __riscv_vle32_v_i32m1(var_95, 3); +// -931418771, 2058489875, 1158330749 + +vuint64m2_t var_27 = __riscv_vle64_v_u64m2(var_94, 3); +// 14556376208032475046, 5833208789700403480, 1157993479819016279 + +__riscv_vsetvl_e32m8(27); +vint32m8_t var_30 = __riscv_vle32_v_i32m8(var_93, 27); +// 50124977, -2010901333, -323343415, 2042548864, 1762919923, 1578798468, -1943847888, -497410235, -1124767174, 489354840, -1634495923, 918157273, -1716837845, 1823613130, -506989223, 1123131520, -1036186091, -1164004288, 989073199, -685794952, 2118058458, 969467266, -1385934841, 689762453, 420322602, 731411311, -1070492662 + +vint8m2_t var_31 = __riscv_vle8_v_i8m2(var_92, 27); +// 14, -41, -71, -96, -35, 48, 53, -110, 39, -37, 76, -63, -96, 22, -23, -72, 117, -44, 26, -75, -34, -110, -108, 28, 44, -100, 55 + +vint8m2_t var_32 = __riscv_vle8_v_i8m2(var_91, 27); +// -46, 111, 52, -120, 93, -94, -35, -55, -74, 89, -61, -87, -23, 42, -68, -22, 10, 113, -109, 94, -109, -98, -72, -19, 3, -115, -100 + +vint32m8_t var_33 = __riscv_vle32_v_i32m8(var_90, 27); +// -477731693, 305877738, 1066229754, -257473693, 229248137, 1851876802, -1844169038, 46508752, 886475787, -1081571363, -5770198, -190018889, -929421817, -1749474005, 1558894777, -1979485493, 172675213, 1733144472, -1366889298, -388099806, -256437022, -1287006017, 116312829, 555170350, 29975705, 474535880, -12572110 + +vint32m8_t var_34 = __riscv_vle32_v_i32m8(var_89, 27); +// -740841267, 1784734444, 885296255, 232626914, 524344314, -1135004276, -1259604814, 1218604527, -1956328319, -166954010, 1475664307, -820302557, 1319489943, -969946802, -922754621, -1977627704, -1642122010, 801249126, 1530252911, 601726132, -1949657604, 356460809, 1094731169, 244866984, -2134078335, 1355714511, -857890000 + +__riscv_vsetvl_e32m8(19); +vint32m8_t var_35 = __riscv_vle32_v_i32m8(var_88, 19); +// -1252496907, -462718098, -1645171364, 1924878529, 1840728102, -140561770, -1099830450, 1659537665, -735088671, 1575274729, 776451816, 603260147, 1400543513, -664997331, 778304278, -1288440206, -1282898944, 1476453512, -429241306 + +vint32m8_t var_36 = __riscv_vle32_v_i32m8(var_87, 19); +// 1945585950, 864203635, 1209218859, -554887622, 75881186, 972725791, -1748505186, 759028031, 832315667, 1227849569, 912821100, 93899445, 996939460, 70102251, -1281470572, -441799501, 434534834, -1094736801, 183476140 + +vint32m8_t var_37 = __riscv_vle32_v_i32m8(var_86, 19); +// -662548274, -1016283636, -678529289, -1374767402, 547693855, 39374595, -2100415636, 1045036273, 1585896308, 1254672097, 2119844144, 658593947, 217285688, -599825074, -1272961101, 1376247089, 1097792926, 1938510943, 86458189 + +__riscv_vsetvl_e32m1(3); +vuint32m1_t var_41 = __riscv_vle32_v_u32m1(var_84, 3); +// 1506339892, 3032389102, 2264141340 + +vuint32m1_t var_42 = __riscv_vle32_v_u32m1(var_83, 3); +// 1244272689, 3605280174, 249999445 + +vuint16mf2_t var_43 = __riscv_vle16_v_u16mf2(var_82, 3); +// 55425, 21733, 24021 + +vint8mf4_t var_44 = __riscv_vle8_v_i8mf4(var_81, 3); +// -96, 56, -51 + +__riscv_vsetvl_e32m8(10); +vint32m8_t var_45 = __riscv_vle32_v_i32m8(var_80, 10); +// 906489201, 853207045, 1158615947, 385051420, -1881666604, 1056039959, 2029698451, -822148518, -70147701, -28252531 + +__riscv_vsetvl_e32m2(3); +vint32m2_t var_47 = __riscv_vle32_v_i32m2(var_79, 3); +// -478751518, -686702219, 1850149187 + +vint64m4_t var_49 = __riscv_vle64_v_i64m4(var_77, 3); +// -6384909153631110263, 478084338400603899, 8674034817296499378 + +__riscv_vsetvl_e32m2(8); +vint32m2_t var_50 = __riscv_vle32_v_i32m2(var_76, 8); +// -295895536, 1165059631, 1083784382, 102253897, -1050158885, 733183529, 649743538, -1370560321 + +__riscv_vsetvl_e32m8(27); +vint32m8_t var_51 = __riscv_vle32_v_i32m8(var_75, 27); +// 630173376, 217474599, -392192168, 1169017537, -1981808051, 234785100, 1967357505, -854508923, -2090575119, 1620103754, -1829875160, -558024100, -1502376466, 718985372, -1758479107, 2059513417, 1320348890, -1412351855, 1831776784, -1482351523, -1490370921, -254109356, 1743677237, -1822233845, 406786422, -1160038665, -1555300747 + +__riscv_vsetvl_e32m8(10); +vint32m8_t var_53 = __riscv_vle32_v_i32m8(var_73, 10); +// -1000314334, -61728304, 775747052, -514542367, 87389826, -1463823334, 2026550032, 161054669, -736461663, -2063693057 + +__riscv_vsetvl_e32m8(19); +vint32m8_t var_54 = __riscv_vle32_v_i32m8(var_72, 19); +// 1437870564, -855381478, -971412573, 95058807, -1546865772, 396939124, 488867202, 1026994048, 1928357960, -2078295055, 1954001616, -475625183, 1266317530, -204668953, -495147822, -1977722900, -1105363833, -605762683, 746509553 + +__riscv_vsetvl_e32m1(4); +vuint32m1_t var_55 = __riscv_vle32_v_u32m1(var_71, 4); +// 1070824198, 1140131026, 1723265041, 1043871346 + +__riscv_vsetvl_e32m8(19); +vint32m8_t var_57 = __riscv_vle32_v_i32m8(var_69, 19); +// 1015011441, 690758444, 336758560, -1949471345, 1165709957, -1143872113, 371210739, -1269178714, 82762617, -1873001954, -1595860537, -957529004, 1852566624, -1214930274, -852146376, -1761152289, 1211999973, -2037874613, 1760794313 + +__riscv_vsetvl_e32m4(16); +vint32m4_t var_58 = __riscv_vle32_v_i32m4(var_68, 16); +// 8564075, -1155918688, -521130966, -340145790, -427761651, 445629019, 1120575800, -839574359, 332653814, -1757977059, -682054231, -1724102212, 442667484, 2096140064, 151784864, -73841395 + +__riscv_vsetvl_e32m8(27); +vint32m8_t var_59 = __riscv_vle32_v_i32m8(var_67, 27); +// -1052504337, -1768016279, -92371658, 1120376198, 849413442, 1463253853, -1408397511, 295411381, 2126634640, 1973794481, -1032093961, 595612984, 1676035252, -1444431284, 1558428363, 1964212681, -1145125386, -96689033, 1800758577, -332584550, 639276760, -1358631972, 1569592097, -591212592, 1455701005, -472275892, -1952060344 + +__riscv_vsetvl_e64m2(3); +vbool32_t var_24 = __riscv_vmsbc_vx_u64m2_b32(var_27, var_63, 3); +// 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e8m2(27); +vbool4_t var_29 = __riscv_vmsbc_vv_i8m2_b4(var_31, var_32, 27); +// 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool4_t var_28 = __riscv_vmseq_vv_i32m8_b4(var_33, var_34, 27); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16mf2(3); +vbool32_t var_40 = __riscv_vmadc_vx_u16mf2_b32(var_43, var_61, 3); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool32_t var_39 = __riscv_vmsgt_vx_i8mf4_b32(var_44, var_62, 3); +// 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e64m4(3); +vbool16_t var_46 = __riscv_vmsge_vx_i64m4_b16(var_49, var_60, 3); +// 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m2(8); +int32_t var_11 = __riscv_vmv_x_s_i32m2_i32(var_50); +// -295895536 + +__riscv_vsetvl_e32m1(4); +uint32_t var_5 = __riscv_vmv_x_s_u32m1_u32(var_55); +// 1070824198 + +__riscv_vsetvl_e32m4(16); +int32_t var_1 = __riscv_vmv_x_s_i32m4_i32(var_58); +// 8564075 + +__riscv_vsetvl_e16mf2(3); +vint32m1_t var_18 = __riscv_vwadd_wx_i32m1_mu(var_24, var_25, var_26, var_64, 3); +// 611390260, 2058465949, 1158306823 + +__riscv_vsetvl_e32m8(27); +vbool4_t var_17 = __riscv_vmsle_vx_i32m8_b4_mu(var_28, var_29, var_30, var_65, 27); +// 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m1(3); +vbool32_t var_14 = __riscv_vmseq_vv_u32m1_b32_mu(var_39, var_40, var_41, var_42, 3); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m8(27); +vint32m8_t var_0 = __riscv_vssub_vx_i32m8(var_59, var_1, 27); +// -1061068412, -1776580354, -100935733, 1111812123, 840849367, 1454689778, -1416961586, 286847306, 2118070565, 1965230406, -1040658036, 587048909, 1667471177, -1452995359, 1549864288, 1955648606, -1153689461, -105253108, 1792194502, -341148625, 630712685, -1367196047, 1561028022, -599776667, 1447136930, -480839967, -1960624419 + +__riscv_vsetvl_e32m8(19); +vint32m8_t var_16 = __riscv_vxor_vv_i32m8_mu(var_17, var_35, var_36, var_37, 19); +// -1418389040, -462718098, -1645171364, 1924878529, 1840728102, 1000493340, 352968434, 326378958, 1864039015, 1575274729, 1211288156, 603260147, 933204732, -669857371, 778304278, -1213369982, -1282898944, 1476453512, 264806625 + +__riscv_vsetvl_e32m8(10); +vint32m8_t var_4 = __riscv_vmulhsu_vx_i32m8(var_0, var_5, 10); +// -264546306, -442938235, -25165367, 277197762, 209641142, 362684255, -353277837, 71516967, 528078808, 489972595 + +__riscv_vsetvl_e32m8(27); +vint32m8_t var_10 = __riscv_vdiv_vx_i32m8_mu(var_17, var_0, var_51, var_11, 27); +// -2, -1776580354, -100935733, 1111812123, 840849367, 0, -6, 2, 7, 1965230406, 6, 587048909, 5, -2, 1549864288, -6, -1153689461, -105253108, -6, -341148625, 630712685, 0, -5, 6, 1447136930, -480839967, 5 + +__riscv_vsetvl_e32m8(19); +vbool4_t var_8 = __riscv_vmsne_vv_i32m8_b4(var_16, var_54, 19); +// 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m8(10); +__riscv_vse32_v_i32m8(var_70, var_4, 10); +__riscv_vsetvl_e32m8(27); +__riscv_vse32_v_i32m8(var_74, var_10, 27); +__riscv_vsetvl_e32m8(19); +vint32m8_t var_2 = __riscv_vaadd_vx_i32m8_mu(var_8, var_0, var_57, var_11, 19); +// 359557953, 197431454, 20431512, -1122683440, 434907211, -719883824, 37657602, -782537125, -106566459, -1084448745, -945878036, -626712270, 778335544, -755412905, -574020956, -1028523912, 458052219, -1166885074, 732449389, -341148625, 630712685, -1367196047, 1561028022, -599776667, 1447136930, -480839967, -1960624419 + +if(!check(var_70, var_114, var_115)) {cerr << "check 113 fails" << endl; return_value = 1;} +if(!check(var_74, var_111, var_112)) {cerr << "check 110 fails" << endl; return_value = 1;} +vint32m8_t var_3 = __riscv_vmulh_vx_i32m8(var_2, var_11, 19); +// -24771224, -13601754, -1407600, 77345645, -29962301, 49595350, -2594366, 53911759, 7341741, 74711521, 65164893, 43176431, -53622298, 52043075, 39546340, 70858661, -31556843, 80390852, -50461038 + +__riscv_vsetvl_e32m8(3); +vint32m1_t var_6 = __riscv_vredmin_vs_i32m8_i32m1_tu(var_18, var_2, var_18, 3); +// 20431512 + +__riscv_vsetvl_e32m8(10); +vint32m8_t var_9 = __riscv_vasub_vv_i32m8(var_2, var_53, 10); +// 679936144, 129579879, -377657770, -304070536, 173758693, 371969755, -994446215, -471795897, 314947602, 489622156 + +__riscv_vsetvl_e32m8(19); +vint32m8_t var_15 = __riscv_vmv_s_x_i32m8_tu(var_3, var_66, 19); +// 1840887747, -13601754, -1407600, 77345645, -29962301, 49595350, -2594366, 53911759, 7341741, 74711521, 65164893, 43176431, -53622298, 52043075, 39546340, 70858661, -31556843, 80390852, -50461038 + +__riscv_vsetvl_e32m1(1); +vint32m1_t var_7 = __riscv_vrem_vx_i32m1_mu(var_14, var_6, var_18, var_11, 1); +// 19599188, 2058465949, 1158306823 + +__riscv_vsetvl_e32m8(10); +vbool4_t var_13 = __riscv_vmsge_vv_i32m8_b4(var_9, var_45, 10); +// 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m8(1); +__riscv_vse32_v_i32m8(var_85, var_15, 1); +__riscv_vsetvl_e32m2(1); +vint32m1_t var_12 = __riscv_vredxor_vs_i32m2_i32m1_tum(var_46, var_7, var_47, var_18, 1); +// 611390260 + +__riscv_vsetvl_e32m8(10); +vint32m8_t var_19 = __riscv_vssra_vv_i32m8_mu(var_13, var_20, var_21, var_22, 10); +// -816540887, 1074541498, -1467236483, -23091331, -38787, 1943479342, 1158929439, 360172, -218, 2034278775 + +if(!check(var_85, var_105, var_106)) {cerr << "check 104 fails" << endl; return_value = 1;} +__riscv_vsetvl_e32m1(1); +__riscv_vse32_v_i32m1(var_78, var_12, 1); +__riscv_vsetvl_e32m8(10); +__riscv_vse32_v_i32m8(var_97, var_19, 10); +if(!check(var_78, var_108, var_109)) {cerr << "check 107 fails" << endl; return_value = 1;} +if(!check(var_97, var_102, var_103)) {cerr << "check 101 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-13.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-13.C new file mode 100644 index 00000000000..6485e45df19 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-13.C @@ -0,0 +1,481 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" + +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + + + +int main() +{ +int return_value = 0; + +size_t var_192 = 4u; +uint8_t var_191 [] = {102u, 37u, 103u, 76u}; +size_t var_189 = 28u; +uint8_t var_188 [] = {218u, 150u, 128u, 18u, 225u, 117u, 251u, 84u, 180u, 34u, 174u, 111u, 22u, 157u, 36u, 97u, 83u, 101u, 93u, 143u, 249u, 110u, 224u, 213u, 111u, 205u, 125u, 70u}; +size_t var_186 = 15u; +uint8_t var_185 [] = {43u, 165u, 118u, 143u, 24u, 178u, 108u, 42u, 168u, 165u, 210u, 11u, 242u, 151u, 76u}; +size_t var_183 = 9u; +uint8_t var_182 [] = {124u, 139u, 130u, 178u, 131u, 94u, 153u, 139u, 0u}; +size_t var_180 = 5u; +uint8_t var_179 [] = {163u, 112u, 39u, 165u, 124u}; +size_t var_177 = 13u; +uint8_t var_176 [] = {8u, 244u, 149u, 106u, 11u, 74u, 10u, 105u, 180u, 241u, 53u, 11u, 14u}; +size_t var_174 = 10u; +uint8_t var_173 [] = {7u, 86u, 55u, 184u, 15u, 158u, 72u, 233u, 133u, 233u}; +size_t var_171 = 20u; +uint8_t var_170 [] = {51u, 84u, 251u, 79u, 169u, 178u, 97u, 33u, 90u, 0u, 91u, 158u, 224u, 205u, 75u, 28u, 3u, 218u, 110u, 90u}; +size_t var_168 = 64u; +uint8_t var_167 [] = {193u, 150u, 153u, 49u, 201u, 26u, 151u, 177u, 167u, 78u, 105u, 182u, 74u, 188u, 91u, 167u, 169u, 137u, 194u, 116u, 89u, 32u, 229u, 69u, 41u, 252u, 20u, 101u, 127u, 181u, 204u, 81u, 157u, 27u, 85u, 143u, 67u, 82u, 45u, 110u, 157u, 132u, 218u, 206u, 0u, 101u, 226u, 175u, 46u, 227u, 57u, 15u, 219u, 103u, 165u, 35u, 243u, 191u, 90u, 217u, 152u, 19u, 91u, 133u}; +size_t var_165 = 64u; +uint8_t var_164 [] = {77u, 114u, 183u, 24u, 17u, 94u, 48u, 21u, 117u, 158u, 135u, 138u, 31u, 122u, 24u, 134u, 116u, 146u, 130u, 126u, 60u, 82u, 62u, 217u, 175u, 210u, 31u, 180u, 137u, 136u, 119u, 224u, 115u, 60u, 73u, 187u, 165u, 6u, 123u, 41u, 140u, 75u, 173u, 237u, 210u, 128u, 157u, 81u, 173u, 227u, 236u, 176u, 203u, 81u, 113u, 211u, 142u, 120u, 71u, 3u, 215u, 194u, 147u, 7u}; +size_t var_162 = 64u; +uint8_t var_161 [] = {153u, 5u, 190u, 157u, 3u, 204u, 9u, 23u, 106u, 85u, 136u, 151u, 36u, 117u, 108u, 208u, 112u, 101u, 37u, 170u, 107u, 153u, 81u, 21u, 239u, 77u, 211u, 159u, 1u, 231u, 118u, 233u, 97u, 229u, 24u, 35u, 33u, 113u, 169u, 198u, 192u, 22u, 103u, 8u, 176u, 225u, 132u, 22u, 195u, 77u, 229u, 177u, 38u, 149u, 49u, 70u, 33u, 139u, 198u, 128u, 246u, 221u, 105u, 211u}; +size_t var_159 = 64u; +uint8_t var_158 [] = {188u, 58u, 189u, 90u, 72u, 84u, 231u, 86u, 207u, 205u, 250u, 157u, 37u, 30u, 193u, 252u, 149u, 65u, 253u, 57u, 125u, 26u, 29u, 236u, 55u, 174u, 88u, 53u, 236u, 118u, 204u, 66u, 70u, 228u, 8u, 74u, 97u, 162u, 220u, 206u, 143u, 50u, 193u, 29u, 117u, 127u, 236u, 135u, 143u, 224u, 30u, 170u, 236u, 210u, 118u, 122u, 13u, 193u, 250u, 77u, 162u, 235u, 191u, 123u}; +size_t var_156 = 64u; +uint8_t var_155 [] = {159u, 134u, 70u, 200u, 59u, 48u, 113u, 117u, 231u, 150u, 13u, 183u, 113u, 25u, 160u, 112u, 25u, 5u, 193u, 228u, 218u, 71u, 75u, 70u, 229u, 34u, 169u, 0u, 153u, 225u, 29u, 188u, 91u, 124u, 51u, 133u, 74u, 135u, 145u, 161u, 5u, 16u, 159u, 184u, 207u, 228u, 146u, 219u, 135u, 122u, 70u, 63u, 53u, 20u, 137u, 143u, 109u, 121u, 26u, 29u, 158u, 80u, 50u, 221u}; +size_t var_153 = 64u; +uint8_t var_152 [] = {79u, 159u, 83u, 78u, 250u, 26u, 87u, 16u, 25u, 209u, 33u, 16u, 225u, 96u, 23u, 234u, 142u, 195u, 225u, 96u, 171u, 47u, 189u, 12u, 113u, 206u, 40u, 71u, 78u, 21u, 238u, 249u, 180u, 79u, 69u, 30u, 155u, 99u, 186u, 232u, 222u, 44u, 86u, 201u, 140u, 83u, 211u, 90u, 187u, 95u, 213u, 55u, 87u, 13u, 234u, 182u, 142u, 218u, 205u, 113u, 119u, 200u, 212u, 212u}; +size_t var_150 = 64u; +uint8_t var_149 [] = {228u, 198u, 218u, 214u, 109u, 137u, 15u, 175u, 108u, 239u, 230u, 253u, 181u, 238u, 239u, 198u, 214u, 161u, 167u, 255u, 83u, 102u, 254u, 197u, 197u, 186u, 46u, 112u, 173u, 103u, 78u, 76u, 239u, 125u, 111u, 102u, 146u, 94u, 237u, 250u, 191u, 150u, 91u, 143u, 133u, 251u, 89u, 153u, 181u, 197u, 45u, 242u, 4u, 179u, 51u, 155u, 2u, 145u, 194u, 183u, 117u, 46u, 237u, 93u}; +size_t var_147 = 64u; +uint8_t var_146 [] = {119u, 148u, 1u, 75u, 38u, 246u, 148u, 30u, 43u, 208u, 250u, 228u, 52u, 216u, 11u, 216u, 223u, 55u, 17u, 110u, 248u, 126u, 249u, 164u, 77u, 108u, 220u, 253u, 123u, 61u, 197u, 169u, 231u, 139u, 235u, 206u, 53u, 29u, 198u, 94u, 172u, 30u, 206u, 241u, 124u, 19u, 214u, 130u, 190u, 183u, 42u, 225u, 164u, 84u, 129u, 198u, 240u, 113u, 22u, 22u, 88u, 242u, 188u, 106u}; +size_t var_144 = 64u; +uint8_t var_143 [] = {223u, 132u, 231u, 84u, 77u, 212u, 175u, 94u, 84u, 109u, 23u, 55u, 39u, 41u, 138u, 83u, 41u, 79u, 40u, 181u, 204u, 178u, 59u, 224u, 76u, 207u, 64u, 199u, 157u, 29u, 235u, 90u, 171u, 129u, 222u, 86u, 72u, 97u, 94u, 74u, 183u, 187u, 147u, 10u, 215u, 89u, 234u, 60u, 243u, 180u, 105u, 49u, 197u, 207u, 35u, 251u, 153u, 111u, 195u, 122u, 211u, 197u, 35u, 74u}; +size_t var_141 = 64u; +uint8_t var_140 [] = {101u, 3u, 188u, 105u, 18u, 217u, 42u, 77u, 31u, 217u, 220u, 77u, 84u, 145u, 131u, 31u, 211u, 237u, 57u, 88u, 203u, 161u, 221u, 237u, 253u, 18u, 85u, 120u, 182u, 16u, 143u, 147u, 54u, 234u, 91u, 19u, 101u, 182u, 231u, 211u, 226u, 112u, 5u, 36u, 177u, 202u, 102u, 115u, 123u, 101u, 180u, 218u, 175u, 219u, 61u, 77u, 122u, 29u, 43u, 30u, 214u, 108u, 204u, 157u}; +size_t var_138 = 64u; +uint8_t var_137 [] = {42u, 93u, 89u, 6u, 100u, 143u, 38u, 7u, 46u, 15u, 31u, 241u, 23u, 37u, 103u, 102u, 23u, 138u, 45u, 239u, 76u, 191u, 112u, 167u, 90u, 200u, 40u, 61u, 137u, 51u, 38u, 144u, 151u, 197u, 152u, 43u, 80u, 162u, 113u, 99u, 93u, 63u, 32u, 146u, 129u, 195u, 175u, 127u, 204u, 223u, 99u, 217u, 247u, 60u, 161u, 231u, 136u, 51u, 101u, 97u, 13u, 247u, 226u, 198u}; +size_t var_135 = 64u; +uint8_t var_134 [] = {142u, 79u, 103u, 76u, 102u, 37u, 29u, 203u, 48u, 40u, 10u, 81u, 10u, 247u, 251u, 199u, 10u, 92u, 66u, 83u, 212u, 79u, 17u, 102u, 211u, 60u, 136u, 183u, 253u, 50u, 39u, 207u, 115u, 9u, 34u, 28u, 153u, 200u, 20u, 149u, 63u, 212u, 209u, 34u, 34u, 176u, 163u, 50u, 2u, 170u, 121u, 59u, 58u, 157u, 73u, 97u, 174u, 63u, 88u, 69u, 147u, 37u, 229u, 166u}; +uint8_t var_132 [] = {45u, 14u, 147u, 190u}; +uint8_t var_131 [] = {142u, 79u, 184u, 76u, 148u, 29u, 29u, 203u, 48u, 40u, 10u, 81u, 10u, 247u, 251u, 199u, 10u, 92u, 66u, 83u, 212u, 79u, 17u, 102u, 211u, 60u, 136u, 183u, 253u, 50u, 39u, 207u, 115u, 9u, 34u, 28u, 153u, 200u, 20u, 149u, 63u, 212u, 209u, 34u, 34u, 176u, 163u, 50u, 2u, 170u, 121u, 59u, 58u, 157u, 73u, 97u, 174u, 63u, 88u, 69u, 147u, 37u, 229u, 166u}; +uint8_t var_129 [] = {4u, 5u, 2u, 3u}; +uint8_t var_127 [] = {42u, 143u, 89u, 3u, 151u, 51u, 254u, 7u, 76u, 15u, 23u, 241u, 23u, 236u, 129u, 92u, 23u, 138u, 45u, 255u, 87u, 191u, 112u, 167u, 90u, 200u, 40u, 61u, 137u, 51u, 38u, 144u, 151u, 197u, 152u, 43u, 80u, 162u, 113u, 99u, 93u, 63u, 32u, 146u, 129u, 195u, 175u, 127u, 204u, 223u, 99u, 217u, 247u, 60u, 161u, 231u, 136u, 51u, 101u, 97u, 13u, 247u, 226u, 198u}; +uint8_t var_126 [] = {15u, 13u, 14u, 20u, 6u, 5u, 8u, 19u, 4u, 10u, 3u, 1u}; +uint8_t var_124 [] = {101u, 3u, 72u, 105u, 85u, 45u, 112u, 77u, 31u, 217u, 220u, 77u, 84u, 145u, 131u, 31u, 211u, 237u, 57u, 88u, 203u, 161u, 221u, 237u, 253u, 18u, 85u, 120u, 182u, 16u, 143u, 147u, 54u, 234u, 91u, 19u, 101u, 182u, 231u, 211u, 226u, 112u, 5u, 36u, 177u, 202u, 102u, 115u, 123u, 101u, 180u, 218u, 175u, 219u, 61u, 77u, 122u, 29u, 43u, 30u, 214u, 108u, 204u, 157u}; +uint8_t var_123 [] = {4u, 5u, 2u, 6u}; +uint8_t var_121 [] = {234u, 232u, 117u, 114u, 77u, 212u, 175u, 101u, 84u, 109u, 11u, 55u, 175u, 41u, 138u, 70u, 60u, 192u, 40u, 181u, 204u, 178u, 59u, 224u, 76u, 207u, 64u, 199u, 157u, 29u, 235u, 90u, 171u, 129u, 222u, 86u, 72u, 97u, 94u, 74u, 183u, 187u, 147u, 10u, 215u, 89u, 234u, 60u, 243u, 180u, 105u, 49u, 197u, 207u, 35u, 251u, 153u, 111u, 195u, 122u, 211u, 197u, 35u, 74u}; +uint8_t var_120 [] = {1u, 17u, 15u, 2u, 0u, 16u, 10u, 3u, 7u, 12u}; +uint8_t var_118 [] = {178u, 249u, 174u, 140u, 137u, 66u, 84u, 19u, 111u, 207u, 81u, 7u, 127u, 233u, 36u, 180u, 221u, 193u, 229u, 152u, 98u, 64u, 14u, 46u, 127u, 183u, 215u, 211u}; +uint8_t var_117 [] = {208u, 222u, 1u, 14u, 38u, 246u, 148u, 212u, 43u, 72u, 250u, 255u, 222u, 205u, 231u, 215u, 188u, 55u, 223u, 110u, 248u, 126u, 249u, 63u, 245u, 108u, 209u, 188u, 234u, 61u, 42u, 169u, 231u, 185u, 235u, 30u, 237u, 0u, 129u, 75u, 172u, 30u, 206u, 241u, 124u, 78u, 214u, 130u, 190u, 127u, 24u, 225u, 164u, 84u, 247u, 198u, 240u, 113u, 22u, 22u, 88u, 242u, 188u, 106u}; +uint8_t var_115 [] = {11u, 26u, 14u, 15u, 35u, 33u, 28u, 50u, 27u, 0u, 37u, 3u, 45u, 39u, 38u, 9u, 16u, 36u, 18u, 24u, 13u, 23u, 1u, 49u, 30u, 54u, 12u, 7u}; +uint8_t var_113 [] = {216u, 191u, 218u, 203u, 109u, 137u, 15u, 175u, 196u, 58u, 213u, 149u, 181u, 77u, 239u, 150u, 214u, 161u, 167u, 167u, 83u, 52u, 254u, 195u, 159u, 186u, 46u, 112u, 173u, 74u, 78u, 215u, 239u, 208u, 184u, 238u, 146u, 94u, 237u, 250u, 191u, 150u, 91u, 143u, 133u, 251u, 89u, 153u, 181u, 197u, 45u, 242u, 4u, 179u, 51u, 155u, 2u, 145u, 194u, 183u, 117u, 46u, 237u, 93u}; +uint8_t var_112 [] = {35u, 23u, 29u, 31u, 10u, 34u, 13u, 9u, 0u, 19u, 1u, 11u, 3u, 8u, 33u, 24u, 21u, 15u}; +uint8_t var_110 [] = {138u, 33u, 49u, 97u, 45u, 198u, 56u, 240u, 252u, 219u, 200u, 209u, 137u, 195u, 92u}; +uint8_t var_109 [] = {172u, 159u, 83u, 78u, 109u, 26u, 87u, 16u, 25u, 209u, 124u, 162u, 4u, 118u, 90u, 234u, 142u, 207u, 225u, 229u, 171u, 170u, 185u, 195u, 18u, 246u, 40u, 71u, 113u, 21u, 238u, 249u, 180u, 79u, 69u, 30u, 155u, 99u, 186u, 232u, 222u, 44u, 86u, 201u, 140u, 83u, 211u, 90u, 187u, 95u, 213u, 55u, 87u, 13u, 234u, 182u, 142u, 218u, 205u, 113u, 119u, 200u, 212u, 212u}; +uint8_t var_107 [] = {11u, 14u, 17u, 21u, 13u, 28u, 0u, 4u, 25u, 19u, 10u, 12u, 24u, 23u, 22u}; +uint8_t var_105 [] = {13u, 237u, 250u, 59u, 182u, 192u, 21u, 32u, 203u}; +uint8_t var_104 [] = {159u, 134u, 70u, 95u, 95u, 48u, 103u, 117u, 231u, 24u, 133u, 183u, 113u, 102u, 29u, 201u, 25u, 165u, 193u, 228u, 218u, 71u, 75u, 70u, 229u, 34u, 169u, 0u, 153u, 225u, 29u, 188u, 91u, 124u, 51u, 133u, 74u, 135u, 145u, 161u, 5u, 16u, 159u, 184u, 207u, 228u, 146u, 219u, 135u, 122u, 70u, 63u, 53u, 20u, 137u, 143u, 109u, 121u, 26u, 29u, 158u, 80u, 50u, 221u}; +uint8_t var_102 [] = {10u, 17u, 3u, 13u, 6u, 9u, 14u, 4u, 15u}; +uint8_t var_100 [] = {25u, 133u, 241u, 41u, 211u}; +uint8_t var_99 [] = {188u, 58u, 39u, 90u, 61u, 84u, 29u, 87u, 153u, 205u, 250u, 157u, 37u, 30u, 193u, 252u, 149u, 65u, 253u, 57u, 125u, 26u, 29u, 236u, 55u, 174u, 88u, 53u, 236u, 118u, 204u, 66u, 70u, 228u, 8u, 74u, 97u, 162u, 220u, 206u, 143u, 50u, 193u, 29u, 117u, 127u, 236u, 135u, 143u, 224u, 30u, 170u, 236u, 210u, 118u, 122u, 13u, 193u, 250u, 77u, 162u, 235u, 191u, 123u}; +uint8_t var_97 [] = {6u, 8u, 4u, 7u, 2u}; +uint8_t var_95 [] = {224u, 24u, 145u, 6u, 229u, 27u, 42u, 184u, 245u, 245u, 147u, 192u, 243u}; +uint8_t var_94 [] = {161u, 9u, 158u, 187u, 105u, 240u, 194u, 23u, 106u, 167u, 254u, 214u, 118u, 117u, 108u, 55u, 112u, 101u, 37u, 170u, 107u, 163u, 81u, 21u, 239u, 77u, 211u, 159u, 1u, 231u, 118u, 233u, 97u, 229u, 24u, 35u, 33u, 113u, 169u, 198u, 192u, 22u, 103u, 8u, 176u, 225u, 132u, 22u, 195u, 77u, 229u, 177u, 38u, 149u, 49u, 70u, 33u, 139u, 198u, 128u, 246u, 221u, 105u, 211u}; +uint8_t var_92 [] = {11u, 5u, 6u, 3u, 10u, 4u, 2u, 21u, 12u, 1u, 9u, 15u, 0u}; +uint8_t var_90 [] = {55u, 37u, 107u, 142u, 199u, 169u, 227u, 62u, 33u, 124u}; +uint8_t var_89 [] = {135u, 199u, 183u, 24u, 17u, 94u, 131u, 106u, 117u, 149u, 115u, 138u, 148u, 208u, 244u, 134u, 141u, 146u, 130u, 126u, 60u, 82u, 62u, 217u, 175u, 210u, 31u, 180u, 137u, 136u, 119u, 224u, 115u, 60u, 73u, 187u, 165u, 6u, 123u, 41u, 140u, 75u, 173u, 237u, 210u, 128u, 157u, 81u, 173u, 227u, 236u, 176u, 203u, 81u, 113u, 211u, 142u, 120u, 71u, 3u, 215u, 194u, 147u, 7u}; +uint8_t var_87 [] = {9u, 13u, 14u, 10u, 0u, 16u, 1u, 7u, 12u, 6u}; +uint8_t var_85 [] = {238u, 235u, 76u, 230u, 21u, 219u, 6u, 115u, 155u, 139u, 124u, 147u, 146u, 182u, 208u, 168u, 26u, 139u, 22u, 240u}; +uint8_t var_84 [] = {10u, 14u, 156u, 49u, 181u, 26u, 151u, 177u, 158u, 78u, 105u, 182u, 74u, 178u, 91u, 167u, 169u, 137u, 49u, 116u, 82u, 49u, 174u, 213u, 41u, 252u, 238u, 82u, 127u, 181u, 204u, 139u, 139u, 80u, 225u, 143u, 181u, 128u, 187u, 110u, 157u, 132u, 218u, 206u, 0u, 101u, 226u, 175u, 46u, 227u, 57u, 15u, 219u, 103u, 165u, 35u, 243u, 191u, 90u, 217u, 152u, 19u, 91u, 133u}; +uint8_t var_82 [] = {23u, 31u, 32u, 2u, 1u, 37u, 26u, 38u, 27u, 4u, 33u, 20u, 8u, 0u, 18u, 22u, 21u, 36u, 34u, 13u}; +uint8_t var_80 [] = {51u, 84u, 251u, 79u, 169u, 178u, 97u, 33u, 90u, 0u, 91u, 158u, 224u, 205u, 75u, 28u, 3u, 218u, 110u, 90u}; +uint8_t var_79 [] = {69u, 81u, 157u, 153u, 150u, 82u, 20u, 45u, 101u, 201u, 27u, 89u, 167u, 193u, 194u, 229u, 32u, 67u, 85u, 188u}; +uint8_t var_78 [] = {7u, 86u, 55u, 184u, 15u, 158u, 72u, 233u, 133u, 233u}; +uint8_t var_77 [] = {158u, 122u, 24u, 135u, 77u, 116u, 114u, 21u, 31u, 48u}; +uint8_t var_76 [] = {8u, 244u, 149u, 106u, 11u, 74u, 10u, 105u, 180u, 241u, 53u, 11u, 14u}; +uint8_t var_75 [] = {151u, 204u, 9u, 157u, 136u, 3u, 190u, 153u, 36u, 5u, 85u, 208u, 153u}; +uint8_t var_74 [] = {163u, 112u, 39u, 165u, 124u}; +uint8_t var_73 [] = {231u, 207u, 72u, 86u, 189u}; +uint8_t var_72 [] = {124u, 139u, 130u, 178u, 131u, 94u, 153u, 139u, 0u}; +uint8_t var_71 [] = {13u, 5u, 200u, 25u, 113u, 150u, 160u, 59u, 112u}; +uint8_t var_70 [] = {43u, 165u, 118u, 143u, 24u, 178u, 108u, 42u, 168u, 165u, 210u, 11u, 242u, 151u, 76u}; +uint8_t var_69 [] = {16u, 23u, 195u, 47u, 96u, 78u, 79u, 250u, 206u, 96u, 33u, 225u, 113u, 12u, 189u}; +uint8_t var_68 [] = {102u, 129u, 39u, 76u, 226u, 43u, 174u, 239u, 160u, 251u, 130u, 253u, 210u, 44u, 57u, 197u, 38u, 134u}; +uint8_t var_67 [] = {218u, 150u, 128u, 18u, 225u, 117u, 251u, 84u, 180u, 34u, 174u, 111u, 22u, 157u, 36u, 97u, 83u, 101u, 93u, 143u, 249u, 110u, 224u, 213u, 111u, 205u, 125u, 70u}; +uint8_t var_66 [] = {228u, 220u, 11u, 216u, 206u, 139u, 123u, 42u, 253u, 119u, 29u, 75u, 19u, 94u, 198u, 208u, 223u, 53u, 17u, 77u, 216u, 164u, 148u, 183u, 197u, 129u, 52u, 30u}; +uint8_t var_65 [] = {129u, 184u, 39u, 26u}; +uint8_t var_64 [] = {165u, 172u, 17u, 195u}; +uint8_t var_63 [] = {224u, 255u, 179u, 223u}; +uint16_t var_62 [] = {2059u, 50136u, 19961u, 19085u}; +uint8_t var_61 [] = {132u, 79u, 83u, 231u, 223u, 41u, 23u, 84u, 94u, 39u}; +uint8_t var_60 [] = {64u, 170u, 250u, 169u, 211u, 59u, 143u, 124u, 179u, 165u, 180u, 8u, 238u, 216u, 187u, 137u, 252u, 103u}; +uint8_t var_59 [] = {18u, 217u, 188u, 42u}; +int32_t var_58 [] = {1549578886, 969508556, -1463606770, -570949145, 1223843346, 1203925732, -1372815026, -2071636721, -1347273561, 1979176278, -400677652, -1516821114, 1686741600, -1626075227, -557106289, -1989226629, 1303206559, -2019568180}; +int16_t var_57 [] = {-17838, 21382, -24007, -28159, -7245, -8296, 4536, 4740, 31886, 7470, 6598, -11304, 5070, -7833, 19880, 30169, -19576, -29825}; +int16_t var_56 [] = {27831, 17164, 25700, 20703, -9305, -13961, 3432, 31251, 31239, 2575, -3550, -22407, 22422, 3341, -11592, 3163, -18912, 24474}; +int32_t var_55 [] = {-1410347872, -1203450804, 66771613, -223741775, -1141905884, 2138341856, -752061869, 736817258, -189959542, -1177808016, -864391040, -568227585, -1975568427, -1180804129, 119944555, 47776326, 1126587728, 445410999}; +int32_t var_54 [] = {193247136, 856811342, -1426659505, -602051769, -1581588484, 586962190, 2128307703, -680727552, -1153985669, -2086855987, 1290791744, -1617390193, -828132707, -749102283, 471920188, 875051716, -1197869197, -1799830041}; +size_t var_53 = 14u; +int32_t var_52 = 33732954; +uint8_t var_51 = 68u; +uint16_t var_50 = 28439u; +__riscv_vsetvl_e8m2(4); +vuint8m2_t var_128 = __riscv_vle8_v_u8m2(var_129, 4); +// 4, 5, 2, 3 + +__riscv_vsetvl_e8m2(12); +vuint8m2_t var_125 = __riscv_vle8_v_u8m2(var_126, 12); +// 15, 13, 14, 20, 6, 5, 8, 19, 4, 10, 3, 1 + +__riscv_vsetvl_e8m2(4); +vuint8m2_t var_122 = __riscv_vle8_v_u8m2(var_123, 4); +// 4, 5, 2, 6 + +__riscv_vsetvl_e8m2(10); +vuint8m2_t var_119 = __riscv_vle8_v_u8m2(var_120, 10); +// 1, 17, 15, 2, 0, 16, 10, 3, 7, 12 + +__riscv_vsetvl_e8m2(28); +vuint8m2_t var_114 = __riscv_vle8_v_u8m2(var_115, 28); +// 11, 26, 14, 15, 35, 33, 28, 50, 27, 0, 37, 3, 45, 39, 38, 9, 16, 36, 18, 24, 13, 23, 1, 49, 30, 54, 12, 7 + +__riscv_vsetvl_e8m2(18); +vuint8m2_t var_111 = __riscv_vle8_v_u8m2(var_112, 18); +// 35, 23, 29, 31, 10, 34, 13, 9, 0, 19, 1, 11, 3, 8, 33, 24, 21, 15 + +__riscv_vsetvl_e8m2(15); +vuint8m2_t var_106 = __riscv_vle8_v_u8m2(var_107, 15); +// 11, 14, 17, 21, 13, 28, 0, 4, 25, 19, 10, 12, 24, 23, 22 + +__riscv_vsetvl_e8m2(9); +vuint8m2_t var_101 = __riscv_vle8_v_u8m2(var_102, 9); +// 10, 17, 3, 13, 6, 9, 14, 4, 15 + +__riscv_vsetvl_e8m2(5); +vuint8m2_t var_96 = __riscv_vle8_v_u8m2(var_97, 5); +// 6, 8, 4, 7, 2 + +__riscv_vsetvl_e8m2(13); +vuint8m2_t var_91 = __riscv_vle8_v_u8m2(var_92, 13); +// 11, 5, 6, 3, 10, 4, 2, 21, 12, 1, 9, 15, 0 + +__riscv_vsetvl_e8m2(10); +vuint8m2_t var_86 = __riscv_vle8_v_u8m2(var_87, 10); +// 9, 13, 14, 10, 0, 16, 1, 7, 12, 6 + +__riscv_vsetvl_e8m2(20); +vuint8m2_t var_81 = __riscv_vle8_v_u8m2(var_82, 20); +// 23, 31, 32, 2, 1, 37, 26, 38, 27, 4, 33, 20, 8, 0, 18, 22, 21, 36, 34, 13 + +vuint8m2_t var_20 = __riscv_vle8_v_u8m2(var_80, 20); +// 51, 84, 251, 79, 169, 178, 97, 33, 90, 0, 91, 158, 224, 205, 75, 28, 3, 218, 110, 90 + +vuint8m2_t var_21 = __riscv_vle8_v_u8m2(var_79, 20); +// 69, 81, 157, 153, 150, 82, 20, 45, 101, 201, 27, 89, 167, 193, 194, 229, 32, 67, 85, 188 + +__riscv_vsetvl_e8m2(10); +vuint8m2_t var_22 = __riscv_vle8_v_u8m2(var_78, 10); +// 7, 86, 55, 184, 15, 158, 72, 233, 133, 233 + +vuint8m2_t var_23 = __riscv_vle8_v_u8m2(var_77, 10); +// 158, 122, 24, 135, 77, 116, 114, 21, 31, 48 + +__riscv_vsetvl_e8m2(13); +vuint8m2_t var_24 = __riscv_vle8_v_u8m2(var_76, 13); +// 8, 244, 149, 106, 11, 74, 10, 105, 180, 241, 53, 11, 14 + +vuint8m2_t var_25 = __riscv_vle8_v_u8m2(var_75, 13); +// 151, 204, 9, 157, 136, 3, 190, 153, 36, 5, 85, 208, 153 + +__riscv_vsetvl_e8m2(5); +vuint8m2_t var_26 = __riscv_vle8_v_u8m2(var_74, 5); +// 163, 112, 39, 165, 124 + +vuint8m2_t var_27 = __riscv_vle8_v_u8m2(var_73, 5); +// 231, 207, 72, 86, 189 + +__riscv_vsetvl_e8m2(9); +vuint8m2_t var_28 = __riscv_vle8_v_u8m2(var_72, 9); +// 124, 139, 130, 178, 131, 94, 153, 139, 0 + +vuint8m2_t var_29 = __riscv_vle8_v_u8m2(var_71, 9); +// 13, 5, 200, 25, 113, 150, 160, 59, 112 + +__riscv_vsetvl_e8m2(15); +vuint8m2_t var_30 = __riscv_vle8_v_u8m2(var_70, 15); +// 43, 165, 118, 143, 24, 178, 108, 42, 168, 165, 210, 11, 242, 151, 76 + +vuint8m2_t var_31 = __riscv_vle8_v_u8m2(var_69, 15); +// 16, 23, 195, 47, 96, 78, 79, 250, 206, 96, 33, 225, 113, 12, 189 + +__riscv_vsetvl_e8m2(18); +vuint8m2_t var_32 = __riscv_vle8_v_u8m2(var_68, 18); +// 102, 129, 39, 76, 226, 43, 174, 239, 160, 251, 130, 253, 210, 44, 57, 197, 38, 134 + +__riscv_vsetvl_e8m2(28); +vuint8m2_t var_33 = __riscv_vle8_v_u8m2(var_67, 28); +// 218, 150, 128, 18, 225, 117, 251, 84, 180, 34, 174, 111, 22, 157, 36, 97, 83, 101, 93, 143, 249, 110, 224, 213, 111, 205, 125, 70 + +vuint8m2_t var_34 = __riscv_vle8_v_u8m2(var_66, 28); +// 228, 220, 11, 216, 206, 139, 123, 42, 253, 119, 29, 75, 19, 94, 198, 208, 223, 53, 17, 77, 216, 164, 148, 183, 197, 129, 52, 30 + +__riscv_vsetvl_e8m1(4); +vuint8m1_t var_36 = __riscv_vle8_v_u8m1(var_65, 4); +// 129, 184, 39, 26 + +__riscv_vsetvl_e8mf4(4); +vuint8mf4_t var_37 = __riscv_vle8_v_u8mf4(var_64, 4); +// 165, 172, 17, 195 + +__riscv_vsetvl_e8m1(4); +vuint8m1_t var_38 = __riscv_vle8_v_u8m1(var_63, 4); +// 224, 255, 179, 223 + +__riscv_vsetvl_e16mf2(4); +vuint16mf2_t var_39 = __riscv_vle16_v_u16mf2(var_62, 4); +// 2059, 50136, 19961, 19085 + +__riscv_vsetvl_e8m2(10); +vuint8m2_t var_40 = __riscv_vle8_v_u8m2(var_61, 10); +// 132, 79, 83, 231, 223, 41, 23, 84, 94, 39 + +__riscv_vsetvl_e8m2(18); +vuint8m2_t var_41 = __riscv_vle8_v_u8m2(var_60, 18); +// 64, 170, 250, 169, 211, 59, 143, 124, 179, 165, 180, 8, 238, 216, 187, 137, 252, 103 + +__riscv_vsetvl_e8m2(4); +vuint8m2_t var_42 = __riscv_vle8_v_u8m2(var_59, 4); +// 18, 217, 188, 42 + +__riscv_vsetvl_e32m8(18); +vint32m8_t var_45 = __riscv_vle32_v_i32m8(var_58, 18); +// 1549578886, 969508556, -1463606770, -570949145, 1223843346, 1203925732, -1372815026, -2071636721, -1347273561, 1979176278, -400677652, -1516821114, 1686741600, -1626075227, -557106289, -1989226629, 1303206559, -2019568180 + +vint16m4_t var_46 = __riscv_vle16_v_i16m4(var_57, 18); +// -17838, 21382, -24007, -28159, -7245, -8296, 4536, 4740, 31886, 7470, 6598, -11304, 5070, -7833, 19880, 30169, -19576, -29825 + +vint16m4_t var_47 = __riscv_vle16_v_i16m4(var_56, 18); +// 27831, 17164, 25700, 20703, -9305, -13961, 3432, 31251, 31239, 2575, -3550, -22407, 22422, 3341, -11592, 3163, -18912, 24474 + +vint32m8_t var_48 = __riscv_vle32_v_i32m8(var_55, 18); +// -1410347872, -1203450804, 66771613, -223741775, -1141905884, 2138341856, -752061869, 736817258, -189959542, -1177808016, -864391040, -568227585, -1975568427, -1180804129, 119944555, 47776326, 1126587728, 445410999 + +vint32m8_t var_49 = __riscv_vle32_v_i32m8(var_54, 18); +// 193247136, 856811342, -1426659505, -602051769, -1581588484, 586962190, 2128307703, -680727552, -1153985669, -2086855987, 1290791744, -1617390193, -828132707, -749102283, 471920188, 875051716, -1197869197, -1799830041 + +__riscv_vsetvl_e8m2(20); +__riscv_vse8_v_u8m2(var_85, var_20, 20); +__riscv_vsuxei8_v_u8m2(var_84, var_81, var_21, 20); +__riscv_vsetvl_e8m2(10); +__riscv_vse8_v_u8m2(var_90, var_22, 10); +__riscv_vsuxei8_v_u8m2(var_89, var_86, var_23, 10); +__riscv_vsetvl_e8m2(13); +__riscv_vse8_v_u8m2(var_95, var_24, 13); +__riscv_vsuxei8_v_u8m2(var_94, var_91, var_25, 13); +__riscv_vsetvl_e8m2(5); +__riscv_vse8_v_u8m2(var_100, var_26, 5); +__riscv_vsuxei8_v_u8m2(var_99, var_96, var_27, 5); +__riscv_vsetvl_e8m2(9); +__riscv_vse8_v_u8m2(var_105, var_28, 9); +__riscv_vsuxei8_v_u8m2(var_104, var_101, var_29, 9); +__riscv_vsetvl_e8m2(15); +__riscv_vse8_v_u8m2(var_110, var_30, 15); +__riscv_vsuxei8_v_u8m2(var_109, var_106, var_31, 15); +__riscv_vsetvl_e8m2(18); +vuint8m2_t var_13 = __riscv_vor_vx_u8m2(var_32, var_51, 18); +// 102, 197, 103, 76, 230, 111, 238, 239, 228, 255, 198, 253, 214, 108, 125, 197, 102, 198 + +__riscv_vsetvl_e8m2(28); +__riscv_vse8_v_u8m2(var_118, var_33, 28); +__riscv_vsuxei8_v_u8m2(var_117, var_114, var_34, 28); +__riscv_vsetvl_e16mf2(4); +vbool32_t var_35 = __riscv_vmseq_vx_u16mf2_b32(var_39, var_50, 4); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e8m2(10); +__riscv_vsuxei8_v_u8m2(var_121, var_119, var_40, 10); +__riscv_vsetvl_e16m4(18); +vuint16m4_t var_8 = __riscv_vzext_vf2_u16m4(var_41, 18); +// 64, 170, 250, 169, 211, 59, 143, 124, 179, 165, 180, 8, 238, 216, 187, 137, 252, 103 + +__riscv_vsetvl_e8m2(4); +__riscv_vsuxei8_v_u8m2(var_124, var_122, var_42, 4); +__riscv_vsetvl_e16m4(18); +vbool4_t var_44 = __riscv_vmsgt_vv_i16m4_b4(var_46, var_47, 18); +// 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool4_t var_43 = __riscv_vmseq_vv_i32m8_b4(var_48, var_49, 18); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +if(!check(var_85, var_170, var_171)) {cerr << "check 169 fails" << endl; return_value = 1;} +if(!check(var_84, var_167, var_168)) {cerr << "check 166 fails" << endl; return_value = 1;} +if(!check(var_90, var_173, var_174)) {cerr << "check 172 fails" << endl; return_value = 1;} +if(!check(var_89, var_164, var_165)) {cerr << "check 163 fails" << endl; return_value = 1;} +if(!check(var_95, var_176, var_177)) {cerr << "check 175 fails" << endl; return_value = 1;} +if(!check(var_94, var_161, var_162)) {cerr << "check 160 fails" << endl; return_value = 1;} +if(!check(var_100, var_179, var_180)) {cerr << "check 178 fails" << endl; return_value = 1;} +if(!check(var_99, var_158, var_159)) {cerr << "check 157 fails" << endl; return_value = 1;} +if(!check(var_105, var_182, var_183)) {cerr << "check 181 fails" << endl; return_value = 1;} +if(!check(var_104, var_155, var_156)) {cerr << "check 154 fails" << endl; return_value = 1;} +if(!check(var_110, var_185, var_186)) {cerr << "check 184 fails" << endl; return_value = 1;} +if(!check(var_109, var_152, var_153)) {cerr << "check 151 fails" << endl; return_value = 1;} +__riscv_vsuxei8_v_u8m2(var_113, var_111, var_13, 18); +if(!check(var_118, var_188, var_189)) {cerr << "check 187 fails" << endl; return_value = 1;} +if(!check(var_117, var_146, var_147)) {cerr << "check 145 fails" << endl; return_value = 1;} +__riscv_vsetvl_e8mf4(4); +vuint8m1_t var_10 = __riscv_vredand_vs_u8mf4_u8m1_tum(var_35, var_36, var_37, var_38, 4); +// 224 + +if(!check(var_121, var_143, var_144)) {cerr << "check 142 fails" << endl; return_value = 1;} +__riscv_vsetvl_e16m4(18); +vbool4_t var_3 = __riscv_vmsbc_vv_u16m4_b4(var_8, var_8, 18); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +if(!check(var_124, var_140, var_141)) {cerr << "check 139 fails" << endl; return_value = 1;} +vbool4_t var_6 = __riscv_vmseq_vx_i32m8_b4_mu(var_43, var_44, var_45, var_52, 18); +// 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +if(!check(var_113, var_149, var_150)) {cerr << "check 148 fails" << endl; return_value = 1;} +__riscv_vsetvl_e8m1(1); +uint8_t var_5 = __riscv_vmv_x_s_u8m1_u8(var_10); +// 224 + +__riscv_vsetvl_e8m2(18); +vuint8m2_t var_4 = __riscv_vmadd_vx_u8m2_mu(var_6, var_13, var_5, var_13, 18); +// 102, 37, 103, 76, 38, 143, 46, 239, 100, 31, 6, 93, 214, 108, 221, 37, 102, 198 + +__riscv_vsetvl_e8m2(12); +__riscv_vsuxei8_v_u8m2(var_127, var_125, var_4, 12); +__riscv_vsetvl_e8m2(18); +vuint8m2_t var_2 = __riscv_vslidedown_vx_u8m2_mu(var_3, var_4, var_4, var_53, 18); +// 102, 37, 103, 76 + +__riscv_vsetvl_e8m2(4); +__riscv_vsuxei8_v_u8m2(var_131, var_128, var_4, 4); +if(!check(var_127, var_137, var_138)) {cerr << "check 136 fails" << endl; return_value = 1;} +__riscv_vse8_v_u8m2(var_132, var_2, 4); +if(!check(var_131, var_134, var_135)) {cerr << "check 133 fails" << endl; return_value = 1;} +if(!check(var_132, var_191, var_192)) {cerr << "check 190 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-14.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-14.C new file mode 100644 index 00000000000..1b6c8af066e --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-14.C @@ -0,0 +1,429 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ +/* { dg-skip-if "" { riscv32-*-* } } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" + +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + + + +int main() +{ +int return_value = 0; + +size_t var_149 = 16u; +uint64_t var_148 [] = {13578039560782071336u, 1484621602351210644u}; +size_t var_146 = 8u; +uint64_t var_145 [] = {16839166774797421612u}; +size_t var_143 = 16u; +uint64_t var_142 [] = {14866568020778459593u, 6170176812097337211u}; +size_t var_140 = 16u; +int32_t var_139 [] = {86596679, 887344792, 624253109, 1050186991}; +size_t var_137 = 16u; +int32_t var_136 [] = {-1167308735, 1838210492, -189423925, 1242164643}; +size_t var_134 = 16u; +int32_t var_133 [] = {1059536784, -1624607338, -1986213221, -1866499287}; +size_t var_131 = 16u; +int32_t var_130 [] = {-1290998524, -395147148, 1204902894, -1979270528}; +size_t var_128 = 16u; +int32_t var_127 [] = {1505028399, -1317551444, -283215388, 1313442090}; +size_t var_125 = 16u; +int32_t var_124 [] = {669327590, -1638382142, -1415276961, 770276165}; +size_t var_122 = 16u; +int32_t var_121 [] = {1961139923, 470559939, -1893737022, -808529908}; +size_t var_119 = 16u; +int32_t var_118 [] = {861564409, 1961139923, 470559939, 683032407}; +uint64_t var_116 [] = {14884245833012991004u, 17744737836532097112u}; +int32_t var_115 [] = {861564409, -280631346, -1997213588, 683032407}; +uint64_t var_113 [] = {8u, 4u}; +int32_t var_111 [] = {-550820466, -659945020, -1893737022, -808529908}; +uint64_t var_110 [] = {4u, 0u}; +int32_t var_108 [] = {1960574163, -1638382142, -2055339996, 770276165}; +uint64_t var_107 [] = {8u, 0u}; +uint64_t var_105 [] = {15667108066432247254u}; +int32_t var_104 [] = {1505028399, 11159289, -283215388, 1313442090}; +uint64_t var_102 [] = {4u}; +int32_t var_100 [] = {-1215052017, -395147148, 2746584, -1979270528}; +uint64_t var_99 [] = {8u, 0u}; +int32_t var_97 [] = {-1605026914, -1624607338, -1986213221, -1866499287}; +uint64_t var_96 [] = {0u}; +int32_t var_94 [] = {624695647, 1838210492, -189423925, 1242164643}; +uint64_t var_93 [] = {0u}; +uint64_t var_91 [] = {2254556060317310634u, 15112742239148579977u}; +int32_t var_90 [] = {86596679, 887344792, 864165312, -748092779}; +uint64_t var_88 [] = {12u, 8u}; +uint64_t var_86 [] = {13226533873259168368u, 3099208707140262961u}; +uint32_t var_85 [] = {4169354542u, 2687237004u}; +int16_t var_84 [] = {-29404, 19521}; +uint16_t var_83 [] = {51041u, 706u}; +uint8_t var_82 [] = {72u, 130u}; +uint8_t var_81 [] = {183u, 12u}; +int64_t var_80 [] = {-1976754641945385291, -6857509168378727892}; +uint64_t var_79 [] = {14866568020778459593u, 6170176812097337211u}; +int32_t var_78 [] = {1050186991, 624253109}; +uint64_t var_77 [] = {13043091477560443126u, 4018444280476919261u}; +uint64_t var_76 [] = {1619119734530915404u, 1567408130103000042u}; +int64_t var_75 [] = {-4589669510099122819, 2511201338146659042}; +int64_t var_74 [] = {5192924483735233374, -5128303964436690562}; +uint64_t var_73 [] = {10770195364104292946u, 11113326431322530895u}; +int32_t var_72 [] = {498936736, -1494726800}; +int32_t var_71 [] = {-323146212, -139718171}; +int16_t var_70 [] = {18537, -8550}; +int16_t var_69 [] = {-4141, 2189}; +int32_t var_68 [] = {-1167308735, 1432744780}; +uint64_t var_67 [] = {1032786338249332386u, 13739438568806714233u}; +int32_t var_66 [] = {1059536784}; +int32_t var_65 [] = {1204902894, -1290998524}; +int32_t var_64 [] = {-1317551444, -1026693561}; +int32_t var_63 [] = {-1415276961, 669327590}; +int32_t var_62 [] = {-1269273947, -597221977}; +int32_t var_61 [] = {470559939, 1961139923}; +uint32_t var_60 [] = {2453925045u, 719126702u}; +uint32_t var_59 [] = {2144310743u, 424531284u}; +uint16_t var_58 = 47940u; +uint16_t var_57 = 17196u; +uint16_t var_56 = 3990u; +int32_t var_55 = 5337296; +uint32_t var_54 = 1248327624u; +int16_t var_53 = -7374; +int64_t var_52 = -970238298900334018; +__riscv_vsetvl_e64m1(2); +vuint64m1_t var_112 = __riscv_vle64_v_u64m1(var_113, 2); +// 8, 4 + +vuint64m1_t var_109 = __riscv_vle64_v_u64m1(var_110, 2); +// 4, 0 + +vuint64m1_t var_106 = __riscv_vle64_v_u64m1(var_107, 2); +// 8, 0 + +__riscv_vsetvl_e64m1(1); +vuint64m1_t var_101 = __riscv_vle64_v_u64m1(var_102, 1); +// 4 + +__riscv_vsetvl_e64m1(2); +vuint64m1_t var_98 = __riscv_vle64_v_u64m1(var_99, 2); +// 8, 0 + +__riscv_vsetvl_e64m1(1); +vuint64m1_t var_95 = __riscv_vle64_v_u64m1(var_96, 1); +// 0 + +vuint64m1_t var_92 = __riscv_vle64_v_u64m1(var_93, 1); +// 0 + +__riscv_vsetvl_e64m1(2); +vuint64m1_t var_87 = __riscv_vle64_v_u64m1(var_88, 2); +// 12, 8 + +__riscv_vsetvl_e64m2(2); +vuint64m2_t var_21 = __riscv_vle64_v_u64m2(var_86, 2); +// 13226533873259168368, 3099208707140262961 + +vuint32m1_t var_22 = __riscv_vle32_v_u32m1(var_85, 2); +// 4169354542, 2687237004 + +vint16mf2_t var_23 = __riscv_vle16_v_i16mf2(var_84, 2); +// -29404, 19521 + +__riscv_vsetvl_e16m2(2); +vuint16m2_t var_25 = __riscv_vle16_v_u16m2(var_83, 2); +// 51041, 706 + +vuint8m1_t var_26 = __riscv_vle8_v_u8m1(var_82, 2); +// 72, 130 + +vuint8m1_t var_27 = __riscv_vle8_v_u8m1(var_81, 2); +// 183, 12 + +vint64m8_t var_28 = __riscv_vle64_v_i64m8(var_80, 2); +// -1976754641945385291, -6857509168378727892 + +__riscv_vsetvl_e64m1(2); +vuint64m1_t var_29 = __riscv_vle64_v_u64m1(var_79, 2); +// 14866568020778459593, 6170176812097337211 + +vint32mf2_t var_30 = __riscv_vle32_v_i32mf2(var_78, 2); +// 1050186991, 624253109 + +vuint64m1_t var_32 = __riscv_vle64_v_u64m1(var_77, 2); +// 13043091477560443126, 4018444280476919261 + +vuint64m1_t var_33 = __riscv_vle64_v_u64m1(var_76, 2); +// 1619119734530915404, 1567408130103000042 + +__riscv_vsetvl_e64m2(2); +vint64m2_t var_34 = __riscv_vle64_v_i64m2(var_75, 2); +// -4589669510099122819, 2511201338146659042 + +vint64m2_t var_35 = __riscv_vle64_v_i64m2(var_74, 2); +// 5192924483735233374, -5128303964436690562 + +__riscv_vsetvl_e64m4(2); +vuint64m4_t var_36 = __riscv_vle64_v_u64m4(var_73, 2); +// 10770195364104292946, 11113326431322530895 + +__riscv_vsetvl_e32m4(2); +vint32m4_t var_37 = __riscv_vle32_v_i32m4(var_72, 2); +// 498936736, -1494726800 + +vint32m4_t var_38 = __riscv_vle32_v_i32m4(var_71, 2); +// -323146212, -139718171 + +vint16m2_t var_39 = __riscv_vle16_v_i16m2(var_70, 2); +// 18537, -8550 + +vint16m2_t var_40 = __riscv_vle16_v_i16m2(var_69, 2); +// -4141, 2189 + +__riscv_vsetvl_e32mf2(2); +vint32mf2_t var_41 = __riscv_vle32_v_i32mf2(var_68, 2); +// -1167308735, 1432744780 + +vuint64m1_t var_42 = __riscv_vle64_v_u64m1(var_67, 2); +// 1032786338249332386, 13739438568806714233 + +__riscv_vsetvl_e32mf2(1); +vint32mf2_t var_43 = __riscv_vle32_v_i32mf2(var_66, 1); +// 1059536784 + +__riscv_vsetvl_e32mf2(2); +vint32mf2_t var_44 = __riscv_vle32_v_i32mf2(var_65, 2); +// 1204902894, -1290998524 + +vint32mf2_t var_45 = __riscv_vle32_v_i32mf2(var_64, 2); +// -1317551444, -1026693561 + +vint32mf2_t var_46 = __riscv_vle32_v_i32mf2(var_63, 2); +// -1415276961, 669327590 + +vint32mf2_t var_48 = __riscv_vle32_v_i32mf2(var_62, 2); +// -1269273947, -597221977 + +vint32mf2_t var_49 = __riscv_vle32_v_i32mf2(var_61, 2); +// 470559939, 1961139923 + +vuint32mf2_t var_50 = __riscv_vle32_v_u32mf2(var_60, 2); +// 2453925045, 719126702 + +vuint32mf2_t var_51 = __riscv_vle32_v_u32mf2(var_59, 2); +// 2144310743, 424531284 + +__riscv_vsetvl_e16mf2(2); +vbool32_t var_20 = __riscv_vmslt_vx_i16mf2_b32(var_23, var_53, 2); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e64m8(2); +vbool8_t var_24 = __riscv_vmslt_vx_i64m8_b8(var_28, var_52, 2); +// 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e64m1(2); +__riscv_vse64_v_u64m1(var_91, var_29, 2); +__riscv_vsuxei64_v_i32mf2(var_90, var_87, var_30, 2); +__riscv_vsetvl_e64m2(2); +vbool32_t var_31 = __riscv_vmadc_vv_i64m2_b32(var_34, var_35, 2); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e64m4(2); +uint64_t var_15 = __riscv_vmv_x_s_u64m4_u64(var_36); +// 10770195364104292946 + +__riscv_vsetvl_e32m4(2); +vbool8_t var_14 = __riscv_vmsgt_vx_i32m4_b8(var_37, var_55, 2); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vint32m4_t var_11 = __riscv_vwmaccus_vx_i32m4(var_38, var_58, var_39, 2); +// 565517568, -549605171 + +__riscv_vsetvl_e32mf2(1); +__riscv_vsuxei64_v_i32mf2(var_94, var_92, var_41, 1); +__riscv_vsuxei64_v_i32mf2(var_97, var_95, var_43, 1); +__riscv_vsetvl_e32mf2(2); +__riscv_vsuxei64_v_i32mf2(var_100, var_98, var_44, 2); +__riscv_vsetvl_e32mf2(1); +__riscv_vsuxei64_v_i32mf2(var_104, var_101, var_45, 1); +__riscv_vsetvl_e32mf2(2); +__riscv_vsuxei64_v_i32mf2(var_108, var_106, var_46, 2); +vbool64_t var_47 = __riscv_vmsgtu_vv_u32mf2_b64(var_50, var_51, 2); +// 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m1(2); +vuint64m2_t var_19 = __riscv_vwmaccu_vx_u64m2_mu(var_20, var_21, var_54, var_22, 2); +// 18431254322287636576, 3099208707140262961 + +__riscv_vsetvl_e8m1(2); +vuint16m2_t var_18 = __riscv_vwmulu_vv_u16m2_mu(var_24, var_25, var_26, var_27, 2); +// 13176, 1560 + +if(!check(var_91, var_142, var_143)) {cerr << "check 141 fails" << endl; return_value = 1;} +if(!check(var_90, var_139, var_140)) {cerr << "check 138 fails" << endl; return_value = 1;} +__riscv_vsetvl_e64m1(2); +vuint64m1_t var_7 = __riscv_vasubu_vx_u64m1(var_42, var_15, 2); +// 13578039560782071336, 1484621602351210644 + +if(!check(var_94, var_136, var_137)) {cerr << "check 135 fails" << endl; return_value = 1;} +if(!check(var_97, var_133, var_134)) {cerr << "check 132 fails" << endl; return_value = 1;} +if(!check(var_100, var_130, var_131)) {cerr << "check 129 fails" << endl; return_value = 1;} +if(!check(var_104, var_127, var_128)) {cerr << "check 126 fails" << endl; return_value = 1;} +if(!check(var_108, var_124, var_125)) {cerr << "check 123 fails" << endl; return_value = 1;} +__riscv_vsetvl_e64m2(2); +vuint64m1_t var_16 = __riscv_vredxor_vs_u64m2_u64m1_tum(var_31, var_32, var_19, var_33, 2); +// 16839166774797421612 + +__riscv_vsetvl_e16m2(2); +vuint16m2_t var_13 = __riscv_vslide1down_vx_u16m2(var_18, var_56, 2); +// 1560, 3990 + +__riscv_vsetvl_e64m1(2); +__riscv_vse64_v_u64m1(var_116, var_7, 2); +__riscv_vsetvl_e64m1(1); +__riscv_vse64_v_u64m1(var_105, var_16, 1); +__riscv_vsetvl_e16m2(2); +vuint16m2_t var_12 = __riscv_vdivu_vx_u16m2(var_13, var_57, 2); +// 0, 0 + +if(!check(var_116, var_148, var_149)) {cerr << "check 147 fails" << endl; return_value = 1;} +if(!check(var_105, var_145, var_146)) {cerr << "check 144 fails" << endl; return_value = 1;} +vint32m4_t var_10 = __riscv_vwmulsu_vv_i32m4_mu(var_14, var_11, var_40, var_12, 2); +// 0, -549605171 + +int32_t var_9 = __riscv_vmv_x_s_i32m4_i32(var_10); +// 0 + +__riscv_vsetvl_e32mf2(2); +vint32mf2_t var_2 = __riscv_vsadd_vx_i32mf2_mu(var_47, var_48, var_49, var_9, 2); +// 470559939, 1961139923 + +__riscv_vsuxei64_v_i32mf2(var_115, var_112, var_2, 2); +__riscv_vsuxei64_v_i32mf2(var_111, var_109, var_2, 2); +if(!check(var_115, var_118, var_119)) {cerr << "check 117 fails" << endl; return_value = 1;} +if(!check(var_111, var_121, var_122)) {cerr << "check 120 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-15.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-15.C new file mode 100644 index 00000000000..bcbbee569a4 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-15.C @@ -0,0 +1,381 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" + +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + + + +int main() +{ +int return_value = 0; + +size_t var_105 = 44u; +int32_t var_104 [] = {1965848711, -2086525137, -1803848050, 19567, -971536639, -1516385, -1, -807288451, 1, 69, -31113418}; +size_t var_102 = 4u; +uint32_t var_101 [] = {1207313030u}; +size_t var_99 = 15u; +uint8_t var_98 [] = {143u, 148u, 202u, 255u, 188u, 255u, 0u, 255u, 6u, 180u, 211u, 220u, 74u, 255u, 255u}; +size_t var_96 = 2u; +uint16_t var_95 [] = {23766u}; +uint32_t var_93 = 0u; +uint16_t var_91 [] = {49193u, 32352u, 9900u, 50089u}; +uint16_t var_90 [] = {8891u, 57230u, 34982u}; +uint16_t var_89 [] = {64061u, 52315u, 5021u}; +uint16_t var_88 [] = {47003u}; +int16_t var_87 [] = {-16180, 30442, -27639, -2800, 830, -16129, -24130, -24162, -16463, -16169, 9534, 6951, -29131, 8446, 24062}; +uint8_t var_86 [] = {143u, 148u, 202u, 128u, 17u, 16u, 255u, 228u, 6u, 194u, 211u, 220u, 222u, 21u, 122u}; +uint8_t var_85 [] = {152u, 3u, 124u, 172u, 129u, 175u, 37u, 69u, 235u, 55u, 186u, 250u, 194u, 199u, 244u}; +uint64_t var_84 [] = {12545546372818825490u, 11634332929896642629u, 8733307811728114002u, 10860918623888276979u, 13489704078894613242u, 12413343993784960166u, 16106584277487222643u, 17042485112267319282u, 1684173737373229617u, 17871315199092643074u, 951050746696388267u, 5459702402058790198u, 14019717647186298924u, 5369338442959214891u, 14110032050054313318u}; +uint64_t var_83 [] = {453774957859413236u, 6362459136171675404u, 967023828260427162u, 12332913600458807293u, 16921541007825084037u, 9616351827595519342u, 4247057396342547430u, 3809196068723072942u, 7431902286811921209u, 16629558845849341371u, 4458394429727454425u, 9250508760572153319u, 14924070495082841269u, 13738313966692186811u, 16877854274515520325u}; +uint32_t var_82 [] = {1899881686u, 4080147581u, 2925343604u, 2936075900u, 4087201558u, 3727908130u, 1834017022u, 1518736660u, 733377872u, 907382512u}; +uint32_t var_81 [] = {2204325838u}; +uint16_t var_80 [] = {9064u, 36296u, 60321u, 552u, 61009u, 18827u, 18467u, 43553u, 8017u, 23645u, 41010u, 59795u, 16542u, 27096u, 46517u}; +uint16_t var_79 [] = {63636u, 48200u, 63911u, 38172u, 65121u, 10226u, 42802u, 47807u, 36396u, 64207u, 7490u, 28781u, 24484u, 50212u, 47986u}; +int32_t var_78 [] = {335332773, -2086525137, -1803848050, -861408915, -971536639, 89936413, -2128483556, -807288451, 1502472335, -1955364480, -639688186}; +int32_t var_77 [] = {1965848711, 652198142, -654070005, 1282394958, 116719467, -1552777423, -52631872, 1455473636, 1916330932, 583051848, -1991258695}; +uint32_t var_76 [] = {257189920u, 3908288874u, 4183117108u, 2985059984u, 4123446506u, 2586755754u, 1658155355u, 2054753754u, 2564238526u, 3891115063u, 2225254278u}; +int32_t var_75 [] = {-235217549, -1765672370, 1092350198, -1701266898, 670572350, -788863284, 1240998336, -754510421, -1247918767, -436390665, -612945923}; +uint64_t var_74 [] = {4538530792723095896u, 6728936314959424800u, 2414113211559319956u, 12007796423392768971u, 3601171482854517865u, 9629278271958260054u, 18242975527941306396u, 5160839807466719679u, 10245972782247532531u, 8853619422007764491u, 12041607275968659794u}; +float64_t var_73 [] = {f64(8614060269474079662u), f64(12623683513218469367u), f64(11442194130057405520u), f64(6446105459198133268u), f64(380366903168625857u), f64(11473821136348234467u), f64(10058995585649001695u), f64(18250868123612936794u), f64(5822372664793573930u), f64(16528043770874104422u), f64(8552228426542510914u)}; +// 7.039563158960176e+267, -2.1523339088794933e-81, -2.3863183489576286e-160, 8.745373785501378e+122, 3.1384579041605856e-283, -3.095650602331732e-158, -8.433135015760508e-253, -3.0795123331668087e+295, 1.7325021691170963e+81, -2.0363221572114366e+180, 4.978209728821851e+263 + +float64_t var_72 [] = {f64(3222442400634673465u), f64(49194355626135158u), f64(2619282863356225021u), f64(6202680391960624283u), f64(1894242076897167076u), f64(1473372219557024753u), f64(17948058332808594980u), f64(254766907045106756u), f64(5187702104895708698u), f64(17778229566843173273u), f64(15532650994783644871u)}; +// 2.9261835584954886e-93, 2.1911430950940748e-305, 1.4067526365316684e-133, 4.6666902875718115e+106, 4.838617816764193e-182, 3.511247376604861e-210, -1.7581509460613583e+275, 1.2583108701066947e-291, 6.469667332696177e+38, -7.859407112445776e+263, -5.976033249736235e+113 + +int64_t var_71 [] = {5467749319186423848, -7667147751918509541, 593800074853473953, 6413262534774302136, 75427966376313524, 278644057209885757, 2969472779674870036, -5130814726456529304, -8496445620946198940, -5900460087019451181, -7035951954069660754}; +uint16_t var_70 [] = {26357u, 35477u, 47484u, 46678u, 15433u, 30209u, 7010u, 17975u, 42110u, 9965u, 53873u}; +uint64_t var_69 [] = {6442896275987497358u, 1563305414183179185u, 11193158183361973134u, 13636247099056349041u, 4490219238087428372u, 4573189455769797535u, 10624409184260926054u, 5514956187784411809u, 14501128089956573992u, 5109065909563099152u, 16213535287239099256u, 6283107178585528281u, 16632340116542335185u, 600060285728974968u, 3827913824182081159u}; +uint64_t var_68 [] = {2067686263881693258u, 12371655115140460276u, 898390373048189950u, 649754230264648168u, 5012504791569343805u, 16874164695526011894u, 16924833210622228183u, 2805562827512188045u, 7465072367629716071u, 17045412384807346826u, 8575978714610309445u, 5748474768467091028u, 11979473091765990948u, 13760319101215726700u, 1788882170843726304u}; +uint64_t var_67 [] = {4831708823516042734u, 3668152558332136794u, 9484665288845422345u, 921775477519817043u, 7038957512716032076u, 8368267462872907232u, 13525987403698074826u, 9033485416066501490u, 14922672290664661089u, 11277078323581784284u, 13748574820511946879u, 16280599129456136593u, 3424378972987661323u, 1750712290855073655u, 3947210869617561148u}; +int16_t var_66 [] = {-24080, 24998, 9989, 20569, -2601, -10539, 12368, -29086, -7522, 1120, -13834, -17597, -5726, 2135, 29590}; +uint8_t var_65 [] = {198u, 97u, 138u, 69u, 159u, 72u, 79u, 78u, 123u, 105u, 196u, 103u, 159u, 8u, 136u}; +uint64_t var_64 [] = {14458637845423620742u, 10388543624287621821u, 1839618755313470511u, 15806879456819668453u, 11992843568410882569u, 17888054540471465292u, 16607055758216148595u, 10559588498955483388u, 16974549766507248252u, 18388996532108708959u, 6425574481918877909u, 4778349236525994346u, 933240166161765083u, 7918613081773265217u, 9419843050025446081u}; +uint32_t var_63 [] = {786592415u, 3404752857u, 3845531527u, 3354073765u, 2261301168u, 3335412765u, 3988068717u, 3181127872u, 2948165023u, 2676932394u, 3500541227u}; +uint32_t var_62 [] = {3512996747u, 3014603841u, 234827873u, 2359951919u, 774620885u, 3966492724u, 643827065u, 1817286301u, 2112613584u, 2206939407u, 1193735501u, 1704965662u, 3096558447u, 3455432162u, 2782347083u}; +size_t var_61 = 5u; +size_t var_60 = 5u; +uint8_t var_59 = 87u; +uint32_t var_58 = 1207313030u; +uint64_t var_57 = 8520709894933587159u; +size_t var_56 = 7u; +uint16_t var_55 = 3639u; +int64_t var_54 = -1207966290208329859; +__riscv_vsetvl_e16m8(15); +vuint16m8_t var_8 = __riscv_vid_v_u16m8(15); +// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 + +__riscv_vsetvl_e16mf2(4); +vuint16mf2_t var_20 = __riscv_vle16_v_u16mf2(var_91, 4); +// 49193, 32352, 9900, 50089 + +__riscv_vsetvl_e16m1(3); +vuint16m1_t var_21 = __riscv_vle16_v_u16m1(var_90, 3); +// 8891, 57230, 34982 + +vuint16m1_t var_22 = __riscv_vle16_v_u16m1(var_89, 3); +// 64061, 52315, 5021 + +__riscv_vsetvl_e16m2(15); +vint16m2_t var_24 = __riscv_vle16_v_i16m2(var_87, 15); +// -16180, 30442, -27639, -2800, 830, -16129, -24130, -24162, -16463, -16169, 9534, 6951, -29131, 8446, 24062 + +vuint8m1_t var_26 = __riscv_vle8_v_u8m1(var_86, 15); +// 143, 148, 202, 128, 17, 16, 255, 228, 6, 194, 211, 220, 222, 21, 122 + +vuint64m8_t var_28 = __riscv_vle64_v_u64m8(var_84, 15); +// 12545546372818825490, 11634332929896642629, 8733307811728114002, 10860918623888276979, 13489704078894613242, 12413343993784960166, 16106584277487222643, 17042485112267319282, 1684173737373229617, 17871315199092643074, 951050746696388267, 5459702402058790198, 14019717647186298924, 5369338442959214891, 14110032050054313318 + +vuint64m8_t var_29 = __riscv_vle64_v_u64m8(var_83, 15); +// 453774957859413236, 6362459136171675404, 967023828260427162, 12332913600458807293, 16921541007825084037, 9616351827595519342, 4247057396342547430, 3809196068723072942, 7431902286811921209, 16629558845849341371, 4458394429727454425, 9250508760572153319, 14924070495082841269, 13738313966692186811, 16877854274515520325 + +__riscv_vsetvl_e32m4(10); +vuint32m4_t var_30 = __riscv_vle32_v_u32m4(var_82, 10); +// 1899881686, 4080147581, 2925343604, 2936075900, 4087201558, 3727908130, 1834017022, 1518736660, 733377872, 907382512 + +__riscv_vsetvl_e16m2(15); +vuint16m2_t var_32 = __riscv_vle16_v_u16m2(var_80, 15); +// 9064, 36296, 60321, 552, 61009, 18827, 18467, 43553, 8017, 23645, 41010, 59795, 16542, 27096, 46517 + +vuint16m2_t var_33 = __riscv_vle16_v_u16m2(var_79, 15); +// 63636, 48200, 63911, 38172, 65121, 10226, 42802, 47807, 36396, 64207, 7490, 28781, 24484, 50212, 47986 + +__riscv_vsetvl_e32m4(11); +vint32m4_t var_34 = __riscv_vle32_v_i32m4(var_78, 11); +// 335332773, -2086525137, -1803848050, -861408915, -971536639, 89936413, -2128483556, -807288451, 1502472335, -1955364480, -639688186 + +vint32m4_t var_35 = __riscv_vle32_v_i32m4(var_77, 11); +// 1965848711, 652198142, -654070005, 1282394958, 116719467, -1552777423, -52631872, 1455473636, 1916330932, 583051848, -1991258695 + +vuint32m4_t var_36 = __riscv_vle32_v_u32m4(var_76, 11); +// 257189920, 3908288874, 4183117108, 2985059984, 4123446506, 2586755754, 1658155355, 2054753754, 2564238526, 3891115063, 2225254278 + +vuint64m8_t var_39 = __riscv_vle64_v_u64m8(var_74, 11); +// 4538530792723095896, 6728936314959424800, 2414113211559319956, 12007796423392768971, 3601171482854517865, 9629278271958260054, 18242975527941306396, 5160839807466719679, 10245972782247532531, 8853619422007764491, 12041607275968659794 + +vfloat64m8_t var_40 = __riscv_vle64_v_f64m8(var_73, 11); +// 7.039563158960176e+267, -2.1523339088794933e-81, -2.3863183489576286e-160, 8.745373785501378e+122, 3.1384579041605856e-283, -3.095650602331732e-158, -8.433135015760508e-253, -3.0795123331668087e+295, 1.7325021691170963e+81, -2.0363221572114366e+180, 4.978209728821851e+263 + +vfloat64m8_t var_41 = __riscv_vle64_v_f64m8(var_72, 11); +// 2.9261835584954886e-93, 2.1911430950940748e-305, 1.4067526365316684e-133, 4.6666902875718115e+106, 4.838617816764193e-182, 3.511247376604861e-210, -1.7581509460613583e+275, 1.2583108701066947e-291, 6.469667332696177e+38, -7.859407112445776e+263, -5.976033249736235e+113 + +vint64m8_t var_44 = __riscv_vle64_v_i64m8(var_71, 11); +// 5467749319186423848, -7667147751918509541, 593800074853473953, 6413262534774302136, 75427966376313524, 278644057209885757, 2969472779674870036, -5130814726456529304, -8496445620946198940, -5900460087019451181, -7035951954069660754 + +vuint16m2_t var_45 = __riscv_vle16_v_u16m2(var_70, 11); +// 26357, 35477, 47484, 46678, 15433, 30209, 7010, 17975, 42110, 9965, 53873 + +__riscv_vsetvl_e64m8(15); +vuint64m8_t var_46 = __riscv_vle64_v_u64m8(var_69, 15); +// 6442896275987497358, 1563305414183179185, 11193158183361973134, 13636247099056349041, 4490219238087428372, 4573189455769797535, 10624409184260926054, 5514956187784411809, 14501128089956573992, 5109065909563099152, 16213535287239099256, 6283107178585528281, 16632340116542335185, 600060285728974968, 3827913824182081159 + +vuint64m8_t var_47 = __riscv_vle64_v_u64m8(var_68, 15); +// 2067686263881693258, 12371655115140460276, 898390373048189950, 649754230264648168, 5012504791569343805, 16874164695526011894, 16924833210622228183, 2805562827512188045, 7465072367629716071, 17045412384807346826, 8575978714610309445, 5748474768467091028, 11979473091765990948, 13760319101215726700, 1788882170843726304 + +vuint64m8_t var_48 = __riscv_vle64_v_u64m8(var_67, 15); +// 4831708823516042734, 3668152558332136794, 9484665288845422345, 921775477519817043, 7038957512716032076, 8368267462872907232, 13525987403698074826, 9033485416066501490, 14922672290664661089, 11277078323581784284, 13748574820511946879, 16280599129456136593, 3424378972987661323, 1750712290855073655, 3947210869617561148 + +vint16m2_t var_49 = __riscv_vle16_v_i16m2(var_66, 15); +// -24080, 24998, 9989, 20569, -2601, -10539, 12368, -29086, -7522, 1120, -13834, -17597, -5726, 2135, 29590 + +vuint8m1_t var_50 = __riscv_vle8_v_u8m1(var_65, 15); +// 198, 97, 138, 69, 159, 72, 79, 78, 123, 105, 196, 103, 159, 8, 136 + +vuint64m8_t var_51 = __riscv_vle64_v_u64m8(var_64, 15); +// 14458637845423620742, 10388543624287621821, 1839618755313470511, 15806879456819668453, 11992843568410882569, 17888054540471465292, 16607055758216148595, 10559588498955483388, 16974549766507248252, 18388996532108708959, 6425574481918877909, 4778349236525994346, 933240166161765083, 7918613081773265217, 9419843050025446081 + +__riscv_vsetvl_e32m4(11); +vuint32m4_t var_52 = __riscv_vle32_v_u32m4(var_63, 11); +// 786592415, 3404752857, 3845531527, 3354073765, 2261301168, 3335412765, 3988068717, 3181127872, 2948165023, 2676932394, 3500541227 + +__riscv_vsetvl_e32m4(15); +vuint32m4_t var_53 = __riscv_vle32_v_u32m4(var_62, 15); +// 3512996747, 3014603841, 234827873, 2359951919, 774620885, 3966492724, 643827065, 1817286301, 2112613584, 2206939407, 1193735501, 1704965662, 3096558447, 3455432162, 2782347083 + +__riscv_vsetvl_e16m8(15); +uint16_t var_7 = __riscv_vmv_x_s_u16m8_u16(var_8); +// 0 + +__riscv_vsetvl_e16mf2(4); +uint16_t var_19 = __riscv_vmv_x_s_u16mf2_u16(var_20); +// 49193 + +__riscv_vsetvl_e64m8(15); +vbool8_t var_25 = __riscv_vmadc_vv_u64m8_b8(var_28, var_29, 15); +// 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m4(1); +vuint32m4_t var_92 = __riscv_vminu_vx_u32m4(var_30, var_93, 1); +// 0 + +__riscv_vsetvl_e16m2(15); +vuint16m2_t var_14 = __riscv_vxor_vv_u16m2(var_32, var_33, 15); +// 56316, 12672, 4614, 38708, 4144, 28281, 61201, 4254, 37245, 42642, 48496, 39422, 7994, 44540, 3783 + +__riscv_vsetvl_e64m8(11); +vbool8_t var_38 = __riscv_vmfgt_vv_f64m8_b8(var_40, var_41, 11); +// 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool8_t var_43 = __riscv_vmseq_vx_i64m8_b8(var_44, var_54, 11); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool8_t var_42 = __riscv_vmsltu_vx_u16m2_b8(var_45, var_55, 11); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e64m8(15); +vuint64m8_t var_10 = __riscv_vnmsac_vv_u64m8(var_46, var_47, var_48, 15); +// 17730367217512192706, 13587514079205060073, 17006207964878783904, 399033182996474169, 7031375956492894968, 14246225807182425695, 8368573498063517888, 12016458229188596951, 4201530155301433889, 6917675740557523320, 7055050722106851901, 4551486304604362309, 9608429971601401157, 7096072642612805188, 15090163692241774087 + +vbool8_t var_5 = __riscv_vmseq_vx_u8m1_b8(var_50, var_59, 15); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vint16m2_t var_17 = __riscv_vmulhsu_vx_i16m2(var_24, var_19, 15); +// -12146, 22850, -20747, -2102, 623, -12107, -18113, -18137, -12358, -12137, 7156, 5217, -21867, 6339, 18061 + +vuint64m8_t var_4 = __riscv_vsrl_vx_u64m8_mu(var_5, var_10, var_51, var_60, 15); +// 17730367217512192706, 13587514079205060073, 17006207964878783904, 399033182996474169, 7031375956492894968, 14246225807182425695, 8368573498063517888, 12016458229188596951, 4201530155301433889, 6917675740557523320, 7055050722106851901, 4551486304604362309, 9608429971601401157, 7096072642612805188, 15090163692241774087 + +vbool8_t var_9 = __riscv_vmadc_vv_i16m2_b8(var_17, var_49, 15); +// 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vuint32m4_t var_2 = __riscv_vncvt_x_x_w_u32m4_mu(var_9, var_53, var_4, 15); +// 2030803650, 3014603841, 234827873, 3591973177, 774620885, 1394372191, 643827065, 4045083863, 1674932769, 2206939407, 1193735501, 1704965662, 3397690693, 3455432162, 2782347083 + +vuint32m4_t var_0 = __riscv_vwmaccu_vx_u32m4_mu(var_9, var_2, var_7, var_14, 15); +// 2030803650, 3014603841, 234827873, 3591973177, 774620885, 1394372191, 643827065, 4045083863, 1674932769, 2206939407, 1193735501, 1704965662, 3397690693, 3455432162, 2782347083 + +vuint16m2_t var_1 = __riscv_vnsrl_wx_u16m2(var_0, var_61, 15); +// 23766, 31138, 63875, 51529, 24118, 58226, 43, 55462, 43921, 22984, 14250, 64944, 9514, 44463, 47610 + +__riscv_vsetvl_e32m4(11); +vbool8_t var_3 = __riscv_vmadc_vvm_u32m4_b8(var_0, var_52, var_9, 11); +// 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m4(10); +vuint32m4_t var_6 = __riscv_vmv_s_x_u32m4_tu(var_0, var_58, 10); +// 1207313030, 3014603841, 234827873, 3591973177, 774620885, 1394372191, 643827065, 4045083863, 1674932769, 2206939407, 1193735501, 1704965662, 3397690693, 3455432162, 2782347083 + +__riscv_vsetvl_e8m1(15); +vuint8m1_t var_16 = __riscv_vnclipu_wx_u8m1_mu(var_25, var_26, var_1, var_56, 15); +// 143, 148, 202, 255, 188, 255, 0, 255, 6, 180, 211, 220, 74, 255, 255 + +__riscv_vsetvl_e16m2(3); +vuint16m1_t var_18 = __riscv_vredminu_vs_u16m2_u16m1_tu(var_21, var_1, var_22, 3); +// 23766 + +__riscv_vsetvl_e8m1(11); +vbool8_t var_11 = __riscv_vmsif_m_b8_mu(var_3, var_42, var_43, 11); +// 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m4(1); +vuint32m4_t var_15 = __riscv_vrgather_vv_u32m4(var_6, var_92, 1); +// 1207313030 + +__riscv_vsetvl_e8m1(15); +__riscv_vse8_v_u8m1(var_85, var_16, 15); +__riscv_vsetvl_e16m1(1); +__riscv_vse16_v_u16m1(var_88, var_18, 1); +__riscv_vsetvl_e64m8(11); +vbool8_t var_12 = __riscv_vmsgeu_vx_u64m8_b8_mu(var_11, var_38, var_39, var_57, 11); +// 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m4(1); +__riscv_vse32_v_u32m4(var_81, var_15, 1); +if(!check(var_85, var_98, var_99)) {cerr << "check 97 fails" << endl; return_value = 1;} +if(!check(var_88, var_95, var_96)) {cerr << "check 94 fails" << endl; return_value = 1;} +__riscv_vsetvl_e32m4(11); +vint32m4_t var_13 = __riscv_vsra_vv_i32m4_mu(var_12, var_34, var_35, var_36, 11); +// 1965848711, -2086525137, -1803848050, 19567, -971536639, -1516385, -1, -807288451, 1, 69, -31113418 + +if(!check(var_81, var_101, var_102)) {cerr << "check 100 fails" << endl; return_value = 1;} +__riscv_vse32_v_i32m4(var_75, var_13, 11); +if(!check(var_75, var_104, var_105)) {cerr << "check 103 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-2.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-2.C new file mode 100644 index 00000000000..6f3bad3094a --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-2.C @@ -0,0 +1,473 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + +int main() +{ +int return_value = 0; + +size_t var_140 = 3u; +uint8_t var_139 [] = {105u, 153u, 228u}; +size_t var_137 = 4u; +int32_t var_136 [] = {825454882}; +size_t var_134 = 4u; +int32_t var_133 [] = {-2044580921}; +size_t var_131 = 8u; +float64_t var_130 [] = {f64(11610980516175879577u)}; +// -4.518691795485215e-149 + +size_t var_128 = 4u; +int32_t var_127 [] = {-29825}; +size_t var_125 = 8u; +float64_t var_124 [] = {f64(4423419669832571904u)}; +// 5.440929296973346e-13 + +uint8_t var_122 [] = {221u, 228u, 90u}; +int32_t var_121 [] = {-1322184999, 1039089429, 1602706274, -1987162703, -745134703, -1874569310, 88319479, -1372648636}; +uint8_t var_119 [] = {0u}; +uint32_t var_117 = 0u; +float64_t var_115 [] = {f64(10570161852179085863u), f64(7905499064187989320u)}; +// -1.1868637773690528e-218, 3.1028377645298396e+220 + +uint64_t var_114 [] = {14282878292220054692u, 11725909568683513054u}; +uint64_t var_113 [] = {16091328503071571719u, 14182469813088437602u}; +float32_t var_112 [] = {f32(363500320u), f32(527024411u), f32(1060187064u)}; +// 6.889457551179815e-26, 4.949940227749096e-20, 0.6920733451843262 + +float32_t var_111 [] = {f32(3571833023u), f32(366867540u), f32(1264612092u)}; +// -7897471254528.0, 8.964667095928483e-26, 14709500.0 + +float64_t var_110 [] = {f64(1878533856182074005u)}; +// 4.210988290683248e-183 + +uint32_t var_109 [] = {2889287184u, 3870295574u, 3944299019u}; +uint32_t var_108 [] = {423086972u, 2782331753u, 199732161u}; +int32_t var_107 [] = {-278680732}; +int16_t var_106 [] = {-29825}; +int32_t var_105 [] = {-1263631215}; +float64_t var_104 [] = {f64(12567359566196420376u)}; +// -3.897704423428432e-85 + +float64_t var_103 [] = {f64(8479803601933450372u)}; +// 7.282711776288908e+258 + +int16_t var_102 [] = {13510}; +int16_t var_101 [] = {22815}; +float64_t var_100 [] = {f64(13182948881270037331u), f64(8516350855071575190u), f64(2786864662567483237u)}; +// -5.392986098814974e-44, 1.9872606665059677e+261, 2.1883326855203212e-122 + +float64_t var_99 [] = {f64(3815753008405595505u), f64(5017648848798215353u), f64(10680612954347991468u)}; +// 1.3231952293488927e-53, 2.82709922599264e+27, -2.9894357005269383e-211 + +uint32_t var_98 [] = {3554357257u, 1304976622u, 1020453920u}; +uint32_t var_97 [] = {1914414134u, 1757004891u, 4176597456u}; +uint16_t var_96 [] = {58413u, 59159u, 11092u}; +int32_t var_95 [] = {-1925946840}; +float32_t var_94 [] = {f32(2592256229u), f32(3465161337u)}; +// -5.405252834469027e-23, -1159019648.0 + +float32_t var_93 [] = {f32(1448849534u), f32(3554289590u)}; +// 60387768664064.0, -1873938219008.0 + +float32_t var_92 [] = {f32(2432338206u), f32(2327076818u)}; +// -9.88188756304636e-29, -1.736941309501721e-32 + +int16_t var_91 [] = {-14447, -24030, -944}; +float32_t var_90 [] = {f32(1705242637u), f32(3515957841u)}; +// 9.677173650427062e+22, -77985357824.0 + +int32_t var_89 [] = {-1071133475, 1791068978, 1264864376}; +uint8_t var_88 [] = {227u, 218u, 120u}; +int32_t var_87 [] = {-682915521, 1158910892, -1803838961}; +uint32_t var_86 [] = {4105487819u, 851245870u, 3261314290u}; +int32_t var_85 [] = {-757670017}; +uint64_t var_84 [] = {14141995822691574791u, 11766039677310203423u, 13825515671073065986u}; +uint64_t var_83 [] = {17556801802550960644u, 7380202866067124031u, 12435392562170195108u}; +int32_t var_82 [] = {825438420, -2138872628, 712270620}; +float32_t var_81 [] = {f32(522594453u), f32(2397720240u)}; +// 3.5185435980521485e-20, -5.7761227000535974e-30 + +float32_t var_80 [] = {f32(3772693313u), f32(2321727347u)}; +// -1.283959453225656e+20, -1.0917511781805477e-32 + +uint8_t var_79 [] = {58u, 226u, 70u}; +uint8_t var_78 [] = {253u, 143u, 231u}; +uint32_t var_77 [] = {2855396830u, 2505767773u, 1376872794u}; +uint8_t var_76 [] = {105u, 153u, 228u}; +float32_t var_75 = f32(2249259186u); +// -2.726610230227034e-35 + +int16_t var_74 = 31333; +int32_t var_73 = -2044580921; +size_t var_72 = 1u; +float64_t var_71 = f64(12489530239997367570u); +// -2.4207875634387096e-90 + +float64_t var_70 = f64(11610980516175879577u); +// -4.518691795485215e-149 + +float64_t var_69 = f64(16641254658498943323u); +// -7.663586581314764e+187 + +uint16_t var_68 = 53763u; +uint8_t var_67 = 20u; +__riscv_vsetvl_e8mf4(1); +vuint8mf4_t var_118 = __riscv_vle8_v_u8mf4(var_119, 1); +// 0 + +__riscv_vsetvl_e64m1(2); +vfloat64m1_t var_22 = __riscv_vle64_v_f64m1(var_115, 2); +// -1.1868637773690528e-218, 3.1028377645298396e+220 + +vuint64m1_t var_23 = __riscv_vle64_v_u64m1(var_114, 2); +// 14282878292220054692, 11725909568683513054 + +vuint64m1_t var_24 = __riscv_vle64_v_u64m1(var_113, 2); +// 16091328503071571719, 14182469813088437602 + +__riscv_vsetvl_e32m1(3); +vfloat32m1_t var_26 = __riscv_vle32_v_f32m1(var_112, 3); +// 6.889457551179815e-26, 4.949940227749096e-20, 0.6920733451843262 + +vfloat32m1_t var_27 = __riscv_vle32_v_f32m1(var_111, 3); +// -7897471254528.0, 8.964667095928483e-26, 14709500.0 + +vuint32m1_t var_29 = __riscv_vle32_v_u32m1(var_109, 3); +// 2889287184, 3870295574, 3944299019 + +vuint32m1_t var_30 = __riscv_vle32_v_u32m1(var_108, 3); +// 423086972, 2782331753, 199732161 + +__riscv_vsetvl_e32m1(1); +vint32m1_t var_31 = __riscv_vle32_v_i32m1(var_107, 1); +// -278680732 + +vint16mf2_t var_32 = __riscv_vle16_v_i16mf2(var_106, 1); +// -29825 + +vfloat64m2_t var_35 = __riscv_vle64_v_f64m2(var_104, 1); +// -3.897704423428432e-85 + +vint16mf2_t var_37 = __riscv_vle16_v_i16mf2(var_102, 1); +// 13510 + +vint16mf2_t var_38 = __riscv_vle16_v_i16mf2(var_101, 1); +// 22815 + +__riscv_vsetvl_e64m2(3); +vfloat64m2_t var_39 = __riscv_vle64_v_f64m2(var_100, 3); +// -5.392986098814974e-44, 1.9872606665059677e+261, 2.1883326855203212e-122 + +vfloat64m2_t var_40 = __riscv_vle64_v_f64m2(var_99, 3); +// 1.3231952293488927e-53, 2.82709922599264e+27, -2.9894357005269383e-211 + +__riscv_vsetvl_e32m2(3); +vuint32m2_t var_42 = __riscv_vle32_v_u32m2(var_98, 3); +// 3554357257, 1304976622, 1020453920 + +vuint32m2_t var_43 = __riscv_vle32_v_u32m2(var_97, 3); +// 1914414134, 1757004891, 4176597456 + +vuint16m1_t var_44 = __riscv_vle16_v_u16m1(var_96, 3); +// 58413, 59159, 11092 + +__riscv_vsetvl_e32mf2(2); +vfloat32mf2_t var_46 = __riscv_vle32_v_f32mf2(var_94, 2); +// -5.405252834469027e-23, -1159019648.0 + +vfloat32mf2_t var_47 = __riscv_vle32_v_f32mf2(var_93, 2); +// 60387768664064.0, -1873938219008.0 + +vfloat32mf2_t var_48 = __riscv_vle32_v_f32mf2(var_92, 2); +// -9.88188756304636e-29, -1.736941309501721e-32 + +__riscv_vsetvl_e16mf2(3); +vint16mf2_t var_49 = __riscv_vle16_v_i16mf2(var_91, 3); +// -14447, -24030, -944 + +__riscv_vsetvl_e32mf2(2); +vfloat32mf2_t var_50 = __riscv_vle32_v_f32mf2(var_90, 2); +// 9.677173650427062e+22, -77985357824.0 + +__riscv_vsetvl_e32m1(3); +vint32m1_t var_51 = __riscv_vle32_v_i32m1(var_89, 3); +// -1071133475, 1791068978, 1264864376 + +vuint8mf4_t var_53 = __riscv_vle8_v_u8mf4(var_88, 3); +// 227, 218, 120 + +vint32m1_t var_54 = __riscv_vle32_v_i32m1(var_87, 3); +// -682915521, 1158910892, -1803838961 + +vuint32m1_t var_56 = __riscv_vle32_v_u32m1(var_86, 3); +// 4105487819, 851245870, 3261314290 + +vuint64m2_t var_58 = __riscv_vle64_v_u64m2(var_84, 3); +// 14141995822691574791, 11766039677310203423, 13825515671073065986 + +vuint64m2_t var_59 = __riscv_vle64_v_u64m2(var_83, 3); +// 17556801802550960644, 7380202866067124031, 12435392562170195108 + +vint32m1_t var_60 = __riscv_vle32_v_i32m1(var_82, 3); +// 825438420, -2138872628, 712270620 + +__riscv_vsetvl_e32m1(2); +vfloat32m1_t var_61 = __riscv_vle32_v_f32m1(var_81, 2); +// 3.5185435980521485e-20, -5.7761227000535974e-30 + +vfloat32m1_t var_62 = __riscv_vle32_v_f32m1(var_80, 2); +// -1.283959453225656e+20, -1.0917511781805477e-32 + +__riscv_vsetvl_e8mf4(3); +vuint8mf4_t var_63 = __riscv_vle8_v_u8mf4(var_79, 3); +// 58, 226, 70 + +vuint8mf4_t var_64 = __riscv_vle8_v_u8mf4(var_78, 3); +// 253, 143, 231 + +vuint32m1_t var_65 = __riscv_vle32_v_u32m1(var_77, 3); +// 2855396830, 2505767773, 1376872794 + +vuint8mf4_t var_66 = __riscv_vle8_v_u8mf4(var_76, 3); +// 105, 153, 228 + +__riscv_vsetvl_e64m1(2); +vbool64_t var_21 = __riscv_vmfge_vf_f64m1_b64(var_22, var_69, 2); +// 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool64_t var_20 = __riscv_vmsne_vv_u64m1_b64(var_23, var_24, 2); +// 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m1(3); +vbool32_t var_25 = __riscv_vmsgtu_vv_u32m1_b32(var_29, var_30, 3); +// 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16mf2(1); +vbool32_t var_34 = __riscv_vmsne_vv_i16mf2_b32(var_37, var_38, 1); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m1(3); +vbool16_t var_41 = __riscv_vmsne_vx_u16m1_b16(var_44, var_68, 3); +// 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32mf2(2); +vfloat32mf2_t var_11 = __riscv_vfnmadd_vv_f32mf2(var_46, var_47, var_48, 2); +// 3.2641116476384013e-09, -2.171931148306111e+21 + +__riscv_vsetvl_e16mf2(3); +vint32m1_t var_10 = __riscv_vwadd_vx_i32m1(var_49, var_74, 3); +// 16886, 7303, 30389 + +vbool32_t var_52 = __riscv_vmsltu_vx_u8mf4_b32(var_53, var_67, 3); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m1(1); +vuint32m1_t var_116 = __riscv_vminu_vx_u32m1(var_56, var_117, 1); +// 0 + +__riscv_vsetvl_e64m2(3); +vbool32_t var_55 = __riscv_vmsgeu_vv_u64m2_b32(var_58, var_59, 3); +// 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vse8_v_u8mf4(var_122, var_66, 3); +__riscv_vsetvl_e8mf8(2); +vbool64_t var_19 = __riscv_vmxor_mm_b64(var_20, var_21, 2); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m2(3); +vuint32m2_t var_14 = __riscv_vsll_vx_u32m2_mu(var_41, var_42, var_43, var_72, 3); +// 3828828268, 3514009782, 4058227616 + +if(!check(var_122, var_139, var_140)) {cerr << "check 138 fails" << endl; return_value = 1;} +__riscv_vsetvl_e32mf2(2); +vfloat32mf2_t var_9 = __riscv_vfsgnjx_vf_f32mf2_mu(var_19, var_11, var_50, var_75, 2); +// 3.2641116476384013e-09, -2.171931148306111e+21 + +__riscv_vsetvl_e32m2(3); +uint32_t var_13 = __riscv_vmv_x_s_u32m2_u32(var_14); +// 3828828268 + +__riscv_vsetvl_e32mf2(2); +vfloat32m1_t var_4 = __riscv_vfredusum_vs_f32mf2_f32m1_tu(var_61, var_9, var_62, 2); +// -2.3003270848325836e+21 + +__riscv_vsetvl_e32m1(1); +vbool32_t var_3 = __riscv_vmfgt_vv_f32m1_b32(var_4, var_4, 1); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool32_t var_2 = __riscv_vmsne_vv_u8mf4_b32_mu(var_3, var_3, var_63, var_64, 1); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool32_t var_1 = __riscv_vmsleu_vx_u32m1_b32_mu(var_2, var_2, var_65, var_13, 1); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vint32m1_t var_0 = __riscv_vloxei8_v_i32m1_mu(var_1, var_10, var_121, var_118, 1); +// 16886, 7303, 30389 + +vint32m1_t var_5 = __riscv_vredxor_vs_i32m1_i32m1_tu(var_0, var_10, var_60, 1); +// 825454882 + +vint32m1_t var_12 = __riscv_vmv_s_x_i32m1_tu(var_0, var_73, 1); +// -2044580921, 7303, 30389 + +vint32m1_t var_6 = __riscv_vrgather_vv_i32m1_mu(var_55, var_5, var_10, var_116, 1); +// 825454882, 7303, 30389 + +vint32m1_t var_7 = __riscv_vnmsub_vv_i32m1(var_5, var_10, var_54, 1); +// -2145177453, 7303, 30389 + +__riscv_vse32_v_i32m1(var_95, var_12, 1); +__riscv_vse32_v_i32m1(var_85, var_6, 1); +vbool32_t var_8 = __riscv_vmadc_vvm_i32m1_b32(var_7, var_51, var_52, 1); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +if(!check(var_95, var_133, var_134)) {cerr << "check 132 fails" << endl; return_value = 1;} +if(!check(var_85, var_136, var_137)) {cerr << "check 135 fails" << endl; return_value = 1;} +vfloat64m2_t var_15 = __riscv_vfmacc_vf_f64m2_mu(var_8, var_39, var_71, var_40, 1); +// -5.392986098814974e-44, 1.9872606665059677e+261, 2.1883326855203212e-122 + +vint32m1_t var_17 = __riscv_vsext_vf2_i32m1_mu(var_8, var_31, var_32, 1); +// -29825 + +vfloat64m2_t var_16 = __riscv_vfslide1down_vf_f64m2_mu(var_34, var_15, var_35, var_70, 1); +// -4.518691795485215e-149, 1.9872606665059677e+261, 2.1883326855203212e-122 + +vfloat64m2_t var_18 = __riscv_vfwnmsac_vv_f64m2_mu(var_25, var_15, var_26, var_27, 1); +// 5.440929296973346e-13, 1.9872606665059677e+261, 2.1883326855203212e-122 + +__riscv_vse32_v_i32m1(var_105, var_17, 1); +__riscv_vse64_v_f64m2(var_103, var_16, 1); +__riscv_vse64_v_f64m2(var_110, var_18, 1); +if(!check(var_105, var_127, var_128)) {cerr << "check 126 fails" << endl; return_value = 1;} +if(!check(var_103, var_130, var_131)) {cerr << "check 129 fails" << endl; return_value = 1;} +if(!check(var_110, var_124, var_125)) {cerr << "check 123 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-3.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-3.C new file mode 100644 index 00000000000..686351326e1 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-3.C @@ -0,0 +1,385 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + +int main() +{ +int return_value = 0; + +size_t var_108 = 32u; +uint32_t var_107 [] = {2032328274u, 626526942u, 441945600u, 359218908u, 795467553u, 481030164u, 1519533270u, 876226206u}; +size_t var_105 = 14u; +int16_t var_104 [] = {26664, -5751, -27825, 26664, 13617, 13617, -6442}; +size_t var_102 = 16u; +int16_t var_101 [] = {-9364, 32767, 11538, -10536, 32767, 30906, 30906, 4977}; +size_t var_99 = 4u; +int32_t var_98 [] = {-967692376}; +uint32_t var_96 [] = {200442261u, 4280292277u, 1765883272u, 3011489556u, 3298976744u, 2700996695u, 1391342474u, 1658482804u}; +int16_t var_95 [] = {-25088, 32020, -14555, 29922, -27825, 16446, 10946, 26664, -26653, -9607, -12312, -5751, 7191, -9395, 4649, 13617}; +uint32_t var_93 [] = {16u, 14u, 22u, 8u, 14u, 30u, 30u, 20u}; +int32_t var_91 [] = {-1676424092}; +uint16_t var_90 [] = {32717u, 49606u, 44536u, 45400u, 20945u, 52615u, 58914u}; +int32_t var_89 [] = {1150382723, -25813573, -1544838363, 11637069, -1756987316, 581238726, -642314632}; +int32_t var_88 [] = {1152185805, 966606079, -1650031826, -1900183008, 31785867, 2085283094, 486945939}; +uint32_t var_87 [] = {603695150u, 709791116u, 293373582u, 2465486296u, 3629298997u, 3700014134u, 3947999496u}; +int16_t var_86 [] = {27299, 9863, -25877, -3835, -12966, 5361, -614}; +int16_t var_85 [] = {9130, -28060, -31697, 2392, -18280, 5054, -10904}; +int16_t var_84 [] = {-30726, 3935, -32544, 30984, -7828, -13821, -24051}; +uint16_t var_83 [] = {34622u, 47429u, 38572u, 54107u, 37111u, 7090u, 15572u}; +uint16_t var_82 [] = {23590u, 22627u, 63394u, 26694u, 46543u, 45392u, 47987u}; +int8_t var_81 [] = {-46, -43, -66, 102, 75, -106, -78}; +int16_t var_80 [] = {-6504, 17213, -7465, -12809, -22594, -5977, 28325}; +int16_t var_79 [] = {-25308, -29748, 964, 5301, -14548, -8172, 16870, -12725}; +uint32_t var_78 [] = {2749387368u, 34851750u, 1821162092u, 3392410812u, 225949308u, 3649011883u, 1520252640u, 205467072u}; +float32_t var_77 [] = {f32(371865542u), f32(1636635715u), f32(4109999702u), f32(1019721516u), f32(4263035649u), f32(2332917959u), f32(4059235545u), f32(847467537u)}; +// 1.3750089631844789e-25, 3.253063656371556e+20, -1.5821452052179264e+32, 0.024379335343837738, -5.076379338228278e+37, -2.725249352151892e-32, -2.406742970988547e+30, 1.5288636134869193e-08 + +int32_t var_76 [] = {948862036, -2093729137, 963404136, 1242496314, 1677591169, 1057599172, 985156, 1851640545}; +uint16_t var_75 [] = {8495u, 45225u, 33771u, 3769u, 4768u, 28948u, 504u}; +uint8_t var_74 [] = {153u, 78u, 249u, 147u, 33u, 209u, 121u}; +int16_t var_73 [] = {-6442, 2757, 1437, -18340, -5849, -27551, 29648}; +int16_t var_72 [] = {29981, -14262, 26356, 1811, -10931, 24794, -29367}; +uint16_t var_71 [] = {58862u, 18146u, 12800u, 10404u, 23039u, 13932u, 44010u, 25378u}; +int8_t var_70 [] = {-25, 3, 102, 71, 11, 11, -11}; +int16_t var_69 [] = {12911, 12016, -31202, -226, 12729, 6375, 30653}; +int32_t var_68 [] = {2060611965, 1606981125, -198439603, -1488521294, 1133517116, -2044388464, 1526469553, -1251736891}; +int32_t var_67 [] = {-868848602, 735716445, -1200143269, -1475028242, -1315587111, -822562929, -1719354165, 575969997}; +int16_t var_66 [] = {-32336, 24855, -22214, 255, -19505, -4998, -2438}; +size_t var_65 = 4u; +uint16_t var_64 = 34527u; +int16_t var_63 = -14406; +int16_t var_62 = -6468; +uint16_t var_61 = 18798u; +int16_t var_60 = 17289; +size_t var_59 = 6u; +int32_t var_58 = 182690347; +int16_t var_57 = -8819; +int32_t var_56 = -720640033; +uint8_t var_55 = 68u; +uint16_t var_54 = 44422u; +int8_t var_53 = -20; +__riscv_vsetvl_e32m2(8); +vuint32m2_t var_92 = __riscv_vle32_v_u32m2(var_93, 8); +// 16, 14, 22, 8, 14, 30, 30, 20 + +__riscv_vsetvl_e16m8(7); +vuint16m8_t var_21 = __riscv_vle16_v_u16m8(var_90, 7); +// 32717, 49606, 44536, 45400, 20945, 52615, 58914 + +__riscv_vsetvl_e32m2(7); +vint32m2_t var_22 = __riscv_vle32_v_i32m2(var_89, 7); +// 1150382723, -25813573, -1544838363, 11637069, -1756987316, 581238726, -642314632 + +vint32m2_t var_23 = __riscv_vle32_v_i32m2(var_88, 7); +// 1152185805, 966606079, -1650031826, -1900183008, 31785867, 2085283094, 486945939 + +vuint32m2_t var_24 = __riscv_vle32_v_u32m2(var_87, 7); +// 603695150, 709791116, 293373582, 2465486296, 3629298997, 3700014134, 3947999496 + +vint16m1_t var_25 = __riscv_vle16_v_i16m1(var_86, 7); +// 27299, 9863, -25877, -3835, -12966, 5361, -614 + +vint16m1_t var_26 = __riscv_vle16_v_i16m1(var_85, 7); +// 9130, -28060, -31697, 2392, -18280, 5054, -10904 + +__riscv_vsetvl_e16m8(7); +vint16m8_t var_29 = __riscv_vle16_v_i16m8(var_84, 7); +// -30726, 3935, -32544, 30984, -7828, -13821, -24051 + +vuint16m8_t var_30 = __riscv_vle16_v_u16m8(var_83, 7); +// 34622, 47429, 38572, 54107, 37111, 7090, 15572 + +vuint16m8_t var_31 = __riscv_vle16_v_u16m8(var_82, 7); +// 23590, 22627, 63394, 26694, 46543, 45392, 47987 + +vint8m4_t var_32 = __riscv_vle8_v_i8m4(var_81, 7); +// -46, -43, -66, 102, 75, -106, -78 + +__riscv_vsetvl_e16m1(7); +vint16m1_t var_33 = __riscv_vle16_v_i16m1(var_80, 7); +// -6504, 17213, -7465, -12809, -22594, -5977, 28325 + +__riscv_vsetvl_e32m2(8); +vuint32m2_t var_36 = __riscv_vle32_v_u32m2(var_78, 8); +// 2749387368, 34851750, 1821162092, 3392410812, 225949308, 3649011883, 1520252640, 205467072 + +vfloat32m2_t var_37 = __riscv_vle32_v_f32m2(var_77, 8); +// 1.3750089631844789e-25, 3.253063656371556e+20, -1.5821452052179264e+32, 0.024379335343837738, -5.076379338228278e+37, -2.725249352151892e-32, -2.406742970988547e+30, 1.5288636134869193e-08 + +vint32m2_t var_38 = __riscv_vle32_v_i32m2(var_76, 8); +// 948862036, -2093729137, 963404136, 1242496314, 1677591169, 1057599172, 985156, 1851640545 + +__riscv_vsetvl_e16m1(7); +vuint16m1_t var_41 = __riscv_vle16_v_u16m1(var_75, 7); +// 8495, 45225, 33771, 3769, 4768, 28948, 504 + +vuint8mf2_t var_42 = __riscv_vle8_v_u8mf2(var_74, 7); +// 153, 78, 249, 147, 33, 209, 121 + +__riscv_vsetvl_e16m8(7); +vint16m8_t var_43 = __riscv_vle16_v_i16m8(var_73, 7); +// -6442, 2757, 1437, -18340, -5849, -27551, 29648 + +vint16m8_t var_44 = __riscv_vle16_v_i16m8(var_72, 7); +// 29981, -14262, 26356, 1811, -10931, 24794, -29367 + +__riscv_vsetvl_e16m1(8); +vuint16m1_t var_45 = __riscv_vle16_v_u16m1(var_71, 8); +// 58862, 18146, 12800, 10404, 23039, 13932, 44010, 25378 + +__riscv_vsetvl_e8mf2(7); +vint8mf2_t var_47 = __riscv_vle8_v_i8mf2(var_70, 7); +// -25, 3, 102, 71, 11, 11, -11 + +__riscv_vsetvl_e16m8(7); +vint16m8_t var_48 = __riscv_vle16_v_i16m8(var_69, 7); +// 12911, 12016, -31202, -226, 12729, 6375, 30653 + +__riscv_vsetvl_e32m2(8); +vint32m2_t var_50 = __riscv_vle32_v_i32m2(var_68, 8); +// 2060611965, 1606981125, -198439603, -1488521294, 1133517116, -2044388464, 1526469553, -1251736891 + +vint32m2_t var_51 = __riscv_vle32_v_i32m2(var_67, 8); +// -868848602, 735716445, -1200143269, -1475028242, -1315587111, -822562929, -1719354165, 575969997 + +vint16m1_t var_0 = __riscv_vloxei32_v_i16m1(var_95, var_92, 8); +// -26653, 26664, -5751, -27825, 26664, 13617, 13617, -12312 + +__riscv_vsetvl_e16m8(7); +vuint16m8_t var_18 = __riscv_vrgather_vx_u16m8(var_21, var_59, 7); +// 58914, 58914, 58914, 58914, 58914, 58914, 58914 + +__riscv_vsetvl_e16m1(7); +vint16m1_t var_16 = __riscv_vor_vv_i16m1(var_25, var_26, 7); +// 27563, -18713, -24849, -1699, -550, 6143, -518 + +__riscv_vsetvl_e16m8(7); +vbool2_t var_28 = __riscv_vmsbc_vx_i16m8_b2(var_29, var_57, 7); +// 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0 + +vbool2_t var_27 = __riscv_vmsgeu_vv_u16m8_b2(var_30, var_31, 7); +// 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m2(8); +vbool16_t var_35 = __riscv_vmsbc_vx_i32m2_b16(var_38, var_56, 8); +// 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m1(7); +vbool16_t var_40 = __riscv_vmsgtu_vx_u16m1_b16(var_41, var_54, 7); +// 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool16_t var_39 = __riscv_vmadc_vx_u8mf2_b16(var_42, var_55, 7); +// 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m1(8); +vuint32m2_t var_7 = __riscv_vwmulu_vx_u32m2(var_45, var_64, 8); +// 2032328274, 626526942, 441945600, 359218908, 795467553, 481030164, 1519533270, 876226206 + +__riscv_vsetvl_e8mf2(7); +vbool16_t var_46 = __riscv_vmsle_vx_i8mf2_b16(var_47, var_53, 7); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m2(8); +vbool16_t var_49 = __riscv_vmseq_vv_i32m2_b16(var_50, var_51, 8); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vint16m1_t var_13 = __riscv_vsadd_vx_i16m1(var_0, var_60, 8); +// -9364, 32767, 11538, -10536, 32767, 30906, 30906, 4977 + +__riscv_vsetvl_e16m8(7); +vbool2_t var_11 = __riscv_vmsgeu_vx_u16m8_b2(var_18, var_61, 7); +// 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 + +vint16m1_t var_14 = __riscv_vwredsum_vs_i8m4_i16m1_tu(var_16, var_32, var_33, 7); +// -6666 + +vbool2_t var_15 = __riscv_vmnor_mm_b2(var_27, var_28, 7); +// 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m2(8); +vuint32m2_t var_12 = __riscv_vfcvt_rtz_xu_f_v_u32m2_mu(var_35, var_36, var_37, 8); +// 0, 4294967295, 0, 0, 0, 0, 0, 0 + +__riscv_vse16_v_i16m1(var_79, var_13, 8); +__riscv_vsetvl_e16m8(7); +vint16m8_t var_9 = __riscv_vaadd_vx_i16m8_mu(var_15, var_43, var_44, var_63, 7); +// -6442, 2757, 1437, -18340, -12668, -27551, 29648 + +__riscv_vsetvl_e32m2(8); +vuint32m2_t var_3 = __riscv_vsrl_vx_u32m2_mu(var_49, var_7, var_12, var_65, 8); +// 2032328274, 626526942, 441945600, 359218908, 795467553, 481030164, 1519533270, 876226206 + +if(!check(var_79, var_101, var_102)) {cerr << "check 100 fails" << endl; return_value = 1;} +__riscv_vsetvl_e16m8(7); +int16_t var_8 = __riscv_vmv_x_s_i16m8_i16(var_9); +// -6442 + +__riscv_vsetvl_e32m2(8); +__riscv_vse32_v_u32m2(var_96, var_3, 8); +__riscv_vsetvl_e16m8(7); +vint16m8_t var_4 = __riscv_vmerge_vxm_i16m8(var_48, var_8, var_11, 7); +// -6442, -6442, -6442, -6442, -6442, -6442, -6442 + +__riscv_vsetvl_e16m1(1); +vint16m1_t var_6 = __riscv_vaadd_vx_i16m1(var_14, var_8, 1); +// -6554 + +if(!check(var_96, var_107, var_108)) {cerr << "check 106 fails" << endl; return_value = 1;} +__riscv_vsetvl_e16m8(7); +int16_t var_2 = __riscv_vmv_x_s_i16m8_i16(var_4); +// -6442 + +__riscv_vsetvl_e16m1(1); +vint16m1_t var_5 = __riscv_vredsum_vs_i16m1_i16m1_tum(var_46, var_0, var_6, var_6, 1); +// -13108 + +__riscv_vsetvl_e16m1(7); +vint16m1_t var_1 = __riscv_vslide1down_vx_i16m1(var_0, var_2, 7); +// 26664, -5751, -27825, 26664, 13617, 13617, -6442 + +__riscv_vsetvl_e16m1(1); +vbool16_t var_10 = __riscv_vmsgt_vx_i16m1_b16_mu(var_39, var_40, var_5, var_62, 1); +// 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m1(7); +__riscv_vse16_v_i16m1(var_66, var_1, 7); +__riscv_vsetvl_e32m2(1); +vint32m2_t var_17 = __riscv_vsra_vv_i32m2_mu(var_10, var_22, var_23, var_24, 1); +// 1150382723, -25813573, -1544838363, 11637069, -1756987316, 581238726, -642314632 + +if(!check(var_66, var_104, var_105)) {cerr << "check 103 fails" << endl; return_value = 1;} +vint32m2_t var_19 = __riscv_vrsub_vx_i32m2(var_17, var_58, 1); +// -967692376 + +__riscv_vse32_v_i32m2(var_91, var_19, 1); +if(!check(var_91, var_98, var_99)) {cerr << "check 97 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-4.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-4.C new file mode 100644 index 00000000000..4f86f4f22e6 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-4.C @@ -0,0 +1,417 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + + + +int main() +{ +int return_value = 0; + +size_t var_117 = 54u; +uint16_t var_116 [] = {0u, 0u, 0u, 65535u, 0u, 0u, 0u, 0u, 0u, 0u, 65535u, 0u, 0u, 1u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u}; +size_t var_114 = 4u; +int32_t var_113 [] = {1131231630}; +size_t var_111 = 28u; +int32_t var_110 [] = {1482257973, -2080211897, -1425005568, -772921329, 2039222333, -1571066816, -188946235}; +size_t var_108 = 32u; +int32_t var_107 [] = {813369075, 1204827914, 1528599370, 1275800932, -2129835614, -1571066816, -13757896, -2057974591}; +size_t var_105 = 8u; +int8_t var_104 [] = {-73, -22, -38, 19, -63, -62, -54, -19}; +uint16_t var_102 [] = {52140u, 59943u, 63965u, 9648u, 63559u, 28713u, 30184u, 12417u, 41389u, 14500u, 15113u, 56595u, 42619u, 2896u, 47283u, 58428u, 29398u, 37618u, 46357u, 24160u, 39915u, 34372u, 12510u, 42546u, 18411u, 60003u, 43401u}; +int32_t var_101 [] = {2069013122, -1368940921, -2080211897, 631650388, -1314194581, 69574056, -1878864342, -2037063984, 2137209457, 1014980535, 909383812, -910413246, -1431785962, 590505332, 2039222333, -347077016, -1858298303, 1578278808, -1050337408, -72583627, -1099928980, 1772484196, -386537109, 1102076145, 869454379, -2134514169, -1556682087, 718017706, 383122722, -2103455017, -259297483, -521905245, -1427561998, 624230573, -13757896, -1330338529, -1219765796, -1127570029, 1207018851, 613427774, -1220354627, -2026904039, -1502721560, -633869536, 362147503, -1480610983, -1574779941, 207768905, 1839325720, 2059147515, 1460874286, -1942707504, -1684874627, 293684054, -1742524516, -1187457535, -88417097, -1475702784, -1780376525, -839989115, 1550010305, -2047737914, 979761741, -875216019}; +uint16_t var_99 [] = {144u, 8u, 148u, 24u, 56u, 152u, 136u, 48u, 12u, 204u, 4u, 128u, 0u, 176u, 40u, 196u, 84u, 208u, 108u, 212u, 188u, 120u, 92u, 20u, 80u, 96u, 72u}; +uint32_t var_97 = 7u; +uint32_t var_95 [] = {1724306898u, 1160725831u, 519600880u, 3968407808u, 2394542848u, 1724357472u, 658497049u, 3234608948u}; +int8_t var_94 [] = {-73, -22, 108, 90, 1, -62, -54, 114}; +int8_t var_93 [] = {125, -71, -38, 19, -63, -115, -52, -19}; +float64_t var_92 [] = {f64(12922509399134607095u), f64(13681792908481616153u), f64(12961200966296176724u), f64(14056580188338608325u), f64(5165498436007611196u), f64(5891026634065631128u), f64(11585749923629966909u), f64(4313307776925509365u)}; +// -2.1368188023093786e-61, -1.1457019892378542e-10, -7.825060027673582e-59, -1337337735665201.2, 2.0959899369128604e+37, 6.655935256786952e+85, -9.490248727914318e-151, 2.367248714068789e-20 + +float64_t var_91 [] = {f64(2782416797552003540u), f64(17887890837946723391u), f64(1899994729740199155u), f64(10761954294193513069u), f64(14073813696208453008u), f64(13681301065814324064u), f64(13575220409714312128u), f64(1467011674835775258u)}; +// 1.101654707111875e-122, -1.6141756689152726e+271, 1.1348186875896591e-181, -8.1426474651423e-206, -1.8273841212094016e+16, -1.0821328144237315e-10, -9.051458507964313e-18, 1.324701712596762e-210 + +uint8_t var_90 [] = {48u, 14u, 163u, 186u, 77u, 121u, 66u, 189u}; +uint8_t var_89 [] = {44u, 174u, 62u, 152u, 190u, 184u, 211u, 207u}; +int32_t var_88 [] = {-1862105746, 785328569, -186089231, 800073162, 700994575, 2001118506, 491632681, 2012279744}; +int32_t var_87 [] = {-1426460805, 1391224153, 391018314, 1747488700, 171852085, -26969920, 1491273002, -1037517631}; +int32_t var_86 [] = {-1007131310, -1935237840, 2131743138, 1562448120, 554248768, 1043844959, -272924185, 1908950866}; +uint32_t var_85 [] = {331199451u, 2147245828u, 2310560262u, 1691746756u, 3884722626u, 185329475u, 335670251u, 3708458775u}; +uint32_t var_84 [] = {4142322270u, 4074305254u, 3445223658u, 2300853929u, 590829748u, 3453669629u, 2059468991u, 4136545759u}; +int32_t var_83 [] = {-1482257973, -1918917804, 1664313015, 772921329, -1080281711, -81955995, 188946235}; +int32_t var_82 [] = {-1199710090, -1526593688, 1087685446, 451331814, 2120591979, -1929369621, 1851976937}; +int8_t var_81 [] = {116, -64, -85, 53, 96, 29, -23}; +int8_t var_80 [] = {-55, -33, 121, -59, 117, 95, -128}; +int32_t var_79 [] = {313413364, -1948452097, 48968472, 1638685938, -1253448876, -892478863, -1372364897, -1645124752, -1249167956, -1192514844, 1426594924, -377916957, -76355607, -1487562927, 1352608927, 2006772863, -1590277543, 897536043, 1045648728, 1685555981, 1015388771, 1922565890, 1107673669, -144112029, -1911947830, 1598134864, 1604618821}; +int32_t var_78 [] = {-2101808540, -1703952474, 826896624, -371182456, 1757221438, -597812672, -1652792312, -445713936, 453236293, 1341711666, 1820293097, -1104906842, -2016988437, -1553335267, -412524033, 1420433669, -1471236009, 582768780, 531897192, -418517458, 200863626, 1099229305, 849131599, 1720583698, 867992649, -232197794, -1758985822}; +int16_t var_77 [] = {-3313, -20409, 29551, 5558, 16767, 22583, 27835, -31801, -10322, 26191, -12956, -9551, -2709, 6812, 4448, -4942, 2086, -25819, 9684, -17645, -7317, -1044, -9028, -13237, 27006, -16655, -27798}; +int8_t var_76 [] = {-62, 22, 41, -128, 83, -29, -90, 82, 72, -125, 33, -52, 79, -26, -92, 3, 75, 122, -1, -97, 37, -15, 82, -34, 2, -35, -116}; +int8_t var_75 [] = {-48, 24, -127, 32, -58, -44, 118, 62, -114, 64, 22, -24, -20, -71, 75, 113, 12, 14, 58, -89, -103, -29, 63, 37, 25, -99, -109}; +int32_t var_74 [] = {-507451025, -125565381, 408231117, -158162944, 1085647217, 508923779, -1948095886, 218780494}; +int32_t var_73 [] = {2043236272, 992773258, 1599815252, 166211673, 1255185392, 2077252875, -243558405, -745426821}; +uint32_t var_72 [] = {219915149u, 1691908340u, 2049727508u, 117249866u, 3502211068u, 608209970u, 178777369u, 133747942u}; +int32_t var_71 [] = {1777702579, 933403794, -574300082, -13421362, -1463117709, -367080915, 1435942936, -909349460}; +uint16_t var_70 [] = {62618u, 22279u, 49831u, 34050u, 16290u, 59215u, 40971u, 32430u, 59269u, 56222u, 25121u, 14592u, 23259u, 442u, 13488u, 1844u, 21166u, 29064u, 11869u, 21037u, 23003u, 38279u, 41308u, 21144u, 49608u, 42546u, 58026u}; +uint16_t var_69 [] = {43304u, 20248u, 25263u, 2691u, 51778u, 58152u, 54408u, 6177u, 49900u, 18701u, 57281u, 38757u, 38171u, 31182u, 13543u, 38368u, 55068u, 23109u, 11144u, 45588u, 47327u, 47070u, 26446u, 55734u, 19514u, 49821u, 15823u}; +float32_t var_68 [] = {f32(2847156718u), f32(2322089025u), f32(2472203265u), f32(9086869u), f32(544251513u), f32(3232380532u), f32(2637100406u), f32(3904304908u), f32(4094724758u), f32(1810767428u), f32(3705495664u), f32(228437819u), f32(507805196u), f32(1255296302u), f32(3284790541u), f32(3509915205u), f32(2924424021u), f32(2548605725u), f32(2148948796u), f32(204929039u), f32(657024717u), f32(907854480u), f32(3641195928u), f32(4161344434u), f32(3260203264u), f32(1285405376u), f32(1147886346u)}; +// -8.000879418625789e-14, -1.1183230810440917e-32, -2.761999436998062e-27, 1.2733415575220786e-38, 2.038122493765112e-19, -5.319147109985352, -2.3155608583875722e-21, -6.912223282876881e+24, -4.580698268912941e+31, 5.757345408827297e+26, -4.98496032045269e+17, 9.718057241468303e-31, 1.0402219486683403e-20, 6891159.0, -403.8519592285156, -48601780224.0, -4.710483739178706e-11, -1.5033824183547769e-24, -2.053109642408577e-39, 1.4095417412899345e-31, 2.350918981038866e-15, 2.335906174266711e-06, -2396769992310784.0, -1.1121002156479192e+34, -52.6884765625, 82695680.0, 941.4224853515625 + +int16_t var_67 [] = {-25082, -28599, -25747, 20638, -17688, 12146, -30280, 30663, -25770, 13683, 25809, -3140, -8481, -13306, -7345, 17811, -8185, -20020, -28257, 30298, 26059, 8780, -8531, 5466, 7024, 6714, 1604}; +int16_t var_66 [] = {25003, 7408, -29306, -20538, 24896, -10180, 17648, 15137, -1835, 300, -16330, 618, 29527, 25340, -15466, -17361, -18568, -19657, 16349, 26319, -10598, 19199, 8860, 14834, -10463, -20815, -17872}; +int32_t var_65 [] = {-837045230, -882942322, 1581645895, 626004745, 897210368, 172502132, 1272779112, 1136503917, 1812560846, 1483165492, -973576091, -47436677, 337814556, -211558845, 755078495, 1403626389, 1606078406, 2126743853, -1073923665, 833202120, 268872639, 1641317818, -270559000, -735594549, -1072867814, -1994709512, -897229444}; +int32_t var_64 [] = {886219385}; +float32_t var_63 [] = {f32(3557688729u), f32(2472673958u), f32(3060341569u), f32(1284824831u), f32(2851110045u), f32(3369008656u), f32(831471122u), f32(2388863590u), f32(3600055344u), f32(222911681u), f32(2052676798u), f32(2359679597u), f32(4000009057u), f32(1060570104u), f32(4014415006u), f32(113339578u), f32(2330632585u), f32(3225802533u), f32(2461484160u), f32(2851489446u), f32(627545295u), f32(24199786u), f32(3732703771u), f32(1484387u), f32(4203645669u), f32(2702868363u), f32(3908083212u)}; +// -2439917076480.0, -2.852651611329408e-27, -3.4735569443000713e-06, 78051320.0, -1.067975799484179e-13, -423920.5, 4.168904332857437e-09, -2.8000324337151883e-30, -81630551080960.0, 6.204955546493461e-31, 2.821523633341178e+35, -2.5553735501141373e-31, -1.8205026203509007e+28, 0.7149043083190918, -6.162211301130117e+28, 7.275829043178832e-35, -2.2594143121692602e-32, -3.0912563800811768, -1.1565810206188e-27, -1.0936850112618773e-13, 2.0086474460228454e-16, 4.4312358901132665e-38, -4.549346732789465e+18, 2.0800692235637222e-39, -3.700616348432326e+35, -5.234603126449283e-19, -9.090267249147915e+24 + +int32_t var_62 = 1131231630; +int32_t var_61 = -284499481; +float32_t var_60 = f32(3372864583u); +// -564548.4375 + +__riscv_vsetvl_e8mf2(8); +vbool16_t var_23 = __riscv_vmset_m_b16(8); +// 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m4(27); +vuint16m4_t var_98 = __riscv_vle16_v_u16m4(var_99, 27); +// 144, 8, 148, 24, 56, 152, 136, 48, 12, 204, 4, 128, 0, 176, 40, 196, 84, 208, 108, 212, 188, 120, 92, 20, 80, 96, 72 + +__riscv_vsetvl_e32m8(8); +vuint32m8_t var_20 = __riscv_vle32_v_u32m8(var_95, 8); +// 1724306898, 1160725831, 519600880, 3968407808, 2394542848, 1724357472, 658497049, 3234608948 + +vint8m2_t var_22 = __riscv_vle8_v_i8m2(var_93, 8); +// 125, -71, -38, 19, -63, -115, -52, -19 + +__riscv_vsetvl_e64m4(8); +vfloat64m4_t var_25 = __riscv_vle64_v_f64m4(var_92, 8); +// -2.1368188023093786e-61, -1.1457019892378542e-10, -7.825060027673582e-59, -1337337735665201.2, 2.0959899369128604e+37, 6.655935256786952e+85, -9.490248727914318e-151, 2.367248714068789e-20 + +vfloat64m4_t var_26 = __riscv_vle64_v_f64m4(var_91, 8); +// 1.101654707111875e-122, -1.6141756689152726e+271, 1.1348186875896591e-181, -8.1426474651423e-206, -1.8273841212094016e+16, -1.0821328144237315e-10, -9.051458507964313e-18, 1.324701712596762e-210 + +vuint8mf2_t var_27 = __riscv_vle8_v_u8mf2(var_90, 8); +// 48, 14, 163, 186, 77, 121, 66, 189 + +vuint8mf2_t var_28 = __riscv_vle8_v_u8mf2(var_89, 8); +// 44, 174, 62, 152, 190, 184, 211, 207 + +__riscv_vsetvl_e32m8(8); +vint32m8_t var_30 = __riscv_vle32_v_i32m8(var_88, 8); +// -1862105746, 785328569, -186089231, 800073162, 700994575, 2001118506, 491632681, 2012279744 + +vint32m8_t var_31 = __riscv_vle32_v_i32m8(var_87, 8); +// -1426460805, 1391224153, 391018314, 1747488700, 171852085, -26969920, 1491273002, -1037517631 + +vuint32m8_t var_33 = __riscv_vle32_v_u32m8(var_85, 8); +// 331199451, 2147245828, 2310560262, 1691746756, 3884722626, 185329475, 335670251, 3708458775 + +vuint32m8_t var_34 = __riscv_vle32_v_u32m8(var_84, 8); +// 4142322270, 4074305254, 3445223658, 2300853929, 590829748, 3453669629, 2059468991, 4136545759 + +__riscv_vsetvl_e32m8(7); +vint32m8_t var_36 = __riscv_vle32_v_i32m8(var_83, 7); +// -1482257973, -1918917804, 1664313015, 772921329, -1080281711, -81955995, 188946235 + +vint8m2_t var_38 = __riscv_vle8_v_i8m2(var_81, 7); +// 116, -64, -85, 53, 96, 29, -23 + +vint8m2_t var_39 = __riscv_vle8_v_i8m2(var_80, 7); +// -55, -33, 121, -59, 117, 95, -128 + +__riscv_vsetvl_e32m8(27); +vint32m8_t var_41 = __riscv_vle32_v_i32m8(var_79, 27); +// 313413364, -1948452097, 48968472, 1638685938, -1253448876, -892478863, -1372364897, -1645124752, -1249167956, -1192514844, 1426594924, -377916957, -76355607, -1487562927, 1352608927, 2006772863, -1590277543, 897536043, 1045648728, 1685555981, 1015388771, 1922565890, 1107673669, -144112029, -1911947830, 1598134864, 1604618821 + +vint32m8_t var_42 = __riscv_vle32_v_i32m8(var_78, 27); +// -2101808540, -1703952474, 826896624, -371182456, 1757221438, -597812672, -1652792312, -445713936, 453236293, 1341711666, 1820293097, -1104906842, -2016988437, -1553335267, -412524033, 1420433669, -1471236009, 582768780, 531897192, -418517458, 200863626, 1099229305, 849131599, 1720583698, 867992649, -232197794, -1758985822 + +vint16m4_t var_43 = __riscv_vle16_v_i16m4(var_77, 27); +// -3313, -20409, 29551, 5558, 16767, 22583, 27835, -31801, -10322, 26191, -12956, -9551, -2709, 6812, 4448, -4942, 2086, -25819, 9684, -17645, -7317, -1044, -9028, -13237, 27006, -16655, -27798 + +vint8m2_t var_44 = __riscv_vle8_v_i8m2(var_76, 27); +// -62, 22, 41, -128, 83, -29, -90, 82, 72, -125, 33, -52, 79, -26, -92, 3, 75, 122, -1, -97, 37, -15, 82, -34, 2, -35, -116 + +vint8m2_t var_45 = __riscv_vle8_v_i8m2(var_75, 27); +// -48, 24, -127, 32, -58, -44, 118, 62, -114, 64, 22, -24, -20, -71, 75, 113, 12, 14, 58, -89, -103, -29, 63, 37, 25, -99, -109 + +__riscv_vsetvl_e32m2(8); +vint32m2_t var_46 = __riscv_vle32_v_i32m2(var_74, 8); +// -507451025, -125565381, 408231117, -158162944, 1085647217, 508923779, -1948095886, 218780494 + +vint32m2_t var_47 = __riscv_vle32_v_i32m2(var_73, 8); +// 2043236272, 992773258, 1599815252, 166211673, 1255185392, 2077252875, -243558405, -745426821 + +vuint32m2_t var_48 = __riscv_vle32_v_u32m2(var_72, 8); +// 219915149, 1691908340, 2049727508, 117249866, 3502211068, 608209970, 178777369, 133747942 + +vint32m2_t var_49 = __riscv_vle32_v_i32m2(var_71, 8); +// 1777702579, 933403794, -574300082, -13421362, -1463117709, -367080915, 1435942936, -909349460 + +__riscv_vsetvl_e16m4(27); +vuint16m4_t var_52 = __riscv_vle16_v_u16m4(var_70, 27); +// 62618, 22279, 49831, 34050, 16290, 59215, 40971, 32430, 59269, 56222, 25121, 14592, 23259, 442, 13488, 1844, 21166, 29064, 11869, 21037, 23003, 38279, 41308, 21144, 49608, 42546, 58026 + +vuint16m4_t var_53 = __riscv_vle16_v_u16m4(var_69, 27); +// 43304, 20248, 25263, 2691, 51778, 58152, 54408, 6177, 49900, 18701, 57281, 38757, 38171, 31182, 13543, 38368, 55068, 23109, 11144, 45588, 47327, 47070, 26446, 55734, 19514, 49821, 15823 + +vfloat32m8_t var_54 = __riscv_vle32_v_f32m8(var_68, 27); +// -8.000879418625789e-14, -1.1183230810440917e-32, -2.761999436998062e-27, 1.2733415575220786e-38, 2.038122493765112e-19, -5.319147109985352, -2.3155608583875722e-21, -6.912223282876881e+24, -4.580698268912941e+31, 5.757345408827297e+26, -4.98496032045269e+17, 9.718057241468303e-31, 1.0402219486683403e-20, 6891159.0, -403.8519592285156, -48601780224.0, -4.710483739178706e-11, -1.5033824183547769e-24, -2.053109642408577e-39, 1.4095417412899345e-31, 2.350918981038866e-15, 2.335906174266711e-06, -2396769992310784.0, -1.1121002156479192e+34, -52.6884765625, 82695680.0, 941.4224853515625 + +vint16m4_t var_55 = __riscv_vle16_v_i16m4(var_67, 27); +// -25082, -28599, -25747, 20638, -17688, 12146, -30280, 30663, -25770, 13683, 25809, -3140, -8481, -13306, -7345, 17811, -8185, -20020, -28257, 30298, 26059, 8780, -8531, 5466, 7024, 6714, 1604 + +vint16m4_t var_56 = __riscv_vle16_v_i16m4(var_66, 27); +// 25003, 7408, -29306, -20538, 24896, -10180, 17648, 15137, -1835, 300, -16330, 618, 29527, 25340, -15466, -17361, -18568, -19657, 16349, 26319, -10598, 19199, 8860, 14834, -10463, -20815, -17872 + +vint32m8_t var_57 = __riscv_vle32_v_i32m8(var_65, 27); +// -837045230, -882942322, 1581645895, 626004745, 897210368, 172502132, 1272779112, 1136503917, 1812560846, 1483165492, -973576091, -47436677, 337814556, -211558845, 755078495, 1403626389, 1606078406, 2126743853, -1073923665, 833202120, 268872639, 1641317818, -270559000, -735594549, -1072867814, -1994709512, -897229444 + +vfloat32m8_t var_59 = __riscv_vle32_v_f32m8(var_63, 27); +// -2439917076480.0, -2.852651611329408e-27, -3.4735569443000713e-06, 78051320.0, -1.067975799484179e-13, -423920.5, 4.168904332857437e-09, -2.8000324337151883e-30, -81630551080960.0, 6.204955546493461e-31, 2.821523633341178e+35, -2.5553735501141373e-31, -1.8205026203509007e+28, 0.7149043083190918, -6.162211301130117e+28, 7.275829043178832e-35, -2.2594143121692602e-32, -3.0912563800811768, -1.1565810206188e-27, -1.0936850112618773e-13, 2.0086474460228454e-16, 4.4312358901132665e-38, -4.549346732789465e+18, 2.0800692235637222e-39, -3.700616348432326e+35, -5.234603126449283e-19, -9.090267249147915e+24 + +vint32m8_t var_0 = __riscv_vluxei16_v_i32m8(var_101, var_98, 27); +// -1219765796, -2080211897, -1127570029, -1878864342, 2039222333, 1207018851, -13757896, -1431785962, 631650388, -1942707504, -1368940921, -1427561998, 2069013122, 362147503, 909383812, 2059147515, 1772484196, -1684874627, 718017706, 293684054, 207768905, -259297483, 1102076145, 69574056, -1099928980, 869454379, -1050337408 + +__riscv_vsetvl_e8mf2(8); +vbool16_t var_24 = __riscv_vmsbc_vv_u8mf2_b16(var_27, var_28, 8); +// 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m8(8); +vbool4_t var_29 = __riscv_vmadc_vv_u32m8_b4(var_33, var_34, 8); +// 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e8m2(7); +vbool4_t var_35 = __riscv_vmsgt_vv_i8m2_b4(var_38, var_39, 7); +// 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e8m2(27); +vbool4_t var_40 = __riscv_vmsgt_vv_i8m2_b4(var_44, var_45, 27); +// 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m2(8); +vuint32m2_t var_96 = __riscv_vminu_vx_u32m2(var_48, var_97, 8); +// 7, 7, 7, 7, 7, 7, 7, 7 + +__riscv_vsetvl_e32m8(27); +vbool4_t var_51 = __riscv_vmflt_vf_f32m8_b4(var_54, var_60, 27); +// 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool4_t var_50 = __riscv_vmadc_vv_i16m4_b4(var_55, var_56, 27); +// 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vuint16m4_t var_5 = __riscv_vfncvt_xu_f_w_u16m4(var_59, 27); +// 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 65535, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e64m4(8); +vbool16_t var_18 = __riscv_vmfne_vv_f64m4_b16_mu(var_23, var_24, var_25, var_26, 8); +// 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m4(27); +vint32m8_t var_14 = __riscv_vwadd_wv_i32m8_mu(var_40, var_41, var_42, var_43, 27); +// 313413364, -1948452097, 826926175, 1638685938, 1757238205, -597790089, -1372364897, -445745737, 453225971, -1192514844, 1820280141, -377916957, -2016991146, -1553328455, 1352608927, 2006772863, -1471233923, 582742961, 1045648728, 1685555981, 200856309, 1099228261, 849122571, -144112029, -1911947830, -232214449, 1604618821 + +vbool4_t var_10 = __riscv_vmsgtu_vv_u16m4_b4_mu(var_50, var_51, var_52, var_53, 27); +// 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vse16_v_u16m4(var_102, var_5, 27); +__riscv_vsetvl_e32m2(8); +vint32m2_t var_13 = __riscv_vrgather_vv_i32m2_mu(var_18, var_46, var_47, var_96, 8); +// -745426821, -745426821, -745426821, -745426821, -745426821, -745426821, -745426821, -745426821 + +__riscv_vsetvl_e32m8(27); +vint32m8_t var_8 = __riscv_vnmsac_vv_i32m8(var_14, var_14, var_57, 27); +// -2027081268, 2038374285, 835816966, 571941488, 1256348605, -294772597, 1589114887, 825516748, -135335063, 1301584020, -2037799444, -225921582, 79406830, 2053551694, -1594486114, -1579456108, -1880175409, -1267374956, 358835760, -1563922971, -1498691798, 866810371, 1117911827, -1099222814, 1652710214, -1712490297, -35815463 + +__riscv_vsetvl_e32m8(8); +vint32m8_t var_9 = __riscv_vmul_vx_i32m8_mu(var_10, var_0, var_14, var_61, 8); +// -1219765796, -2080211897, 135958713, 799838302, 2039222333, 1836703841, -13757896, -1907880159, 631650388, -1942707504, -1368940921, -1427561998, 2069013122, 362147503, 909383812, 2059147515, 1772484196, -1684874627, 718017706, 293684054, 207768905, -259297483, 1102076145, 69574056, -1099928980, 869454379, -1050337408 + +if(!check(var_102, var_116, var_117)) {cerr << "check 115 fails" << endl; return_value = 1;} +__riscv_vsetvl_e32m2(8); +vint32m2_t var_12 = __riscv_vneg_v_i32m2_mu(var_18, var_13, var_49, 8); +// -1777702579, -933403794, 574300082, 13421362, 1463117709, 367080915, -1435942936, 909349460 + +__riscv_vsetvl_e32m8(27); +int32_t var_4 = __riscv_vmv_x_s_i32m8_i32(var_8); +// -2027081268 + +__riscv_vsetvl_e32m8(8); +vuint32m8_t var_16 = __riscv_vreinterpret_v_i32m8_u32m8(var_9); +// 3075201500, 2214755399, 135958713, 799838302, 2039222333, 1836703841, 4281209400, 2387087137, 631650388, 2352259792, 2926026375, 2867405298, 2069013122, 362147503, 909383812, 2059147515, 1772484196, 2610092669, 718017706, 293684054, 207768905, 4035669813, 1102076145, 69574056, 3195038316, 869454379, 3244629888 + +__riscv_vsetvl_e32m2(8); +int32_t var_11 = __riscv_vmv_x_s_i32m2_i32(var_12); +// -1777702579 + +__riscv_vsetvl_e32m8(8); +vbool4_t var_19 = __riscv_vmsleu_vv_u32m8_b4(var_16, var_20, 8); +// 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m8(27); +vint32m8_t var_7 = __riscv_vmv_v_x_i32m8(var_11, 27); +// -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579 + +__riscv_vsetvl_e8m2(8); +__riscv_vse8_v_i8m2_m(var_19, var_94, var_22, 8); +__riscv_vsetvl_e32m8(27); +vint32m8_t var_3 = __riscv_vmax_vx_i32m8_mu(var_10, var_7, var_14, var_4, 27); +// -1777702579, -1777702579, 826926175, 1638685938, -1777702579, -597790089, -1777702579, -445745737, 453225971, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, -1777702579, 582742961, -1777702579, -1777702579, -1777702579, -1777702579, 849122571, -144112029, -1777702579, -1777702579, -1777702579 + +if(!check(var_94, var_104, var_105)) {cerr << "check 103 fails" << endl; return_value = 1;} +vint32m8_t var_2 = __riscv_vmadd_vv_i32m8(var_3, var_3, var_14, 27); +// -1274900451, 758201384, -1724825696, -862244426, 168924390, -1494178360, 1334288584, -1428996472, -421002596, 1514138637, 231966326, -1966230772, 689662335, 1153325026, -235704888, 418459048, 1235419558, 323712018, -542665087, 97242166, -1387457506, -489085554, 2060084100, 1053282476, 794705651, -1820528264, 16305006 + +vint32m8_t var_1 = __riscv_vmul_vv_i32m8_mu(var_10, var_0, var_2, var_2, 27); +// -1219765796, -2080211897, -1425005568, 1275800932, 2039222333, -1571066816, -13757896, -1015666624, 180801296, -1942707504, -1368940921, -1427561998, 2069013122, 362147503, 909383812, 2059147515, 1772484196, -483634876, 718017706, 293684054, 207768905, -259297483, 50289680, 1702884240, -1099928980, 869454379, -1050337408 + +vint32m8_t var_6 = __riscv_vmv_s_x_i32m8_tu(var_1, var_62, 27); +// 1131231630, -2080211897, -1425005568, 1275800932, 2039222333, -1571066816, -13757896, -1015666624, 180801296, -1942707504, -1368940921, -1427561998, 2069013122, 362147503, 909383812, 2059147515, 1772484196, -483634876, 718017706, 293684054, 207768905, -259297483, 50289680, 1702884240, -1099928980, 869454379, -1050337408 + +__riscv_vsetvl_e32m8(7); +vint32m8_t var_15 = __riscv_vneg_v_i32m8_mu(var_35, var_1, var_36, 7); +// 1482257973, -2080211897, -1425005568, -772921329, 2039222333, -1571066816, -188946235, -1015666624, 180801296, -1942707504, -1368940921, -1427561998, 2069013122, 362147503, 909383812, 2059147515, 1772484196, -483634876, 718017706, 293684054, 207768905, -259297483, 50289680, 1702884240, -1099928980, 869454379, -1050337408 + +__riscv_vsetvl_e32m8(8); +vint32m8_t var_17 = __riscv_vnmsub_vv_i32m8_mu(var_29, var_1, var_30, var_31, 8); +// 813369075, 1204827914, 1528599370, 1275800932, -2129835614, -1571066816, -13757896, -2057974591, 180801296, -1942707504, -1368940921, -1427561998, 2069013122, 362147503, 909383812, 2059147515, 1772484196, -483634876, 718017706, 293684054, 207768905, -259297483, 50289680, 1702884240, -1099928980, 869454379, -1050337408 + +__riscv_vsetvl_e32m8(1); +__riscv_vse32_v_i32m8(var_64, var_6, 1); +__riscv_vsetvl_e32m8(7); +__riscv_vse32_v_i32m8(var_82, var_15, 7); +__riscv_vsetvl_e32m8(8); +__riscv_vse32_v_i32m8(var_86, var_17, 8); +if(!check(var_64, var_113, var_114)) {cerr << "check 112 fails" << endl; return_value = 1;} +if(!check(var_82, var_110, var_111)) {cerr << "check 109 fails" << endl; return_value = 1;} +if(!check(var_86, var_107, var_108)) {cerr << "check 106 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-5.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-5.C new file mode 100644 index 00000000000..2b435216430 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-5.C @@ -0,0 +1,416 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + + + +int main() +{ +int return_value = 0; + +size_t var_115 = 1u; +uint8_t var_114 [] = {10u}; +size_t var_112 = 4u; +uint32_t var_111 [] = {3132511239u}; +size_t var_109 = 74u; +int16_t var_108 [] = {2858, 492, 24911, -11303, -31616, 28533, 19034, -9653, 28885, 7610, 12944, -20025, 1686, 30217, -1395, -3672, 2306, -18824, -31159, -18821, 28140, 6059, 21475, -8012, -9400, 2811, 28276, 21990, 28916, -10924, 5167, 20908, -22863, -21651, 18443, -18027, -29506}; +size_t var_106 = 4u; +float32_t var_105 [] = {f32(3922195668u)}; +// -3.021655077935938e+25 + +uint16_t var_103 = 0u; +int8_t var_101 [] = {96, 34}; +int32_t var_100 [] = {1405457466, 1721118922}; +float32_t var_99 [] = {f32(3922195668u)}; +// -3.021655077935938e+25 + +float32_t var_98 [] = {f32(967328861u), f32(2167036240u)}; +// 0.0003209439164493233, -3.1288147269893657e-38 + +int16_t var_97 [] = {-1123, -6424}; +int16_t var_96 [] = {9778, 13362}; +int16_t var_95 [] = {25985, 12965, 24364, 1620, 11788, 17666, 9112, -16259, 30211, -22913, -25451, 24681, 21665, 14991, -1339, 848, 5275, -13754, 7902, -13065, -1428, -10034, -11668, -20846, 5887, -22465, -6031, 30732, 7605, -10446, 1100, -11314, 30319, 16023, 25829, -8192, 19538}; +int16_t var_94 [] = {17771, 2858, 492, 24911, -11303, -31616, 28533, 19034, -9653, 28885, 7610, 12944, -20025, 1686, 30217, -1395, -3672, 2306, -18824, -31159, -18821, 28140, 6059, 21475, -8012, -9400, 2811, 28276, 21990, 28916, -10924, 5167, 20908, -22863, -21651, 18443, -18027}; +int16_t var_93 [] = {-21330, -22858, 24008, 17967, -21231, -32167, 18812, 20756, -1518, 18916, -27871, 30718, 27000, 2704, 6947, 27603, 12463, -19003, 530, -30671, -24051, 21005, 29973, -3287, 1940, 31175, -32755, 22027, 19472, -5055, -8470, -18339, 17283, 15399, -19484, 15629, 28507}; +uint16_t var_92 [] = {63787u, 42257u, 24150u, 52956u, 61108u, 46587u, 65242u, 48126u, 64523u, 61995u, 30399u, 12749u, 54004u, 52568u, 33099u, 41297u, 23093u, 60951u, 25737u, 12347u, 23498u, 51555u, 60233u, 61151u, 56996u, 53763u, 17372u, 46632u, 57944u, 17207u, 20813u, 59048u, 29548u, 61811u, 50413u, 63404u, 21680u}; +int16_t var_91 [] = {-6131, 29574}; +int32_t var_90 [] = {1644247083, -1282916520}; +int32_t var_89 [] = {1227673631, 857229023}; +uint32_t var_88 [] = {3132511239u}; +uint32_t var_87 [] = {4262063875u}; +uint16_t var_86 [] = {40919u}; +uint32_t var_85 [] = {1286225402u}; +int16_t var_84 [] = {-26820, -27331}; +float64_t var_83 [] = {f64(11069717378845155319u), f64(13721794338725332728u)}; +// -2.899173043426029e-185, -5.514630093567779e-08 + +float64_t var_82 [] = {f64(2718112256676496315u), f64(915798642043068280u)}; +// 5.695500157055262e-127, 1.9281508973710386e-247 + +uint64_t var_81 [] = {2807378651874114280u, 3677046095772117620u}; +uint32_t var_80 [] = {3179970750u, 3445021534u}; +int16_t var_79 [] = {-3759, 22117}; +int64_t var_78 [] = {4276742551513081964, 1244361136627792199}; +int64_t var_77 [] = {-738627246414404434, 1483649367620429950}; +uint32_t var_76 [] = {666318773u, 3789337898u}; +uint32_t var_75 [] = {3315562468u, 1268900688u}; +uint32_t var_74 [] = {726843747u, 1886542783u}; +uint8_t var_73 [] = {35u}; +uint8_t var_72 [] = {26u}; +uint8_t var_71 [] = {71u, 246u}; +uint8_t var_70 [] = {254u, 78u}; +uint16_t var_69 [] = {26491u}; +uint8_t var_68 [] = {205u}; +uint8_t var_67 [] = {61u}; +uint8_t var_66 [] = {54u}; +size_t var_65 = 0u; +int8_t var_64 = -34; +int8_t var_63 = 105; +uint16_t var_62 = 16597u; +uint64_t var_61 = 8406458174123303558u; +uint32_t var_60 = 2871496165u; +__riscv_vsetvl_e8mf8(2); +vint8mf8_t var_20 = __riscv_vle8_v_i8mf8(var_101, 2); +// 96, 34 + +__riscv_vsetvl_e32m1(2); +vint32m1_t var_21 = __riscv_vle32_v_i32m1(var_100, 2); +// 1405457466, 1721118922 + +vfloat32m1_t var_24 = __riscv_vle32_v_f32m1(var_98, 2); +// 0.0003209439164493233, -3.1288147269893657e-38 + +vint16mf2_t var_25 = __riscv_vle16_v_i16mf2(var_97, 2); +// -1123, -6424 + +vint16mf2_t var_26 = __riscv_vle16_v_i16mf2(var_96, 2); +// 9778, 13362 + +__riscv_vsetvl_e16m8(37); +vint16m8_t var_28 = __riscv_vle16_v_i16m8(var_95, 37); +// 25985, 12965, 24364, 1620, 11788, 17666, 9112, -16259, 30211, -22913, -25451, 24681, 21665, 14991, -1339, 848, 5275, -13754, 7902, -13065, -1428, -10034, -11668, -20846, 5887, -22465, -6031, 30732, 7605, -10446, 1100, -11314, 30319, 16023, 25829, -8192, 19538 + +vint16m8_t var_29 = __riscv_vle16_v_i16m8(var_94, 37); +// 17771, 2858, 492, 24911, -11303, -31616, 28533, 19034, -9653, 28885, 7610, 12944, -20025, 1686, 30217, -1395, -3672, 2306, -18824, -31159, -18821, 28140, 6059, 21475, -8012, -9400, 2811, 28276, 21990, 28916, -10924, 5167, 20908, -22863, -21651, 18443, -18027 + +vuint16m8_t var_31 = __riscv_vle16_v_u16m8(var_92, 37); +// 63787, 42257, 24150, 52956, 61108, 46587, 65242, 48126, 64523, 61995, 30399, 12749, 54004, 52568, 33099, 41297, 23093, 60951, 25737, 12347, 23498, 51555, 60233, 61151, 56996, 53763, 17372, 46632, 57944, 17207, 20813, 59048, 29548, 61811, 50413, 63404, 21680 + +__riscv_vsetvl_e16mf4(2); +vint16mf4_t var_32 = __riscv_vle16_v_i16mf4(var_91, 2); +// -6131, 29574 + +__riscv_vsetvl_e32m1(2); +vint32m1_t var_33 = __riscv_vle32_v_i32m1(var_90, 2); +// 1644247083, -1282916520 + +vint32m1_t var_34 = __riscv_vle32_v_i32m1(var_89, 2); +// 1227673631, 857229023 + +__riscv_vsetvl_e32mf2(1); +vuint32mf2_t var_35 = __riscv_vle32_v_u32mf2(var_88, 1); +// 3132511239 + +vuint32mf2_t var_36 = __riscv_vle32_v_u32mf2(var_87, 1); +// 4262063875 + +vuint16mf4_t var_37 = __riscv_vle16_v_u16mf4(var_86, 1); +// 40919 + +__riscv_vsetvl_e16mf4(2); +vint16mf4_t var_39 = __riscv_vle16_v_i16mf4(var_84, 2); +// -26820, -27331 + +vfloat64m1_t var_41 = __riscv_vle64_v_f64m1(var_83, 2); +// -2.899173043426029e-185, -5.514630093567779e-08 + +vfloat64m1_t var_42 = __riscv_vle64_v_f64m1(var_82, 2); +// 5.695500157055262e-127, 1.9281508973710386e-247 + +vuint64m1_t var_43 = __riscv_vle64_v_u64m1(var_81, 2); +// 2807378651874114280, 3677046095772117620 + +__riscv_vsetvl_e32m4(2); +vuint32m4_t var_44 = __riscv_vle32_v_u32m4(var_80, 2); +// 3179970750, 3445021534 + +__riscv_vsetvl_e16mf4(2); +vint16mf4_t var_45 = __riscv_vle16_v_i16mf4(var_79, 2); +// -3759, 22117 + +vint64m1_t var_47 = __riscv_vle64_v_i64m1(var_78, 2); +// 4276742551513081964, 1244361136627792199 + +vint64m1_t var_48 = __riscv_vle64_v_i64m1(var_77, 2); +// -738627246414404434, 1483649367620429950 + +vuint32mf2_t var_49 = __riscv_vle32_v_u32mf2(var_76, 2); +// 666318773, 3789337898 + +vuint32mf2_t var_50 = __riscv_vle32_v_u32mf2(var_75, 2); +// 3315562468, 1268900688 + +vuint32mf2_t var_51 = __riscv_vle32_v_u32mf2(var_74, 2); +// 726843747, 1886542783 + +__riscv_vsetvl_e8mf8(1); +vuint8mf8_t var_52 = __riscv_vle8_v_u8mf8(var_73, 1); +// 35 + +__riscv_vsetvl_e8mf8(2); +vuint8mf8_t var_54 = __riscv_vle8_v_u8mf8(var_71, 2); +// 71, 246 + +vuint8mf8_t var_55 = __riscv_vle8_v_u8mf8(var_70, 2); +// 254, 78 + +__riscv_vsetvl_e16mf4(1); +vuint16mf4_t var_56 = __riscv_vle16_v_u16mf4(var_69, 1); +// 26491 + +vuint8mf8_t var_57 = __riscv_vle8_v_u8mf8(var_68, 1); +// 205 + +vuint8mf8_t var_58 = __riscv_vle8_v_u8mf8(var_67, 1); +// 61 + +vuint8mf8_t var_59 = __riscv_vle8_v_u8mf8(var_66, 1); +// 54 + +__riscv_vsetvl_e8mf8(2); +vint8mf8_t var_19 = __riscv_vsmul_vx_i8mf8(var_20, var_63, 2); +// 79, 28 + +__riscv_vsetvl_e16mf2(2); +vbool32_t var_22 = __riscv_vmsne_vv_i16mf2_b32(var_25, var_26, 2); +// 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m8(37); +vbool2_t var_27 = __riscv_vmsne_vx_u16m8_b2(var_31, var_62, 37); +// 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16mf4(2); +int16_t var_16 = __riscv_vmv_x_s_i16mf4_i16(var_32); +// -6131 + +__riscv_vsetvl_e16mf4(1); +vuint16mf4_t var_102 = __riscv_vminu_vx_u16mf4(var_37, var_103, 1); +// 0 + +__riscv_vsetvl_e64m1(2); +vbool64_t var_40 = __riscv_vmsbc_vx_u64m1_b64(var_43, var_61, 2); +// 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32m4(2); +uint32_t var_10 = __riscv_vmv_x_s_u32m4_u32(var_44); +// 3179970750 + +__riscv_vsetvl_e32mf2(2); +vbool64_t var_46 = __riscv_vmseq_vx_u32mf2_b64(var_49, var_60, 2); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vuint32mf2_t var_7 = __riscv_vor_vv_u32mf2(var_50, var_51, 2); +// 4024432615, 2079587327 + +__riscv_vsetvl_e8mf8(1); +vuint16mf4_t var_3 = __riscv_vwsubu_wv_u16mf4(var_56, var_57, 1); +// 26286 + +__riscv_vsetvl_e16mf4(2); +vint16mf4_t var_9 = __riscv_vadd_vx_i16mf4(var_45, var_16, 2); +// -9890, 15986 + +vbool64_t var_6 = __riscv_vmadc_vx_u32mf2_b64(var_7, var_10, 2); +// 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e8mf8(1); +vuint16mf4_t var_2 = __riscv_vwsubu_wv_u16mf4(var_3, var_58, 1); +// 26225 + +__riscv_vsetvl_e16mf4(2); +vbool64_t var_0 = __riscv_vmsne_vx_i16mf4_b64(var_9, var_16, 2); +// 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e8mf8(1); +vuint8mf8_t var_1 = __riscv_vnclipu_wx_u8mf8_mu(var_0, var_59, var_2, var_65, 1); +// 255 + +__riscv_vsetvl_e8mf8(2); +vbool64_t var_4 = __riscv_vmsgtu_vv_u8mf8_b64_mu(var_0, var_6, var_54, var_55, 2); +// 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e8mf8(1); +vuint8mf8_t var_5 = __riscv_vremu_vv_u8mf8(var_1, var_52, 1); +// 10 + +__riscv_vsetvl_e64m1(2); +vbool64_t var_8 = __riscv_vmseq_vv_i64m1_b64_mu(var_4, var_46, var_47, var_48, 2); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32mf2(1); +vuint32mf2_t var_13 = __riscv_vrgatherei16_vv_u32mf2_mu(var_4, var_35, var_36, var_102, 1); +// 3132511239 + +__riscv_vse8_v_u8mf8(var_72, var_5, 1); +__riscv_vsetvl_e64m1(2); +vbool64_t var_11 = __riscv_vmfge_vv_f64m1_b64_mu(var_8, var_40, var_41, var_42, 2); +// 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e32mf2(1); +__riscv_vse32_v_u32mf2(var_85, var_13, 1); +if(!check(var_72, var_114, var_115)) {cerr << "check 113 fails" << endl; return_value = 1;} +__riscv_vsetvl_e8mf8(2); +vint16mf4_t var_12 = __riscv_vwmacc_vx_i16mf4_mu(var_11, var_39, var_64, var_19, 2); +// -29506, -28283 + +if(!check(var_85, var_111, var_112)) {cerr << "check 110 fails" << endl; return_value = 1;} +vint32m1_t var_14 = __riscv_vwredsum_vs_i16mf4_i32m1_tu(var_33, var_12, var_34, 2); +// 1227615842 + +int16_t var_15 = __riscv_vmv_x_s_i16mf4_i16(var_12); +// -29506 + +__riscv_vsetvl_e32m1(1); +vbool32_t var_18 = __riscv_vmadc_vvm_i32m1_b32(var_14, var_21, var_22, 1); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m8(37); +vint16m8_t var_17 = __riscv_vslide1down_vx_i16m8_mu(var_27, var_28, var_29, var_15, 37); +// 2858, 492, 24911, -11303, -31616, 28533, 19034, -9653, 28885, 7610, 12944, -20025, 1686, 30217, -1395, -3672, 2306, -18824, -31159, -18821, 28140, 6059, 21475, -8012, -9400, 2811, 28276, 21990, 28916, -10924, 5167, 20908, -22863, -21651, 18443, -18027, -29506 + +__riscv_vsetvl_e32m1(1); +__riscv_vse32_v_f32m1_m(var_18, var_99, var_24, 1); +__riscv_vsetvl_e16m8(37); +__riscv_vse16_v_i16m8(var_93, var_17, 37); +if(!check(var_99, var_105, var_106)) {cerr << "check 104 fails" << endl; return_value = 1;} +if(!check(var_93, var_108, var_109)) {cerr << "check 107 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-6.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-6.C new file mode 100644 index 00000000000..9c91cc54e4c --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-6.C @@ -0,0 +1,321 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + + + +int main() +{ +int return_value = 0; + +size_t var_90 = 11u; +int8_t var_89 [] = {-10, -30, 64, 34, 48, 121, 26, 30, 39, 91, 112}; +size_t var_87 = 62u; +int8_t var_86 [] = {-4, -13, 31, 8, -128, 11, -20, -97, 104, 29, 70, -71, 61, -79, -7, 34, -60, 55, -112, -30, 79, -106, -122, 55, -126, 50, -47, 33, 119, 5, 13, 32, 97, 106, -26, 89, -125, -6, 39, -39, 91, -39, 58, -97, 46, 107, 27, -16, -61, -44, -63, 45, 1, 121, 85, 50, 85, 105, 8, -92, 45, 124}; +size_t var_84 = 38u; +int8_t var_83 [] = {-82, 72, 66, -17, -23, -48, 5, 3, 26, -35, 13, 89, -79, -73, 48, 84, -75, 15, -101, 107, -56, -113, -128, 79, -112, 41, 22, 17, 87, 98, 127, 95, 37, -6, 24, 127, 106, 87}; +size_t var_81 = 113u; +int8_t var_80 [] = {68, 9, 20, 85, -11, -94, 50, -10, -103, 45, 64, -85, -55, 9, -45, 17, -83, -65, -56, -41, 105, 109, 84, -62, -103, -9, -78, -90, -52, 26, -82, -38, -59, 75, -12, -93, 99, -56, -20, 100, -93, 100, -6, -121, 25, 125, 50, -14, 105, -94, -96, -100, -116, -10, 25, 16, -64, -124, -122, 121, -36, -12, 116, 42, -47, 29, 32, 53, -122, 58, 29, 64, -58, -47, -62, -79, -103, 113, -12, -38, -13, 68, 30, -85, 21, 101, 35, 2, -17, -77, 84, -77, 12, 18, -55, -114, -77, 83, -19, -33, 9, -27, 57, -25, 114, 72, 12, 23, -42, 2, -118, 12, 34}; +size_t var_78 = 45u; +int8_t var_77 [] = {-32, -29, -23, -14, -26, -71, -25, -26, -108, -19, 95, -33, -25, -34, 6, 76, -9, 116, 113, -32, -42, 81, -28, -31, -112, -29, 80, -6, -94, -30, 120, 117, 97, -97, -2, -57, -23, -34, -79, 2, -103, 123, -28, -28, 116}; +size_t var_75 = 37u; +int8_t var_74 [] = {-19, -121, -119, -20, -22, -105, 30, 80, -121, 18, 114, -80, -62, -69, 51, -16, 98, -59, -72, 77, -50, -68, -72, 20, -15, 28, 54, -12, 17, 107, -72, 61, -108, -117, -19, 109, -120}; +size_t var_72 = 8u; +int8_t var_71 [] = {77, 63, -96, 96, 58, 91, 105, -52}; +size_t var_69 = 34u; +int8_t var_68 [] = {-44, -29, -23, -29, -26, -45, -25, -26, -28, -19, -28, -33, -25, -33, -17, -37, -9, -16, -20, -32, -42, -19, -28, -31, -31, -29, -51, -6, -26, -30, -31, -32, -17, -29}; +int8_t var_66 [] = {-44, 5, -86, 121, 12, -68, -40, -34, 49, -59, 1, -107, 97, 99, 88, 78, -56, 100, -19, 94, -128, -84, 95, 61, -94, 8, 95, -12, -84, 97, -124, 53, 96, 117}; +int8_t var_65 [] = {77, 34, 103, -67, 126, 99, 35, 48}; +int8_t var_64 [] = {-19, -121, -119, -20, -22, -105, 30, 80, -121, 18, 114, -80, -62, -69, 51, -16, 98, -59, -72, 77, -50, -68, -72, 20, -15, 28, 54, -12, 17, 107, -72, 61, -108, -117, -19, 109, -120}; +int8_t var_63 [] = {10, -34, 0, -14, 49, -71, -58, -81, -108, -14, 95, -99, 45, -34, 6, 76, -43, 116, 113, 77, -20, 81, -70, -11, -112, -123, 80, -110, -94, 86, 120, 117, 97, -97, -2, -57, -5, -27, -79, 2, -103, 123, -94, -63, 116}; +int8_t var_62 [] = {-113, -23, -71, 85, -106, -94, -74, 32, -103, 21, 64, -101, 27, 9, -45, 17, -10, -65, -56, 48, 41, 109, -99, -61, -103, -102, -78, -53, -52, 41, -82, -38, -59, 75, -12, -93, 3, -14, -20, 100, -93, 100, 81, -126, 25, 125, -7, 26, 105, -94, -109, -29, 58, 51, 25, 9, -64, -124, -122, 79, -36, -12, -105, 42, -47, -117, 32, 28, -122, 58, 29, 40, -58, -41, -62, -79, -103, 37, -12, -38, -13, 68, 30, -12, 21, 101, 43, 2, -17, -105, 84, -77, 12, 18, -66, -114, -77, 83, 101, -33, -82, -27, 57, 84, 114, -26, -59, 58, -42, 2, -84, 12, 34}; +int8_t var_61 [] = {-54, 43, -117, -17, -52, -48, 121, -48, 26, 81, 13, -51, 62, -73, 48, 84, -83, 15, -101, 52, -62, -113, 65, -9, -112, 50, 22, -30, 87, -12, 127, 95, 37, -6, 24, 127, 66, 115}; +int8_t var_60 [] = {-32, -77, -78, 8, 46, 11, 29, -42, 104, 16, 70, -126, -128, -79, -7, 34, 78, 55, -112, 71, 11, -106, 101, 119, -126, -45, -47, -64, 119, 124, 13, 32, 97, 106, -26, 89, 127, -87, 39, -39, 91, -39, -5, -9, 46, 107, -22, -4, -61, -44, 63, 54, 71, -125, 85, -108, 85, 105, 8, -42, 45, 124}; +int8_t var_59 [] = {106, 127, 42, -59, -84, 112, 107, -107, 5, 84, 18}; +uint8_t var_58 [] = {41u, 46u, 209u, 127u, 2u, 89u, 89u, 118u, 23u, 89u, 191u, 1u, 39u, 217u, 93u, 44u, 209u, 226u, 133u, 115u, 49u, 209u, 105u, 36u, 227u, 83u, 14u, 47u, 124u, 27u, 181u, 154u, 23u, 218u, 238u, 141u, 72u, 191u, 208u, 1u, 198u, 60u, 75u, 85u, 117u, 172u, 208u, 51u, 125u, 204u, 244u, 26u, 161u, 102u, 151u, 215u, 222u, 121u, 33u, 31u, 127u, 89u, 36u, 18u, 59u, 96u, 123u, 51u, 63u, 179u, 200u, 238u, 90u, 95u, 159u, 237u, 110u, 247u, 201u, 129u, 94u, 13u, 245u, 122u, 46u, 25u, 128u, 102u, 15u, 54u, 139u, 206u, 173u, 158u, 75u, 16u, 29u, 219u, 238u, 120u, 163u, 239u, 250u, 212u, 160u, 9u, 52u, 36u, 165u, 118u, 50u, 202u, 30u}; +int8_t var_57 [] = {-22, -22, -113, 5, -12, -43, 39, -45}; +int8_t var_56 [] = {-45, 81, 83, 47, 97, -15, 40, 72}; +int8_t var_55 [] = {105, 6, 16, -46, 37, 91, 61, 41}; +uint64_t var_54 [] = {1216632416317310618u, 13918972806200148495u, 9480163460113362192u, 3100536681756667587u, 9224371562617342204u, 1410358863554626201u, 12812188570884775094u, 7800321671861261197u}; +uint64_t var_53 [] = {8866603672203376802u, 14619974357936077740u, 11734407410030572282u, 5213502474894882192u, 3669049798112016461u, 4244506456339766837u, 16560998825617301671u, 15380043380001599186u}; +int8_t var_52 [] = {-10, -30, 64, 34, 48, 121, 26, 30, 39, 91, 112}; +uint8_t var_51 [] = {134u, 207u, 176u, 214u, 99u, 29u, 124u, 85u, 53u, 163u, 51u, 179u, 201u, 118u, 41u, 24u, 246u, 136u, 17u, 79u, 255u, 223u, 57u, 237u, 226u, 168u, 123u, 95u, 158u, 221u, 70u, 108u, 205u, 127u, 51u, 133u, 120u, 224u, 28u, 58u, 62u, 53u, 222u, 217u, 66u, 33u, 220u, 147u, 42u, 63u, 198u, 186u, 147u, 133u, 10u, 235u, 157u, 86u, 58u, 76u, 127u, 167u, 213u, 12u, 72u, 124u, 39u, 129u, 139u, 148u, 9u, 66u, 53u, 84u, 35u, 20u, 148u, 248u, 109u, 113u, 89u, 24u, 15u, 248u, 1u, 223u, 196u, 143u, 192u, 152u, 136u, 39u, 187u, 27u, 120u, 162u, 27u, 183u, 207u, 80u, 178u, 2u, 97u, 194u, 89u, 176u, 144u, 242u, 118u, 111u, 116u, 146u, 79u}; +uint8_t var_50 [] = {45u, 97u, 36u, 243u, 43u, 253u, 96u, 6u, 88u, 150u, 119u, 57u, 134u, 200u, 174u, 176u, 156u, 240u, 144u, 45u, 19u, 230u, 14u, 225u, 255u, 119u, 140u, 33u, 197u, 107u, 163u, 179u, 251u, 140u, 242u, 213u, 36u, 70u, 217u, 103u, 111u, 225u, 75u, 35u, 211u, 159u, 47u, 88u, 188u, 111u, 44u, 91u, 99u, 111u, 116u, 199u, 196u, 255u, 201u, 15u, 186u, 204u, 77u, 142u, 227u, 66u, 156u, 72u, 219u, 223u, 202u, 59u, 109u, 36u, 242u, 99u, 184u, 139u, 247u, 127u, 240u, 236u, 36u, 98u, 74u, 232u, 56u, 176u, 219u, 85u, 253u, 57u, 248u, 73u, 115u, 184u, 62u, 252u, 135u, 205u, 36u, 238u, 103u, 35u, 229u, 170u, 12u, 1u, 129u, 145u, 99u, 153u, 131u}; +int8_t var_49 [] = {-22, -52, -52, 96, -33, 88, -35, -115, 98, -108, -56, 109, 64, -117, -88, -2, -23, 108, -111, -120, 72, 32, 2, 55, -103, -72, 92, 121, 51, 51, -94, -72, -97, -41, -98, 19, -128, 91, -76, 31, -31, 119, -80, -60, -107, 96, 59, -119, 32, -25, -80, -55, 116, -102, -120, 54, 25, -38, -20, 108, 0, 14, 3, 17, -16, -109, -39, -57, -34, -116, 127, -17, 63, -17, -54, -59, 40, 121, -22, 71, 18, -125, -115, -89, -31, -121, -116, -29, 37, 50, -89, -84, -26, 127, -18, -16, 32, 114, 5, -117, -83, -73, -83, -27, -119, -68, 123, -95, 89, -119, 38, 15, 19}; +int8_t var_48 [] = {-75, -8, 2, 9, 84, 7, -73, -74, -76, 116, 102, 38, 92, -72, 44, -56, 116, -104, 114, -47, 89, -79, -117, -76, -6, 8, 94, -27, -55, 102, -64, 48, 92, -105, -43, 73, 7, -1, -65, 54, 108, 88, 54, 73, 93, 7, -12, 41, 26, -44, 29, 41, 28, 61, -42, -68, -62, 53, -27, 43, -112, 122, -80, -36, -32, 106, 44, -1, 31, -125, 78, -7, -41, -74, -85, -42, 123, -18, 56, -56, 73, 36, -112, -3, 26, -119, -3, -30, -82, -52, -95, -85, -13, 49, -57, -88, -66, -26, 10, -124, -86, 87, -6, -60, 53, -59, 20, 127, 30, -100, -46, 36, -86}; +int8_t var_47 [] = {-4, -13, 31, -32, -128, -68, -20, -97, -96, 29, 91, -71, 61, -90, -83, 69, -60, -95, 88, -30, 79, -79, -122, 55, 112, 50, 11, 33, -100, 5, -60, -40, -109, 126, -56, -73, -125, -6, 56, -43, 78, -64, 58, -97, -66, 51, 27, -16, -16, 91, -63, 45, 1, 121, -78, 50, -22, 68, 5, -92, 56, -74}; +int8_t var_46 [] = {-82, 72, 66, -104, -23, -55, 5, 3, 63, -35, -38, 89, -79, -14, -51, -101, -75, -104, -23, 107, -56, 101, -128, 79, 123, 41, 59, 17, 7, 98, 81, 15, 33, 16, -30, 72, 106, 87}; +int8_t var_45 [] = {56, -64, 44, 61, 4, -87, 4, -59, -123, -18, 103, 25, -118, -21, 57, 92, -57, -53, -3, 15, 127, 93, 71, 116, 124, 37, -73, 82, -113, 97, 63, 85, 67, -83, -31, -62, -15, 46, -10, 76, 14, -73, 37, 88, -53}; +int8_t var_44 [] = {118, 56, -80, -74, 123, -105, 65, 36, -40, -48, -22, 104, -78, 100, 96, 47, -93, -94, -42, -37, 106, -63, -56, 116, -12, -73, 121, -11, -64, -76, 28, -108, 71, -37, 84, -78, -54, 26, 3, 35, 32, 38, -31, 52, -100, -82, -25, -73, 89, 98, 116, 92, -44, 35, 36, 65, 65, 102, -72, 118, 27, -46, 58, -114, -15, -18, 18, -68, -63, -82, 20, -114, -49, -81, 106, 29, -118, -66, -19, -15, 104, 102, 27, 99, -54, 50, 10, -37, 60, 54, 28, -91, 12, 39, 27, -35, 1, -46, 112, -37, -127, 62, -102, 27, -71, -23, 87, 68, -19, -48, -12, 32, -6}; +int8_t var_43 [] = {32, 57, -12, 44, 99, -31, -100, -34, -80, 77, 23, -69, 125, -46, -40, 54, -85, 53, 23, 5, 77, 7, 36, -54, -51, 61, -55, -104, -12, -94, -90, -41, -95, -101, 49, 89, 7, -116, -117, -41, -93, -30, -92, 15, -74, 81, 88, 56, 72, -20, -88, -76, 84, -12, -88, 122, 93, 97, 8, 85, 127, -64, 120, 29, -17, -87, 115, 13, -37, 91, 47, 12, 15, -57, 65, 34, -30, 29, 111, 107, -90, -8, 58, 41, 118, 17, 71, -12, -24, 15, -82, -23, 54, 98, 119, 106, -20, -19, 77, -120, -13, -52, -13, -107, -45, 66, -110, 63, 116, -18, -110, -46, 36}; +int8_t var_42 [] = {-32, -62, 117, 7, -76, 85, 30, -77, -3, 102, 6, 28, -32, -25, 58, -98, -115, -67, -94, 46, -69, -77, 1, 25, 116, 55, -97, -126, -12, -46, -50, 19, 79, 20, -126, 29, 25, 51, -112, -128, 57, 28, 33, 2, -102}; +int8_t var_41 [] = {58, 54, -116, -86, 69, -60, 55, -42}; +uint8_t var_40 = 253u; +__riscv_vsetvl_e8m8(113); +vuint8m8_t var_20 = __riscv_vle8_v_u8m8(var_58, 113); +// 41, 46, 209, 127, 2, 89, 89, 118, 23, 89, 191, 1, 39, 217, 93, 44, 209, 226, 133, 115, 49, 209, 105, 36, 227, 83, 14, 47, 124, 27, 181, 154, 23, 218, 238, 141, 72, 191, 208, 1, 198, 60, 75, 85, 117, 172, 208, 51, 125, 204, 244, 26, 161, 102, 151, 215, 222, 121, 33, 31, 127, 89, 36, 18, 59, 96, 123, 51, 63, 179, 200, 238, 90, 95, 159, 237, 110, 247, 201, 129, 94, 13, 245, 122, 46, 25, 128, 102, 15, 54, 139, 206, 173, 158, 75, 16, 29, 219, 238, 120, 163, 239, 250, 212, 160, 9, 52, 36, 165, 118, 50, 202, 30 + +__riscv_vsetvl_e8mf2(8); +vint8mf2_t var_22 = __riscv_vle8_v_i8mf2(var_57, 8); +// -22, -22, -113, 5, -12, -43, 39, -45 + +vint8mf2_t var_23 = __riscv_vle8_v_i8mf2(var_56, 8); +// -45, 81, 83, 47, 97, -15, 40, 72 + +vint8mf2_t var_24 = __riscv_vle8_v_i8mf2(var_55, 8); +// 105, 6, 16, -46, 37, 91, 61, 41 + +vuint64m4_t var_25 = __riscv_vle64_v_u64m4(var_54, 8); +// 1216632416317310618, 13918972806200148495, 9480163460113362192, 3100536681756667587, 9224371562617342204, 1410358863554626201, 12812188570884775094, 7800321671861261197 + +vuint64m4_t var_26 = __riscv_vle64_v_u64m4(var_53, 8); +// 8866603672203376802, 14619974357936077740, 11734407410030572282, 5213502474894882192, 3669049798112016461, 4244506456339766837, 16560998825617301671, 15380043380001599186 + +__riscv_vsetvl_e8m8(11); +vint8m8_t var_27 = __riscv_vle8_v_i8m8(var_52, 11); +// -10, -30, 64, 34, 48, 121, 26, 30, 39, 91, 112 + +__riscv_vsetvl_e8m8(113); +vuint8m8_t var_29 = __riscv_vle8_v_u8m8(var_51, 113); +// 134, 207, 176, 214, 99, 29, 124, 85, 53, 163, 51, 179, 201, 118, 41, 24, 246, 136, 17, 79, 255, 223, 57, 237, 226, 168, 123, 95, 158, 221, 70, 108, 205, 127, 51, 133, 120, 224, 28, 58, 62, 53, 222, 217, 66, 33, 220, 147, 42, 63, 198, 186, 147, 133, 10, 235, 157, 86, 58, 76, 127, 167, 213, 12, 72, 124, 39, 129, 139, 148, 9, 66, 53, 84, 35, 20, 148, 248, 109, 113, 89, 24, 15, 248, 1, 223, 196, 143, 192, 152, 136, 39, 187, 27, 120, 162, 27, 183, 207, 80, 178, 2, 97, 194, 89, 176, 144, 242, 118, 111, 116, 146, 79 + +vuint8m8_t var_30 = __riscv_vle8_v_u8m8(var_50, 113); +// 45, 97, 36, 243, 43, 253, 96, 6, 88, 150, 119, 57, 134, 200, 174, 176, 156, 240, 144, 45, 19, 230, 14, 225, 255, 119, 140, 33, 197, 107, 163, 179, 251, 140, 242, 213, 36, 70, 217, 103, 111, 225, 75, 35, 211, 159, 47, 88, 188, 111, 44, 91, 99, 111, 116, 199, 196, 255, 201, 15, 186, 204, 77, 142, 227, 66, 156, 72, 219, 223, 202, 59, 109, 36, 242, 99, 184, 139, 247, 127, 240, 236, 36, 98, 74, 232, 56, 176, 219, 85, 253, 57, 248, 73, 115, 184, 62, 252, 135, 205, 36, 238, 103, 35, 229, 170, 12, 1, 129, 145, 99, 153, 131 + +vint8m8_t var_31 = __riscv_vle8_v_i8m8(var_49, 113); +// -22, -52, -52, 96, -33, 88, -35, -115, 98, -108, -56, 109, 64, -117, -88, -2, -23, 108, -111, -120, 72, 32, 2, 55, -103, -72, 92, 121, 51, 51, -94, -72, -97, -41, -98, 19, -128, 91, -76, 31, -31, 119, -80, -60, -107, 96, 59, -119, 32, -25, -80, -55, 116, -102, -120, 54, 25, -38, -20, 108, 0, 14, 3, 17, -16, -109, -39, -57, -34, -116, 127, -17, 63, -17, -54, -59, 40, 121, -22, 71, 18, -125, -115, -89, -31, -121, -116, -29, 37, 50, -89, -84, -26, 127, -18, -16, 32, 114, 5, -117, -83, -73, -83, -27, -119, -68, 123, -95, 89, -119, 38, 15, 19 + +vint8m8_t var_32 = __riscv_vle8_v_i8m8(var_48, 113); +// -75, -8, 2, 9, 84, 7, -73, -74, -76, 116, 102, 38, 92, -72, 44, -56, 116, -104, 114, -47, 89, -79, -117, -76, -6, 8, 94, -27, -55, 102, -64, 48, 92, -105, -43, 73, 7, -1, -65, 54, 108, 88, 54, 73, 93, 7, -12, 41, 26, -44, 29, 41, 28, 61, -42, -68, -62, 53, -27, 43, -112, 122, -80, -36, -32, 106, 44, -1, 31, -125, 78, -7, -41, -74, -85, -42, 123, -18, 56, -56, 73, 36, -112, -3, 26, -119, -3, -30, -82, -52, -95, -85, -13, 49, -57, -88, -66, -26, 10, -124, -86, 87, -6, -60, 53, -59, 20, 127, 30, -100, -46, 36, -86 + +__riscv_vsetvl_e8m8(62); +vint8m8_t var_33 = __riscv_vle8_v_i8m8(var_47, 62); +// -4, -13, 31, -32, -128, -68, -20, -97, -96, 29, 91, -71, 61, -90, -83, 69, -60, -95, 88, -30, 79, -79, -122, 55, 112, 50, 11, 33, -100, 5, -60, -40, -109, 126, -56, -73, -125, -6, 56, -43, 78, -64, 58, -97, -66, 51, 27, -16, -16, 91, -63, 45, 1, 121, -78, 50, -22, 68, 5, -92, 56, -74 + +__riscv_vsetvl_e8m8(38); +vint8m8_t var_34 = __riscv_vle8_v_i8m8(var_46, 38); +// -82, 72, 66, -104, -23, -55, 5, 3, 63, -35, -38, 89, -79, -14, -51, -101, -75, -104, -23, 107, -56, 101, -128, 79, 123, 41, 59, 17, 7, 98, 81, 15, 33, 16, -30, 72, 106, 87 + +__riscv_vsetvl_e8m4(45); +vint8m4_t var_35 = __riscv_vle8_v_i8m4(var_45, 45); +// 56, -64, 44, 61, 4, -87, 4, -59, -123, -18, 103, 25, -118, -21, 57, 92, -57, -53, -3, 15, 127, 93, 71, 116, 124, 37, -73, 82, -113, 97, 63, 85, 67, -83, -31, -62, -15, 46, -10, 76, 14, -73, 37, 88, -53 + +__riscv_vsetvl_e8m8(113); +vint8m8_t var_36 = __riscv_vle8_v_i8m8(var_44, 113); +// 118, 56, -80, -74, 123, -105, 65, 36, -40, -48, -22, 104, -78, 100, 96, 47, -93, -94, -42, -37, 106, -63, -56, 116, -12, -73, 121, -11, -64, -76, 28, -108, 71, -37, 84, -78, -54, 26, 3, 35, 32, 38, -31, 52, -100, -82, -25, -73, 89, 98, 116, 92, -44, 35, 36, 65, 65, 102, -72, 118, 27, -46, 58, -114, -15, -18, 18, -68, -63, -82, 20, -114, -49, -81, 106, 29, -118, -66, -19, -15, 104, 102, 27, 99, -54, 50, 10, -37, 60, 54, 28, -91, 12, 39, 27, -35, 1, -46, 112, -37, -127, 62, -102, 27, -71, -23, 87, 68, -19, -48, -12, 32, -6 + +vint8m8_t var_37 = __riscv_vle8_v_i8m8(var_43, 113); +// 32, 57, -12, 44, 99, -31, -100, -34, -80, 77, 23, -69, 125, -46, -40, 54, -85, 53, 23, 5, 77, 7, 36, -54, -51, 61, -55, -104, -12, -94, -90, -41, -95, -101, 49, 89, 7, -116, -117, -41, -93, -30, -92, 15, -74, 81, 88, 56, 72, -20, -88, -76, 84, -12, -88, 122, 93, 97, 8, 85, 127, -64, 120, 29, -17, -87, 115, 13, -37, 91, 47, 12, 15, -57, 65, 34, -30, 29, 111, 107, -90, -8, 58, 41, 118, 17, 71, -12, -24, 15, -82, -23, 54, 98, 119, 106, -20, -19, 77, -120, -13, -52, -13, -107, -45, 66, -110, 63, 116, -18, -110, -46, 36 + +__riscv_vsetvl_e8m8(45); +vint8m8_t var_38 = __riscv_vle8_v_i8m8(var_42, 45); +// -32, -62, 117, 7, -76, 85, 30, -77, -3, 102, 6, 28, -32, -25, 58, -98, -115, -67, -94, 46, -69, -77, 1, 25, 116, 55, -97, -126, -12, -46, -50, 19, 79, 20, -126, 29, 25, 51, -112, -128, 57, 28, 33, 2, -102 + +__riscv_vsetvl_e8m8(8); +vint8m8_t var_39 = __riscv_vle8_v_i8m8(var_41, 8); +// 58, 54, -116, -86, 69, -60, 55, -42 + +__riscv_vsetvl_e8m8(113); +vbool1_t var_19 = __riscv_vmsleu_vx_u8m8_b1(var_20, var_40, 113); +// 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + +__riscv_vsetvl_e64m4(8); +vbool16_t var_21 = __riscv_vmadc_vv_u64m4_b16(var_25, var_26, 8); +// 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e8m8(113); +vbool1_t var_28 = __riscv_vmsle_vv_i8m8_b1(var_31, var_32, 113); +// 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 + +__riscv_vsetvl_e8m4(45); +int8_t var_12 = __riscv_vmv_x_s_i8m4_i8(var_35); +// 56 + +__riscv_vsetvl_e8m8(11); +__riscv_vse8_v_i8m8_m(var_19, var_59, var_27, 11); +__riscv_vsetvl_e8mf2(8); +vint8mf2_t var_18 = __riscv_vmul_vv_i8mf2_mu(var_21, var_22, var_23, var_24, 8); +// -22, -26, 48, 5, -12, -43, -120, -120 + +__riscv_vsetvl_e8m8(113); +vbool1_t var_15 = __riscv_vmsgeu_vv_u8m8_b1_mu(var_19, var_28, var_29, var_30, 113); +// 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0 + +if(!check(var_59, var_89, var_90)) {cerr << "check 88 fails" << endl; return_value = 1;} +__riscv_vsetvl_e8mf2(8); +int8_t var_17 = __riscv_vmv_x_s_i8mf2_i8(var_18); +// -22 + +__riscv_vsetvl_e8m8(38); +__riscv_vse8_v_i8m8_m(var_15, var_61, var_34, 38); +__riscv_vsetvl_e8m8(62); +__riscv_vse8_v_i8m8_m(var_15, var_60, var_33, 62); +__riscv_vsetvl_e8m8(34); +vbool1_t var_7 = __riscv_vmsof_m_b1_mu(var_15, var_15, var_15, 34); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0 + +__riscv_vsetvl_e8m8(113); +vint8m8_t var_11 = __riscv_vnmsub_vx_i8m8_mu(var_15, var_36, var_17, var_37, 113); +// 68, 9, 20, -74, -11, -105, 50, -10, -40, 45, -22, -85, -55, 100, 96, 47, -83, -94, -42, -41, 105, -63, 84, -62, -12, -9, 121, -90, -64, 26, 28, -108, 71, -37, 84, -78, 99, -56, 3, 35, 32, 38, -6, -121, -100, -82, 50, -14, 89, 98, -96, -100, -116, -10, 36, 16, 65, 102, -72, 121, 27, -46, 116, -114, -15, 29, 18, 53, -63, -82, 20, 64, -49, -47, 106, 29, -118, 113, -19, -15, 104, 102, 27, -85, -54, 50, 35, -37, 60, -77, 28, -91, 12, 39, -55, -35, 1, -46, -19, -37, 9, 62, -102, -25, -71, 72, 12, 23, -19, -48, -118, 32, -6 + +if(!check(var_61, var_83, var_84)) {cerr << "check 82 fails" << endl; return_value = 1;} +if(!check(var_60, var_86, var_87)) {cerr << "check 85 fails" << endl; return_value = 1;} +__riscv_vse8_v_i8m8_m(var_15, var_62, var_11, 113); +__riscv_vsetvl_e8m8(45); +vint8m8_t var_10 = __riscv_vmulh_vv_i8m8(var_11, var_38, 45); +// -9, -3, 9, -3, 3, -35, 5, 3, 0, 17, -1, -10, 6, -10, 21, -18, 37, 24, 15, -8, -29, 18, 0, -7, -6, -2, -46, 44, 3, -5, -6, -9, 21, -3, -42, -9, 9, -12, -2, -18, 7, 4, -1, -1, 39 + +if(!check(var_62, var_80, var_81)) {cerr << "check 79 fails" << endl; return_value = 1;} +vint8m8_t var_8 = __riscv_vasub_vx_i8m8(var_10, var_12, 45); +// -32, -29, -23, -29, -26, -45, -25, -26, -28, -19, -28, -33, -25, -33, -17, -37, -9, -16, -20, -32, -42, -19, -28, -31, -31, -29, -51, -6, -26, -30, -31, -32, -17, -29, -49, -32, -23, -34, -29, -37, -24, -26, -28, -28, -8 + +__riscv_vse8_v_i8m8_m(var_15, var_63, var_8, 45); +__riscv_vsetvl_e8m8(37); +vbool1_t var_5 = __riscv_vmseq_vv_i8m8_b1_mu(var_15, var_15, var_8, var_10, 37); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0 + +if(!check(var_63, var_77, var_78)) {cerr << "check 76 fails" << endl; return_value = 1;} +__riscv_vse8_v_i8m8_m(var_5, var_64, var_10, 37); +__riscv_vsetvl_e8m8(34); +vbool1_t var_3 = __riscv_vmorn_mm_b1(var_5, var_7, 34); +// 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + +if(!check(var_64, var_74, var_75)) {cerr << "check 73 fails" << endl; return_value = 1;} +__riscv_vse8_v_i8m8_m(var_3, var_66, var_8, 34); +__riscv_vsetvl_e8m8(8); +vint8m8_t var_2 = __riscv_vadd_vv_i8m8_mu(var_3, var_8, var_11, var_39, 8); +// -32, 63, -96, 96, 58, 91, 105, -52, -28, -19, -28, -33, -25, -33, -17, -37, -9, -16, -20, -32, -42, -19, -28, -31, -31, -29, -51, -6, -26, -30, -31, -32, -17, -29, -49, -32, -23, -34, -29, -37, -24, -26, -28, -28, -8 + +if(!check(var_66, var_68, var_69)) {cerr << "check 67 fails" << endl; return_value = 1;} +__riscv_vse8_v_i8m8_m(var_3, var_65, var_2, 8); +if(!check(var_65, var_71, var_72)) {cerr << "check 70 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-7.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-7.C new file mode 100644 index 00000000000..d6479fed214 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-7.C @@ -0,0 +1,278 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" + +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + +int main() +{ +int return_value = 0; + +size_t var_92 = 40u; +uint8_t var_91 [] = {11u, 89u, 54u, 232u, 165u, 85u, 209u, 49u, 34u, 129u, 156u, 155u, 32u, 161u, 238u, 63u, 5u, 117u, 182u, 0u, 211u, 168u, 96u, 29u, 14u, 126u, 10u, 182u, 32u, 49u, 205u, 40u, 242u, 167u, 114u, 76u, 146u, 122u, 141u, 124u}; +size_t var_89 = 104u; +uint8_t var_88 [] = {62u, 152u, 160u, 146u, 231u, 221u, 197u, 169u, 123u, 6u, 58u, 112u, 253u, 208u, 191u, 20u, 252u, 94u, 153u, 134u, 34u, 255u, 70u, 192u, 92u, 194u, 227u, 42u, 117u, 86u, 177u, 130u, 23u, 123u, 59u, 3u, 8u, 96u, 34u, 117u, 209u, 89u, 177u, 105u, 171u, 73u, 84u, 177u, 66u, 8u, 171u, 91u, 59u, 32u, 206u, 23u, 12u, 94u, 48u, 208u, 252u, 160u, 140u, 169u, 245u, 186u, 118u, 128u, 19u, 12u, 35u, 20u, 243u, 67u, 0u, 121u, 205u, 1u, 53u, 39u, 22u, 21u, 220u, 108u, 83u, 21u, 142u, 61u, 231u, 27u, 106u, 100u, 46u, 237u, 80u, 25u, 238u, 182u, 142u, 11u, 139u, 102u, 221u, 145u}; +size_t var_86 = 9u; +uint8_t var_85 [] = {41u, 156u, 138u, 248u, 254u, 36u, 60u, 13u, 62u}; +size_t var_83 = 66u; +uint8_t var_82 [] = {157u, 65u, 122u, 81u, 72u, 231u, 126u, 145u, 164u, 9u, 174u, 111u, 94u, 210u, 246u, 229u, 223u, 225u, 88u, 154u, 115u, 219u, 171u, 61u, 142u, 174u, 253u, 88u, 155u, 102u, 56u, 242u, 55u, 123u, 104u, 208u, 245u, 160u, 143u, 62u, 227u, 215u, 67u, 198u, 195u, 103u, 203u, 252u, 90u, 186u, 194u, 240u, 182u, 80u, 38u, 139u, 70u, 110u, 220u, 56u, 138u, 128u, 201u, 119u, 253u, 189u}; +size_t var_80 = 111u; +uint8_t var_79 [] = {157u, 65u, 122u, 81u, 72u, 231u, 126u, 145u, 164u, 9u, 174u, 111u, 94u, 210u, 246u, 229u, 223u, 225u, 88u, 154u, 115u, 219u, 171u, 61u, 142u, 174u, 253u, 88u, 155u, 102u, 56u, 242u, 55u, 123u, 104u, 208u, 245u, 160u, 143u, 62u, 227u, 215u, 67u, 198u, 195u, 103u, 203u, 252u, 90u, 186u, 194u, 240u, 182u, 80u, 38u, 139u, 70u, 110u, 220u, 56u, 138u, 128u, 201u, 119u, 253u, 189u, 149u, 254u, 229u, 77u, 79u, 142u, 64u, 49u, 235u, 129u, 207u, 223u, 156u, 3u, 23u, 90u, 144u, 151u, 179u, 40u, 62u, 22u, 245u, 208u, 56u, 147u, 38u, 65u, 72u, 211u, 148u, 144u, 226u, 8u, 228u, 238u, 79u, 121u, 164u, 199u, 29u, 221u, 228u, 205u, 42u}; +size_t var_77 = 22u; +uint8_t var_76 [] = {157u, 65u, 122u, 81u, 72u, 231u, 126u, 145u, 164u, 9u, 174u, 111u, 94u, 210u, 246u, 229u, 223u, 225u, 88u, 154u, 115u, 219u}; +size_t var_74 = 93u; +uint8_t var_73 [] = {160u, 130u, 232u, 162u, 72u, 128u, 128u, 34u, 64u, 18u, 128u, 128u, 128u, 72u, 128u, 160u, 128u, 194u, 88u, 104u, 152u, 216u, 88u, 160u, 128u, 128u, 160u, 88u, 216u, 128u, 56u, 200u, 128u, 216u, 104u, 208u, 160u, 160u, 128u, 128u, 24u, 128u, 24u, 128u, 24u, 128u, 88u, 192u, 104u, 232u, 8u, 240u, 128u, 80u, 128u, 88u, 128u, 128u, 192u, 56u, 40u, 128u, 146u, 128u, 160u, 160u, 160u, 128u, 160u, 160u, 128u, 128u, 64u, 98u, 88u, 2u, 128u, 128u, 192u, 24u, 128u, 104u, 144u, 128u, 152u, 40u, 128u, 128u, 160u, 208u, 56u, 152u, 128u}; +size_t var_71 = 120u; +uint8_t var_70 [] = {160u, 130u, 232u, 162u, 72u, 128u, 128u, 34u, 64u, 18u, 128u, 128u, 128u, 72u, 128u, 160u, 128u, 194u, 88u, 104u, 152u, 216u, 88u, 160u, 128u, 128u, 160u, 88u, 216u, 128u, 56u, 200u, 128u, 216u, 104u, 208u, 160u, 160u, 128u, 128u, 24u, 128u, 24u, 128u, 24u, 128u, 88u, 192u, 104u, 232u, 8u, 240u, 128u, 80u, 128u, 88u, 128u, 128u, 192u, 56u, 40u, 128u, 146u, 128u, 160u, 160u, 160u, 128u, 160u, 160u, 128u, 128u, 64u, 98u, 88u, 2u, 128u, 128u, 192u, 24u, 128u, 104u, 144u, 128u, 152u, 40u, 128u, 128u, 160u, 208u, 56u, 152u, 128u, 130u, 72u, 152u, 64u, 144u, 136u, 8u, 64u, 128u, 128u, 242u, 64u, 128u, 160u, 160u, 64u, 160u, 168u, 192u, 192u, 128u, 128u, 168u, 128u, 232u, 128u, 192u}; +size_t var_68 = 71u; +uint8_t var_67 [] = {160u, 130u, 232u, 162u, 72u, 128u, 128u, 34u, 64u, 18u, 128u, 128u, 128u, 72u, 128u, 160u, 128u, 194u, 88u, 104u, 152u, 216u, 88u, 160u, 128u, 128u, 160u, 88u, 216u, 128u, 56u, 200u, 128u, 216u, 104u, 208u, 160u, 160u, 128u, 128u, 24u, 128u, 24u, 128u, 24u, 128u, 88u, 192u, 104u, 232u, 8u, 240u, 128u, 80u, 128u, 88u, 128u, 128u, 192u, 56u, 40u, 128u, 146u, 128u, 160u, 160u, 160u, 128u, 160u, 160u, 128u}; +size_t var_65 = 112u; +uint8_t var_64 [] = {157u, 65u, 122u, 81u, 72u, 231u, 126u, 145u, 164u, 9u, 174u, 111u, 94u, 210u, 246u, 229u, 223u, 225u, 88u, 154u, 115u, 219u, 171u, 61u, 142u, 174u, 253u, 88u, 155u, 102u, 56u, 242u, 55u, 123u, 104u, 208u, 245u, 160u, 143u, 62u, 227u, 215u, 67u, 198u, 195u, 103u, 203u, 252u, 90u, 186u, 194u, 240u, 182u, 80u, 38u, 139u, 70u, 110u, 220u, 56u, 138u, 128u, 201u, 119u, 253u, 189u, 149u, 254u, 229u, 77u, 79u, 142u, 64u, 49u, 235u, 129u, 207u, 223u, 156u, 3u, 23u, 90u, 144u, 151u, 179u, 40u, 62u, 22u, 245u, 208u, 56u, 147u, 38u, 65u, 72u, 211u, 148u, 144u, 226u, 8u, 228u, 238u, 79u, 121u, 164u, 199u, 29u, 221u, 228u, 205u, 42u, 252u}; +size_t var_62 = 38u; +uint8_t var_61 [] = {160u, 130u, 232u, 162u, 72u, 128u, 128u, 34u, 64u, 18u, 128u, 128u, 128u, 72u, 128u, 160u, 128u, 194u, 88u, 104u, 152u, 216u, 88u, 160u, 128u, 128u, 160u, 88u, 216u, 128u, 56u, 200u, 128u, 216u, 104u, 208u, 160u, 160u}; +size_t var_59 = 11u; +uint8_t var_58 [] = {160u, 130u, 232u, 162u, 72u, 128u, 128u, 34u, 64u, 18u, 128u}; +size_t var_56 = 8u; +uint8_t var_55 [] = {160u, 130u, 232u, 162u, 72u, 128u, 128u, 34u}; +size_t var_53 = 28u; +uint8_t var_52 [] = {0u, 144u, 64u, 144u, 64u, 0u, 0u, 144u, 0u, 16u, 0u, 0u, 0u, 64u, 0u, 0u, 0u, 144u, 192u, 64u, 192u, 192u, 192u, 0u, 0u, 0u, 0u, 192u}; +size_t var_50 = 10u; +uint8_t var_49 [] = {0u, 144u, 64u, 144u, 64u, 0u, 0u, 144u, 0u, 16u}; +uint8_t var_47 [] = {182u, 168u, 105u, 126u, 156u, 93u, 211u, 224u, 108u, 211u}; +uint8_t var_46 [] = {45u, 125u, 169u, 242u, 191u, 145u, 8u, 31u, 96u, 206u, 73u, 124u, 253u, 19u, 130u, 21u, 151u, 145u, 236u, 250u, 205u, 187u, 99u, 161u, 79u, 225u, 245u, 167u}; +uint8_t var_45 [] = {20u, 157u, 201u, 212u, 61u, 31u, 219u, 54u}; +uint8_t var_44 [] = {144u, 25u, 221u, 0u, 167u, 170u, 8u, 210u, 158u, 111u, 234u}; +uint8_t var_43 [] = {73u, 124u, 56u, 38u, 91u, 222u, 193u, 208u, 134u, 227u, 175u, 247u, 134u, 175u, 247u, 167u, 13u, 21u, 117u, 113u, 67u, 207u, 136u, 196u, 91u, 178u, 83u, 130u, 126u, 66u, 98u, 25u, 120u, 126u, 61u, 38u, 85u, 248u}; +uint8_t var_42 [] = {166u, 143u, 183u, 66u, 11u, 148u, 1u, 53u, 150u, 98u, 7u, 112u, 72u, 240u, 124u, 254u, 158u, 123u, 75u, 76u, 168u, 55u, 94u, 73u, 0u, 171u, 205u, 242u, 140u, 100u, 81u, 238u, 187u, 7u, 154u, 144u, 30u, 226u, 0u, 10u, 137u, 96u, 145u, 198u, 230u, 148u, 232u, 198u, 13u, 31u, 134u, 229u, 253u, 112u, 46u, 52u, 195u, 168u, 76u, 147u, 153u, 95u, 32u, 115u, 79u, 214u, 80u, 202u, 90u, 7u, 156u, 39u, 185u, 143u, 79u, 247u, 27u, 103u, 20u, 180u, 0u, 127u, 110u, 185u, 195u, 95u, 200u, 104u, 150u, 246u, 58u, 33u, 159u, 94u, 95u, 51u, 3u, 43u, 153u, 244u, 114u, 127u, 244u, 134u, 98u, 151u, 77u, 219u, 219u, 229u, 194u, 119u}; +uint8_t var_41 [] = {31u, 75u, 127u, 254u, 94u, 180u, 217u, 67u, 53u, 241u, 253u, 128u, 200u, 4u, 41u, 179u, 169u, 9u, 230u, 18u, 55u, 240u, 178u, 135u, 193u, 231u, 106u, 167u, 145u, 109u, 52u, 151u, 19u, 133u, 176u, 22u, 214u, 120u, 29u, 131u, 207u, 31u, 33u, 237u, 190u, 16u, 33u, 107u, 126u, 114u, 63u, 107u, 158u, 202u, 172u, 203u, 60u, 202u, 179u, 11u, 226u, 186u, 230u, 163u, 191u, 127u, 251u, 192u, 76u, 235u, 58u}; +uint8_t var_40 [] = {145u, 253u, 8u, 228u, 212u, 153u, 22u, 179u, 125u, 54u, 30u, 83u, 110u, 236u, 137u, 211u, 226u, 153u, 137u, 115u, 124u, 6u, 53u, 57u, 97u, 35u, 0u, 87u, 113u, 115u, 229u, 133u, 220u, 24u, 224u, 134u, 146u, 89u, 206u, 243u, 59u, 36u, 21u, 4u, 145u, 1u, 55u, 48u, 102u, 228u, 96u, 95u, 11u, 196u, 142u, 92u, 182u, 250u, 113u, 210u, 36u, 132u, 122u, 241u, 182u, 251u, 22u, 98u, 225u, 186u, 8u, 36u, 242u, 83u, 43u, 136u, 123u, 214u, 248u, 176u, 247u, 62u, 235u, 88u, 78u, 42u, 29u, 46u, 37u, 209u, 215u, 146u, 112u, 130u, 230u, 170u, 60u, 94u, 204u, 21u, 247u, 209u, 47u, 96u, 55u, 128u, 129u, 236u, 47u, 39u, 29u, 17u, 152u, 58u, 179u, 170u, 219u, 61u, 5u, 134u}; +uint8_t var_39 [] = {88u, 39u, 186u, 135u, 230u, 157u, 86u, 109u, 133u, 40u, 183u, 209u, 6u, 228u, 76u, 244u, 54u, 141u, 116u, 46u, 52u, 189u, 83u, 150u, 24u, 240u, 4u, 145u, 57u, 95u, 47u, 251u, 230u, 31u, 206u, 87u, 126u, 6u, 137u, 195u, 21u, 209u, 219u, 116u, 42u, 58u, 245u, 211u, 120u, 15u, 23u, 132u, 155u, 166u, 126u, 203u, 32u, 177u, 137u, 160u, 141u, 192u, 1u, 27u, 222u, 63u, 242u, 163u, 34u, 133u, 12u, 149u, 220u, 1u, 5u, 79u, 114u, 174u, 116u, 60u, 42u, 170u, 56u, 101u, 119u, 231u, 181u, 126u, 133u, 122u, 58u, 62u, 171u}; +uint8_t var_38 [] = {91u, 29u, 1u, 213u, 109u, 30u, 128u, 157u, 89u, 130u, 248u, 205u, 230u, 36u, 213u, 8u, 31u, 203u, 39u, 226u, 71u, 117u}; +uint8_t var_37 [] = {186u, 118u, 5u, 54u, 206u, 3u, 160u, 246u, 239u, 211u, 137u, 182u, 119u, 103u, 85u, 103u, 158u, 81u, 121u, 131u, 241u, 153u, 71u, 8u, 101u, 194u, 212u, 225u, 132u, 59u, 130u, 13u, 124u, 233u, 242u, 172u, 121u, 201u, 148u, 86u, 59u, 185u, 188u, 230u, 85u, 200u, 193u, 212u, 2u, 33u, 98u, 115u, 101u, 12u, 95u, 73u, 165u, 64u, 255u, 81u, 178u, 189u, 45u, 147u, 88u, 84u, 119u, 119u, 180u, 59u, 234u, 50u, 90u, 69u, 15u, 193u, 36u, 142u, 32u, 71u, 157u, 80u, 190u, 196u, 117u, 201u, 117u, 244u, 136u, 30u, 76u, 223u, 115u, 217u, 233u, 71u, 126u, 61u, 180u, 141u, 31u, 138u, 164u, 73u, 77u, 67u, 75u, 49u, 9u, 117u, 193u}; +uint8_t var_36 [] = {83u, 227u, 251u, 221u, 121u, 11u, 108u, 49u, 182u, 185u, 143u, 124u, 153u, 207u, 151u, 217u, 95u, 249u, 21u, 118u, 161u, 231u, 47u, 253u, 218u, 94u, 209u, 113u, 131u, 50u, 68u, 83u, 44u, 213u, 8u, 27u, 28u, 16u, 65u, 19u, 89u, 37u, 103u, 134u, 7u, 80u, 28u, 54u, 18u, 162u, 179u, 203u, 1u, 87u, 141u, 43u, 183u, 2u, 147u, 175u, 98u, 120u, 120u, 239u, 207u, 154u}; +uint8_t var_35 [] = {79u, 217u, 102u, 16u, 233u, 36u, 243u, 16u, 97u}; +uint8_t var_34 [] = {249u, 99u, 140u, 174u, 222u, 81u, 130u, 62u, 196u, 126u, 217u, 53u, 49u, 151u, 240u, 108u, 235u, 182u, 49u, 59u, 206u, 230u, 35u, 97u, 191u, 228u, 219u, 76u, 116u, 4u, 76u, 111u, 19u, 189u, 13u, 154u, 110u, 52u, 207u, 245u, 82u, 13u, 67u, 11u, 18u, 8u, 223u, 87u, 69u, 226u, 65u, 128u, 195u, 233u, 189u, 47u, 83u, 45u, 97u, 117u, 137u, 163u, 174u, 213u, 235u, 249u, 199u, 64u, 158u, 197u, 100u, 244u, 84u, 203u, 141u, 72u, 174u, 162u, 65u, 44u, 62u, 214u, 67u, 21u, 126u, 243u, 141u, 12u, 213u, 54u, 114u, 166u, 209u, 28u, 88u, 187u, 227u, 33u, 119u, 83u, 70u, 239u, 223u, 70u}; +uint8_t var_33 [] = {69u, 55u, 127u, 240u, 221u, 161u, 186u, 218u, 11u, 54u, 10u, 236u, 49u, 42u, 221u, 26u, 11u, 151u, 177u, 93u, 119u, 141u, 77u, 140u, 187u, 222u, 36u, 255u, 206u, 131u, 24u, 15u, 135u, 189u, 186u, 178u, 168u, 159u, 70u, 9u}; +uint8_t var_32 [] = {11u, 89u, 54u, 232u, 165u, 85u, 209u, 49u, 34u, 129u, 156u, 155u, 32u, 161u, 238u, 63u, 5u, 117u, 182u, 0u, 211u, 168u, 96u, 29u, 14u, 126u, 10u, 182u, 32u, 49u, 205u, 40u, 242u, 167u, 114u, 76u, 146u, 122u, 141u, 124u}; +uint8_t var_31 [] = {62u, 152u, 160u, 146u, 231u, 221u, 197u, 169u, 123u, 6u, 58u, 112u, 253u, 208u, 191u, 20u, 252u, 94u, 153u, 134u, 34u, 255u, 70u, 192u, 92u, 194u, 227u, 42u, 117u, 86u, 177u, 130u, 23u, 123u, 59u, 3u, 8u, 96u, 34u, 117u, 209u, 89u, 177u, 105u, 171u, 73u, 84u, 177u, 66u, 8u, 171u, 91u, 59u, 32u, 206u, 23u, 12u, 94u, 48u, 208u, 252u, 160u, 140u, 169u, 245u, 186u, 118u, 128u, 19u, 12u, 35u, 20u, 243u, 67u, 0u, 121u, 205u, 1u, 53u, 39u, 22u, 21u, 220u, 108u, 83u, 21u, 142u, 61u, 231u, 27u, 106u, 100u, 46u, 237u, 80u, 25u, 238u, 182u, 142u, 11u, 139u, 102u, 221u, 145u}; +uint8_t var_30 [] = {41u, 156u, 138u, 248u, 254u, 36u, 60u, 13u, 62u}; +uint8_t var_29 [] = {157u, 65u, 122u, 81u, 72u, 231u, 126u, 145u, 164u, 9u, 174u, 111u, 94u, 210u, 246u, 229u, 223u, 225u, 88u, 154u, 115u, 219u, 171u, 61u, 142u, 174u, 253u, 88u, 107u, 19u, 106u, 124u, 175u, 16u, 255u, 243u, 144u, 185u, 238u, 120u, 134u, 137u, 173u, 235u, 151u, 203u, 186u, 150u, 72u, 231u, 96u, 210u, 237u, 52u, 133u, 105u, 252u, 158u, 43u, 9u, 203u, 255u, 200u, 19u, 185u, 30u, 205u, 15u, 112u, 214u, 13u, 106u, 178u, 19u, 164u, 242u, 205u, 109u, 158u, 205u, 241u, 172u, 195u, 140u, 200u, 101u, 242u, 90u, 96u, 231u, 211u, 143u, 54u, 210u, 175u, 104u, 38u, 3u, 242u, 10u, 245u, 118u, 65u, 95u, 193u, 2u, 55u, 89u, 10u, 145u, 91u, 128u, 59u, 24u, 242u, 132u, 202u, 141u, 129u, 164u}; +uint8_t var_28 [] = {155u, 102u, 56u, 242u, 55u, 123u, 104u, 208u, 245u, 160u, 143u, 62u, 227u, 215u, 67u, 198u, 195u, 103u, 203u, 252u, 90u, 186u, 194u, 240u, 182u, 80u, 38u, 139u, 70u, 110u, 220u, 56u, 138u, 128u, 201u, 119u, 253u, 189u, 149u, 254u, 229u, 77u, 79u, 142u, 64u, 49u, 235u, 129u, 207u, 223u, 156u, 3u, 23u, 90u, 144u, 151u, 179u, 40u, 62u, 22u, 245u, 208u, 56u, 147u, 38u, 65u, 72u, 211u, 148u, 144u, 226u, 8u, 228u, 238u, 79u, 121u, 164u, 199u, 29u, 221u, 228u, 205u, 42u, 252u, 236u, 63u, 128u, 106u, 30u, 122u, 30u, 44u, 9u, 129u, 53u, 11u, 59u, 60u, 117u, 31u, 111u, 219u, 158u, 14u, 148u, 223u, 228u, 160u, 237u, 78u, 122u, 253u, 205u, 34u, 252u, 39u, 147u, 211u, 17u, 63u}; +uint16_t var_27 [] = {20665u, 64011u, 44313u, 18011u, 56759u, 41131u, 2113u, 20357u, 4366u, 41922u, 13219u, 29124u, 53134u, 63195u, 41618u, 17798u, 30352u, 26110u, 32335u, 3191u, 59414u, 16846u, 40269u, 16422u, 55562u, 9133u, 645u, 40218u}; +size_t var_26 = 28u; +__riscv_vsetvl_e8m8(40); +vuint8m8_t var_20 = __riscv_vle8_v_u8m8(var_32, 40); +// 11, 89, 54, 232, 165, 85, 209, 49, 34, 129, 156, 155, 32, 161, 238, 63, 5, 117, 182, 0, 211, 168, 96, 29, 14, 126, 10, 182, 32, 49, 205, 40, 242, 167, 114, 76, 146, 122, 141, 124 + +__riscv_vsetvl_e8m8(104); +vuint8m8_t var_21 = __riscv_vle8_v_u8m8(var_31, 104); +// 62, 152, 160, 146, 231, 221, 197, 169, 123, 6, 58, 112, 253, 208, 191, 20, 252, 94, 153, 134, 34, 255, 70, 192, 92, 194, 227, 42, 117, 86, 177, 130, 23, 123, 59, 3, 8, 96, 34, 117, 209, 89, 177, 105, 171, 73, 84, 177, 66, 8, 171, 91, 59, 32, 206, 23, 12, 94, 48, 208, 252, 160, 140, 169, 245, 186, 118, 128, 19, 12, 35, 20, 243, 67, 0, 121, 205, 1, 53, 39, 22, 21, 220, 108, 83, 21, 142, 61, 231, 27, 106, 100, 46, 237, 80, 25, 238, 182, 142, 11, 139, 102, 221, 145 + +__riscv_vsetvl_e8m8(9); +vuint8m8_t var_22 = __riscv_vle8_v_u8m8(var_30, 9); +// 41, 156, 138, 248, 254, 36, 60, 13, 62 + +__riscv_vsetvl_e8m8(120); +vuint8m8_t var_23 = __riscv_vle8_v_u8m8(var_29, 120); +// 157, 65, 122, 81, 72, 231, 126, 145, 164, 9, 174, 111, 94, 210, 246, 229, 223, 225, 88, 154, 115, 219, 171, 61, 142, 174, 253, 88, 107, 19, 106, 124, 175, 16, 255, 243, 144, 185, 238, 120, 134, 137, 173, 235, 151, 203, 186, 150, 72, 231, 96, 210, 237, 52, 133, 105, 252, 158, 43, 9, 203, 255, 200, 19, 185, 30, 205, 15, 112, 214, 13, 106, 178, 19, 164, 242, 205, 109, 158, 205, 241, 172, 195, 140, 200, 101, 242, 90, 96, 231, 211, 143, 54, 210, 175, 104, 38, 3, 242, 10, 245, 118, 65, 95, 193, 2, 55, 89, 10, 145, 91, 128, 59, 24, 242, 132, 202, 141, 129, 164 + +vuint8m8_t var_24 = __riscv_vle8_v_u8m8(var_28, 120); +// 155, 102, 56, 242, 55, 123, 104, 208, 245, 160, 143, 62, 227, 215, 67, 198, 195, 103, 203, 252, 90, 186, 194, 240, 182, 80, 38, 139, 70, 110, 220, 56, 138, 128, 201, 119, 253, 189, 149, 254, 229, 77, 79, 142, 64, 49, 235, 129, 207, 223, 156, 3, 23, 90, 144, 151, 179, 40, 62, 22, 245, 208, 56, 147, 38, 65, 72, 211, 148, 144, 226, 8, 228, 238, 79, 121, 164, 199, 29, 221, 228, 205, 42, 252, 236, 63, 128, 106, 30, 122, 30, 44, 9, 129, 53, 11, 59, 60, 117, 31, 111, 219, 158, 14, 148, 223, 228, 160, 237, 78, 122, 253, 205, 34, 252, 39, 147, 211, 17, 63 + +__riscv_vsetvl_e16m4(28); +vuint16m4_t var_25 = __riscv_vle16_v_u16m4(var_27, 28); +// 20665, 64011, 44313, 18011, 56759, 41131, 2113, 20357, 4366, 41922, 13219, 29124, 53134, 63195, 41618, 17798, 30352, 26110, 32335, 3191, 59414, 16846, 40269, 16422, 55562, 9133, 645, 40218 + +__riscv_vsetvl_e8m8(40); +__riscv_vse8_v_u8m8(var_33, var_20, 40); +__riscv_vsetvl_e8m8(104); +__riscv_vse8_v_u8m8(var_34, var_21, 104); +__riscv_vsetvl_e8m8(9); +__riscv_vse8_v_u8m8(var_35, var_22, 9); +__riscv_vsetvl_e8m8(120); +vuint8m8_t var_16 = __riscv_vslideup_vx_u8m8(var_23, var_24, var_26, 120); +// 157, 65, 122, 81, 72, 231, 126, 145, 164, 9, 174, 111, 94, 210, 246, 229, 223, 225, 88, 154, 115, 219, 171, 61, 142, 174, 253, 88, 155, 102, 56, 242, 55, 123, 104, 208, 245, 160, 143, 62, 227, 215, 67, 198, 195, 103, 203, 252, 90, 186, 194, 240, 182, 80, 38, 139, 70, 110, 220, 56, 138, 128, 201, 119, 253, 189, 149, 254, 229, 77, 79, 142, 64, 49, 235, 129, 207, 223, 156, 3, 23, 90, 144, 151, 179, 40, 62, 22, 245, 208, 56, 147, 38, 65, 72, 211, 148, 144, 226, 8, 228, 238, 79, 121, 164, 199, 29, 221, 228, 205, 42, 252, 236, 63, 128, 106, 30, 122, 30, 44 + +__riscv_vsetvl_e8m2(28); +vuint8m2_t var_8 = __riscv_vncvt_x_x_w_u8m2(var_25, 28); +// 185, 11, 25, 91, 183, 171, 65, 133, 14, 194, 163, 196, 142, 219, 146, 134, 144, 254, 79, 119, 22, 206, 77, 38, 10, 173, 133, 26 + +if(!check(var_33, var_91, var_92)) {cerr << "check 90 fails" << endl; return_value = 1;} +if(!check(var_34, var_88, var_89)) {cerr << "check 87 fails" << endl; return_value = 1;} +if(!check(var_35, var_85, var_86)) {cerr << "check 84 fails" << endl; return_value = 1;} +__riscv_vsetvl_e8m8(111); +__riscv_vse8_v_u8m8(var_37, var_16, 111); +__riscv_vsetvl_e8m8(112); +__riscv_vse8_v_u8m8(var_42, var_16, 112); +__riscv_vsetvl_e8m8(66); +__riscv_vse8_v_u8m8(var_36, var_16, 66); +__riscv_vsetvl_e8m8(22); +__riscv_vse8_v_u8m8(var_38, var_16, 22); +__riscv_vsetvl_e8m8(120); +vuint8m8_t var_13 = __riscv_vsll_vv_u8m8(var_16, var_16, 120); +// 160, 130, 232, 162, 72, 128, 128, 34, 64, 18, 128, 128, 128, 72, 128, 160, 128, 194, 88, 104, 152, 216, 88, 160, 128, 128, 160, 88, 216, 128, 56, 200, 128, 216, 104, 208, 160, 160, 128, 128, 24, 128, 24, 128, 24, 128, 88, 192, 104, 232, 8, 240, 128, 80, 128, 88, 128, 128, 192, 56, 40, 128, 146, 128, 160, 160, 160, 128, 160, 160, 128, 128, 64, 98, 88, 2, 128, 128, 192, 24, 128, 104, 144, 128, 152, 40, 128, 128, 160, 208, 56, 152, 128, 130, 72, 152, 64, 144, 136, 8, 64, 128, 128, 242, 64, 128, 160, 160, 64, 160, 168, 192, 192, 128, 128, 168, 128, 232, 128, 192 + +__riscv_vsetvl_e8m2(28); +uint8_t var_4 = __riscv_vmv_x_s_u8m2_u8(var_8); +// 185 + +if(!check(var_37, var_79, var_80)) {cerr << "check 78 fails" << endl; return_value = 1;} +if(!check(var_42, var_64, var_65)) {cerr << "check 63 fails" << endl; return_value = 1;} +if(!check(var_36, var_82, var_83)) {cerr << "check 81 fails" << endl; return_value = 1;} +if(!check(var_38, var_76, var_77)) {cerr << "check 75 fails" << endl; return_value = 1;} +__riscv_vsetvl_e8m8(8); +__riscv_vse8_v_u8m8(var_45, var_13, 8); +__riscv_vsetvl_e8m8(38); +__riscv_vse8_v_u8m8(var_43, var_13, 38); +__riscv_vsetvl_e8m8(120); +__riscv_vse8_v_u8m8(var_40, var_13, 120); +__riscv_vsetvl_e8m8(71); +__riscv_vse8_v_u8m8(var_41, var_13, 71); +__riscv_vsetvl_e8m8(11); +__riscv_vse8_v_u8m8(var_44, var_13, 11); +__riscv_vsetvl_e8m8(93); +__riscv_vse8_v_u8m8(var_39, var_13, 93); +__riscv_vsetvl_e8m8(28); +vuint8m8_t var_2 = __riscv_vnmsub_vx_u8m8(var_13, var_4, var_13, 28); +// 0, 144, 64, 144, 64, 0, 0, 144, 0, 16, 0, 0, 0, 64, 0, 0, 0, 144, 192, 64, 192, 192, 192, 0, 0, 0, 0, 192, 216, 128, 56, 200, 128, 216, 104, 208, 160, 160, 128, 128, 24, 128, 24, 128, 24, 128, 88, 192, 104, 232, 8, 240, 128, 80, 128, 88, 128, 128, 192, 56, 40, 128, 146, 128, 160, 160, 160, 128, 160, 160, 128, 128, 64, 98, 88, 2, 128, 128, 192, 24, 128, 104, 144, 128, 152, 40, 128, 128, 160, 208, 56, 152, 128, 130, 72, 152, 64, 144, 136, 8, 64, 128, 128, 242, 64, 128, 160, 160, 64, 160, 168, 192, 192, 128, 128, 168, 128, 232, 128, 192 + +if(!check(var_45, var_55, var_56)) {cerr << "check 54 fails" << endl; return_value = 1;} +if(!check(var_43, var_61, var_62)) {cerr << "check 60 fails" << endl; return_value = 1;} +if(!check(var_40, var_70, var_71)) {cerr << "check 69 fails" << endl; return_value = 1;} +if(!check(var_41, var_67, var_68)) {cerr << "check 66 fails" << endl; return_value = 1;} +if(!check(var_44, var_58, var_59)) {cerr << "check 57 fails" << endl; return_value = 1;} +if(!check(var_39, var_73, var_74)) {cerr << "check 72 fails" << endl; return_value = 1;} +__riscv_vse8_v_u8m8(var_46, var_2, 28); +__riscv_vsetvl_e8m8(10); +__riscv_vse8_v_u8m8(var_47, var_2, 10); +if(!check(var_46, var_52, var_53)) {cerr << "check 51 fails" << endl; return_value = 1;} +if(!check(var_47, var_49, var_50)) {cerr << "check 48 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-8.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-8.C new file mode 100644 index 00000000000..5a94b44ab97 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-8.C @@ -0,0 +1,412 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" + +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + + + +int main() +{ +int return_value = 0; + +size_t var_135 = 86u; +uint16_t var_134 [] = {101u, 65480u, 65455u, 82u, 3u, 65517u, 40u, 12u, 35u, 18500u, 23u, 18620u, 52u, 65474u, 65525u, 8732u, 65533u, 186u, 67u, 65394u, 24u, 106u, 65534u, 65404u, 57u, 10u, 65501u, 65418u, 65443u, 52416u, 5u, 32376u, 65512u, 81u, 10325u, 38u, 142u, 150u, 194u, 65451u, 75u, 65506u, 65357u}; +size_t var_132 = 78u; +uint16_t var_131 [] = {30791u, 32459u, 39289u, 50133u, 53913u, 48374u, 15719u, 9547u, 28529u, 15519u, 26813u, 22990u, 62351u, 47984u, 32959u, 25324u, 32137u, 16732u, 63291u, 54919u, 40630u, 3912u, 64270u, 16071u, 36589u, 3729u, 38470u, 25306u, 58574u, 39571u, 47284u, 3995u, 52442u, 17945u, 38770u, 12707u, 15396u, 39496u, 45828u}; +size_t var_129 = 46u; +uint16_t var_128 [] = {10847u, 47586u, 21367u, 56430u, 60552u, 49838u, 906u, 20140u, 15972u, 2432u, 48332u, 7048u, 63008u, 40299u, 20052u, 13973u, 42746u, 45489u, 29260u, 11899u, 11897u, 53839u, 61489u}; +size_t var_126 = 256u; +int16_t var_125 [] = {-29374, -15481, 28920, -16452, -15542, 4422, -19325, -160, -21628, -15526, -5851, 17291, -9264, 10571, -9725, 21681, 7770, -27896, 8998, 8565, -9045, -13965, -4977, 179, -20071, -27134, 12350, 11152, 5002, 19533, 24385, 2478, -6586, -18052, -21197, 15515, -1205, -12533, -15128, 10248, 27609, 25188, -93, -4918, 17451, 22912, -20227, -6643, -14084, 22545, -18912, 32759, -6204, 31913, -18248, -20565, 6372, 4, -1905, 13419, 8566, 2143, 26280, -14245, -19591, -22952, -22908, 8195, -2915, 2877, 7785, 4800, -20496, -8460, 5595, 23150, -24522, -2279, 13303, 25966, 4905, 425, 20568, -20256, 7660, -24302, -29119, -5390, -12536, -26772, 25331, -29355, -24243, -2531, -4230, 11276, 8009, -14260, 7084, 168, -13462, -1518, -8743, -6700, -5155, -25117, -31224, -23509, 28117, -9954, -9154, -5234, -295, -20522, -31997, 20187, -21432, 2916, 28399, 23453, 507, -25503, 14386, 11067, 9561, -29313, 11963, -30487}; +size_t var_123 = 256u; +int16_t var_122 [] = {-9779, 20322, 9964, 16445, 10077, -14092, 1053, -24392, -20234, -16301, 15011, -7, -16, 27721, -12237, 5, 17070, -19, 6, -14645, 5848, 4, 17103, 21269, 5365, -8, -22, 6057, 2, 19, 8, -23, -26216, -16087, -8159, 4, 28042, 18378, 23, 16, -26012, -18796, 17, -27369, -12, 26688, 20, -4956, -26919, 11, -11617, 700, -22094, 22832, -21, -1083, 21087, -17, -15, 18, -9850, -16, 15, 14796, -11, -13746, 20978, -3, 10, 4768, 4, -5897, 3, 13613, 26955, -1, -7010, -28036, 11544, -8005, -3522, 9462, -19205, -21061, -12631, 27851, -12976, 3266, 29841, -30711, -20551, -25063, -2205, -15380, 16556, -14343, -18597, -22218, -17102, -18595, 1034, 9826, -22564, 9423, -25000, 29563, -4231, -12393, 18583, -23925, -32736, 3895, 2430, -25828, 9243, -29312, -7255, 27874, 5674, 14350, -1347, 16832, 19485, 17730, -9238, 19700, -30034, -31690}; +size_t var_120 = 256u; +int16_t var_119 [] = {1, 29465, 6474, -25756, 23923, 18868, -10781, -15553, -8305, -16504, -30487, 8332, 19752, 25079, 23916, -28308, -7311, -19198, 19440, -1210, 14958, 4160, -31337, -22573, -7743, 25456, -7074, -1865, 8330, 14620, 29422, -29488, -15547, 17994, -32001, 8358, -25369, -29699, 28419, 11299, -20258, -22725, 14496, 30262, 5255, -28915, 2977, 5166, 32637, 6460, 29635, 24282, 4546, 7571, -22871, -13662, -31692, -17626, 23116, -17448, 9863, 5564, 13871, 31159, -29565, 27247, -8472, 252, 23090, -16895, -24312, 29092, -17706, -23920, -29885, -23821, -17923, -16922, -4015, 2157, 19898, 9954, -29035, -21849, -23231, 22782, -14137, 20072, 12911, -9342, -13658, -24662, 31525, -6178, 9277, -14469, -19084, -28917, 25630, 7517, -14808, 31276, -20633, 2584, 30957, 24446, 24798, -16615, 25411, 25663, -24046, 17106, -17497, -28776, 508, 9460, 16764, -5739, -15844, 3823, -30527, -29697, -20735, -14620, 31146, 9289, 6438, 3847}; +size_t var_117 = 256u; +int16_t var_116 [] = {1, 20722, 1, 22720, 1, -19617, -8352, -19084, -11721, 1, 1, 1, 6538, 28054, -22963, -2809, 1, 1, 32630, 1, -23503, 1, -18651, 18936, -29542, 32208, -708, 1, 26355, 718, 6225, 1, 28436, -22436, -17578, -30480, 4557, -29427, 10025, 1563, 13061, 23731, -5472, -30419, 26171, 14686, 19845, -8878, 16886, -19497, 24513, -28385, -16884, 2838, -21201, -8518, 6468, 13042, -20974, 9603, 21472, 20455, -19082, 1333, -24415, 12544, 7158, -19727, 28796, -28104, 514, -8743, -32065, -32473, -25143, -30438, -10681, -11338, -26675, -21366, 18382, -18871, 29289, -15442, -8510, -7680, -20745, 10615, 4523, -8149, -11113, -18605, -9399, 21399, -1960, -8917, -18937, -23129, 6896, 31806, 27974, -25251, 22588, -23751, -30214, 28818, 22871, -8686, -27219, 14863, -30951, -3588, -11658, -3754, 10961, 23990, 4547, -20682, 825, 29950, 2360, -2175, -27679, 30293, 30760, -15197, 15133, 10292}; +size_t var_114 = 256u; +int16_t var_113 [] = {-27921, -25052, 17832, 616, -30606, -32768, 15769, -24859, -21566, -24594, 9058, 23553, -17, -12646, -23156, 16746, -1299, -27261, 28274, -17232, 16159, -16, -12, 15054, -30018, 1382, 25442, -14681, 21780, -30685, 19074, -23903, 10275, -10194, -25109, -26930, -1214, -25421, 21296, -22317, -24482, -30681, 1735, -15453, 4881, 6713, -146, -4636, 17907, -29353, 13031, -8501, -27209, -21201, -26647, 13381, -25682, 17799, -13180, 14034, 148, 7132, -1481, 17652, 15028, -4414, -31767, 6625, 1589, 26303, -25350, -31496, 6875, -4582, 16015, 31295, -20630, 18688, -25027, 26702, -16763, 21440, 29449, -31200, 19962, 8181, 28685, -32649, 6083, 16115, 9848, -19572, -27638, 27095, -22780, 13956, 1445, 15760, 13295, -924, 12659, 9013, 1995, -10922, 11799, 9588, 30924, 17945, 11031, -30318, -3110, -11197, 21288, -6094, 113, 27014, -16517, 24610, 19362, 12764, 1606, -747, -20702, 25212, 22203, -11154, -22043, -7504}; +size_t var_111 = 256u; +int16_t var_110 [] = {-15492, 23101, 14967, -32768, -12646, -27082, -32768, -12646, -29916, -7866, -29810, -12, -27241, -27162, -3251, -7283, 8473, 18748, 4, 12359, -15321, 3, -23469, -24270, 16430, -20952, 14685, -23080, -14145, 10, 28186, -17789, -12646, -16913, 14361, -3176, 20, -14023, -13448, -32768, 3681, -11155, 30481, 23168, -6168, -32768, -12646, 7798, 16362, -23127, -25052, -2508, 16746, 29051, -15579, -358, -16, 11693, -32768, 22322, 22404, -15, 31824, 29220, -5721, 825, 1382, -23445, 12691, -31070, 1056, -19648, -7531, 21048, -22147, -11335, 3558, 28586, 24436, 11439, 30757, 31324, -26838, 309, -4808, 495, -17589, -27288, -15211, 23828, -15238, 17853, 1635, -6742, -17379, 1058, -21211, -20864, -5881, 14996, 16633, 32428, 31671, -25448, 21404, 9282, -22238, -2801, -18720, -18553, 10067, -30009, -19143, -25031, -5829, -7791, 24351, -26653, -26167, -11576, 19452, -4049, -3229, 22213, 10747, -28049, 1921, -22078}; +size_t var_108 = 256u; +int16_t var_107 [] = {-3874, -12, -20776, -27893, 5623, -940, 3669, -16, 28868, 13347, -16183, -17728, -11479, -24369, -14520, 8473, 3, -17, 6985, 31356, 19598, -22191, -20210, 27510, 18332, 10, -17009, 2047, 26555, -5868, -21633, 22262, -17463, -11486, 8813, 16846, 14661, 20809, -12848, 4, -16662, 24523, -21618, -3465, -15, -265, 14338, -3888, -23743, 3364, 16, -14897, 23522, -24093, 16159, -21254, -32668, 23506, -12646, -27921, -21009, 11, 15400, -31894, -3851, -16, 11, 23041, 26941, 11816, 15717, -12646, -32768, 7798, -29440, -7152, 32254, -8309, 8465, 27732, 1682, -12646, -32768, 15054, -32668, -12646, -20544, -6746, -8882, -269, 6852, 4310, 21923, 27401, -9283, 5161, -31250, -28027, -16488, 30764, -14033, -19598, -15939, 4343, 12385, 25855, -27676, -23371, 795, -16892, -1057, -20925, 10153, 30543, -2938, -24906, 4433, -6792, -13850, 19334, 24614, -589, 1781, 26446, -31615, -13874, -20619, -18747}; +uint16_t var_105 [] = {31948u, 15907u, 56598u, 26356u, 21703u, 35189u, 21809u, 41347u, 15301u, 780u, 50399u, 13875u, 22322u, 53469u, 12493u, 17561u, 59087u, 63637u, 40436u, 52340u, 19231u, 7491u, 23389u, 18589u, 36475u, 1623u, 52640u, 58979u, 49152u, 37134u, 53410u, 61580u, 4499u, 61008u, 36727u, 30357u, 41436u, 63122u, 22918u, 44665u, 48029u, 65046u, 64857u}; +int16_t var_104 [] = {-3874, 29324, -20776, -27893, 5623, -940, 3669, -3775, -30637, 13347, -16183, -17728, 22422, -24369, 32674, -21436, 6704, -8112, 22062, 31356, 19598, 7780, -20210, 27510, -29606, -14943, -17009, 2047, 26555, 1938, -21633, 22262, -17463, -11486, 8813, -24610, 14458, 20809, -12848, 3487, -16662, 24523, -21618, -3465, 30293, -265, 14338, -3888, -17904, 3364, 25055, -14897, 23522, -24093, 16130, -21254, 1841, 23506, 15439, 13236, -21009, -19417, 15400, -31894, -3851, 32001, -173, 23041, 26941, 11816, 15717, -15344, -14537, -14261, -29440, -7152, 32254, -8309, 8465, 27732, 29441, 4130, -4609, -29621, 10494, 8630, -20544, -6746, -8882, -269, 6852, 4310, 21923, 27401, -9283, 5161, -31250, -28027, -16488, 30764, -14033, -19598, -15939, 4343, 12385, 25855, -27676, -23371, 795, -16892, -1057, -20925, 10153, 30543, -2938, -24906, 4433, -6792, -13850, 19334, 24614, -589, 1781, 26446, -31615, -13874, -20619, -18747}; +uint16_t var_102 [] = {118u, 42u, 34u, 142u, 166u, 160u, 2u, 14u, 108u, 50u, 48u, 116u, 70u, 78u, 88u, 130u, 78u, 146u, 30u, 32u, 28u, 122u, 58u, 168u, 72u, 162u, 164u, 142u, 50u, 162u, 112u, 170u, 30u, 112u, 16u, 100u, 144u, 28u, 24u, 36u, 42u, 96u, 132u}; +int16_t var_100 [] = {-15492, 23101, -27323, 28216, 15107, -27082, -4475, -882, 29881, -7866, -29810, -8654, -27241, -27162, -3251, -7283, 18740, -15821, 11720, 12359, -15321, -25798, -23469, -24270, 16430, -20952, 14685, -23080, -14145, -18304, 28186, -17789, 25620, -16913, 30551, -3176, 21965, 1733, -13448, 10643, 3681, -11155, 30481, 23168, -17383, -22184, 4172, -23928, 16362, -23127, -15986, -2508, -30854, 29051, -15579, -358, 17410, 11693, 27722, 22322, 22404, -14262, 31824, 29220, -5721, 825, 16083, -23445, 12691, -31070, 1056, -19648, -7531, 21048, -22147, -11335, 3558, 28586, 24436, 11439, 30757, 31324, -26838, 309, -4808, 495, -17589, -27288, -15211, 23828, -15238, 17853, 1635, -6742, -17379, 1058, -21211, -20864, -5881, 14996, 16633, 32428, 31671, -25448, 21404, 9282, -22238, -2801, -18720, -18553, 10067, -30009, -19143, -25031, -5829, -7791, 24351, -26653, -26167, -11576, 19452, -4049, -3229, 22213, 10747, -28049, 1921, -22078}; +uint16_t var_99 [] = {104u, 100u, 88u, 64u, 74u, 132u, 22u, 58u, 78u, 116u, 4u, 14u, 104u, 72u, 122u, 112u, 36u, 94u, 4u, 42u, 16u, 58u, 88u, 90u, 68u, 74u, 6u, 64u, 58u, 92u, 34u, 8u, 32u, 12u, 78u}; +int16_t var_97 [] = {1273, -7516, 2986, 616, -30606, 8269, 15769, -24859, -21566, -24594, 9058, 23553, 16465, -13325, -23156, -4046, -1299, -27261, 28274, -17232, 31223, -29920, 10888, -25042, -30018, 14395, 25442, -14681, 21780, -30685, 19074, -23903, 10275, -10194, -25109, -26930, -1214, -25421, 21296, -22317, -24482, -30681, 1735, -15453, 4881, 6713, -146, -4636, 17907, -29353, 13031, -8501, -27209, -21201, -26647, 13381, -25682, 17799, -13180, 14034, 148, 7132, -1481, 17652, 15028, -4414, -31767, 6625, 1589, 26303, -25350, -31496, 6875, -4582, 16015, 31295, -20630, 18688, -25027, 26702, -16763, 21440, 29449, -31200, 19962, 8181, 28685, -32649, 6083, 16115, 9848, -19572, -27638, 27095, -22780, 13956, 1445, 15760, 13295, -924, 12659, 9013, 1995, -10922, 11799, 9588, 30924, 17945, 11031, -30318, -3110, -11197, 21288, -6094, 113, 27014, -16517, 24610, 19362, 12764, 1606, -747, -20702, 25212, 22203, -11154, -22043, -7504}; +uint16_t var_96 [] = {0u, 2u, 24u, 50u, 46u, 50u, 44u, 42u, 40u, 10u, 4u, 26u, 30u}; +int16_t var_94 [] = {-30573, 20722, -7246, 22720, -26505, -19617, -8352, -19084, -11721, -2847, 24265, 29063, 6538, 28054, -22963, -2809, -17932, 13466, 32630, -5817, -23503, -15731, -18651, 18936, -29542, 32208, -708, -6265, 26355, 718, 6225, -29005, 28436, -22436, -17578, -30480, 4557, -29427, 10025, 1563, 13061, 23731, -5472, -30419, 26171, 14686, 19845, -8878, 16886, -19497, 24513, -28385, -16884, 2838, -21201, -8518, 6468, 13042, -20974, 9603, 21472, 20455, -19082, 1333, -24415, 12544, 7158, -19727, 28796, -28104, 514, -8743, -32065, -32473, -25143, -30438, -10681, -11338, -26675, -21366, 18382, -18871, 29289, -15442, -8510, -7680, -20745, 10615, 4523, -8149, -11113, -18605, -9399, 21399, -1960, -8917, -18937, -23129, 6896, 31806, 27974, -25251, 22588, -23751, -30214, 28818, 22871, -8686, -27219, 14863, -30951, -3588, -11658, -3754, 10961, 23990, 4547, -20682, 825, 29950, 2360, -2175, -27679, 30293, 30760, -15197, 15133, 10292}; +uint16_t var_93 [] = {0u, 54u, 20u, 22u, 38u, 62u, 42u, 34u, 32u, 4u, 18u, 8u, 18u, 34u, 8u, 4u}; +int16_t var_91 [] = {30189, 29465, 6474, -25756, 23923, 18868, -10781, -15553, -8305, -16504, -30487, 8332, 19752, 25079, 23916, -28308, -7311, -19198, 19440, -1210, 14958, 4160, -31337, -22573, -7743, 25456, -7074, -1865, 8330, 14620, 29422, -29488, -15547, 17994, -32001, 8358, -25369, -29699, 28419, 11299, -20258, -22725, 14496, 30262, 5255, -28915, 2977, 5166, 32637, 6460, 29635, 24282, 4546, 7571, -22871, -13662, -31692, -17626, 23116, -17448, 9863, 5564, 13871, 31159, -29565, 27247, -8472, 252, 23090, -16895, -24312, 29092, -17706, -23920, -29885, -23821, -17923, -16922, -4015, 2157, 19898, 9954, -29035, -21849, -23231, 22782, -14137, 20072, 12911, -9342, -13658, -24662, 31525, -6178, 9277, -14469, -19084, -28917, 25630, 7517, -14808, 31276, -20633, 2584, 30957, 24446, 24798, -16615, 25411, 25663, -24046, 17106, -17497, -28776, 508, 9460, 16764, -5739, -15844, 3823, -30527, -29697, -20735, -14620, 31146, 9289, 6438, 3847}; +uint16_t var_90 [] = {0u, 0u}; +uint16_t var_88 [] = {65227u, 41370u, 12269u, 17089u, 28969u, 14890u, 15550u, 20307u, 7477u, 23844u, 41557u, 2477u, 27142u, 30712u, 21610u, 15475u, 46088u, 2851u, 65481u, 11244u, 25403u, 24148u, 37501u, 11798u, 61070u, 64030u, 37532u, 821u, 35906u, 11956u, 43933u, 17530u, 50878u, 45820u, 44015u, 43927u, 18941u, 53293u, 20991u}; +int16_t var_87 [] = {-9779, 20322, 9964, -26815, 10077, -14092, 1053, -24392, -20234, -16301, 15011, -6775, 18716, 27721, -12237, 10726, 17070, 30274, -3902, -14645, 5848, 28719, 17103, 21269, 5365, -28263, -14925, 6057, 9840, -30658, 14370, -13916, -26216, -16087, -8159, -17690, 28042, 18378, 11037, -11121, -26012, -18796, 12102, -27369, 13438, 26688, 8335, -4956, -26919, 11883, -11617, 700, -22094, 22832, 21108, -1083, 21087, 1234, -22422, -17256, -9850, -27596, -29223, 14796, 16656, -13746, 20978, 13606, 7999, 4768, -22686, -5897, 25569, 13613, 26955, -17915, -7190, -28036, 11544, -8005, -3522, 9462, -19205, -21061, -12631, 27851, -12976, 3266, 29841, -30711, -20551, -25063, -2205, -15380, 16556, -14343, -18597, -22218, -17102, -18595, 1034, 9826, -22564, 9423, -25000, 29563, -4231, -12393, 18583, -23925, -32736, 3895, 2430, -25828, 9243, -29312, -7255, 27874, 5674, 14350, -1347, 16832, 19485, 17730, -9238, 19700, -30034, -31690}; +uint16_t var_85 [] = {36u, 34u, 114u, 6u, 56u, 128u, 152u, 122u, 124u, 84u, 52u, 34u, 108u, 58u, 116u, 24u, 42u, 76u, 140u, 144u, 30u, 98u, 134u, 22u, 88u, 60u, 118u, 92u, 136u, 150u, 108u, 62u, 70u, 50u, 152u, 78u, 56u, 52u, 58u}; +uint16_t var_83 [] = {10138u, 25302u, 39202u, 23724u, 23053u, 3225u, 38517u, 5270u, 952u, 24729u, 13809u, 56006u, 61525u, 18955u, 51707u, 22482u, 39659u, 1284u, 61542u, 32864u, 13656u, 4337u, 7451u}; +int16_t var_82 [] = {-29374, -15481, 28920, -16452, 2364, 11352, 31508, -160, -21628, -15526, 21857, 17291, 11391, 13824, -9725, -3202, 7770, 8309, -6758, -20988, -1052, -13965, 17482, 179, -20071, -27134, 12350, -13029, 30140, 19533, 24385, 2478, -6586, -18052, -19817, 15515, -494, -12533, -15128, 10248, 27609, -2556, 12711, -4918, 11494, 22912, -20227, -6643, -14084, 22545, -18912, 32759, -6204, 31913, -18248, -20565, 6372, 4, -1905, 13419, 8566, 2143, 26280, -14245, -19591, -22952, -22908, 8195, -2915, 2877, 7785, 4800, -20496, -8460, 5595, 23150, -24522, -2279, 13303, 25966, 4905, 425, 20568, -20256, 7660, -24302, -29119, -5390, -12536, -26772, 25331, -29355, -24243, -2531, -4230, 11276, 8009, -14260, 7084, 168, -13462, -1518, -8743, -6700, -5155, -25117, -31224, -23509, 28117, -9954, -9154, -5234, -295, -20522, -31997, 20187, -21432, 2916, 28399, 23453, 507, -25503, 14386, 11067, 9561, -29313, 11963, -30487}; +uint16_t var_80 [] = {56u, 26u, 8u, 38u, 84u, 44u, 82u, 36u, 40u, 44u, 88u, 12u, 38u, 82u, 72u, 10u, 68u, 54u, 20u, 88u, 30u, 24u, 34u}; +int16_t var_78 [] = {-5511, 15397, -4090, 16445, -10331, -5993, -14277, 4670, 13645, 28158, 28011, 11743, -17516, 22469, 25023, 11351, 29064, 4055, 21504, 21062, -26487, -21392, -21758, -2303, 2416, -5950, 1317, 25973, 24101, -17769, 16867, -5484, -18462, 4760, -7010, -13594, 9063, -24357, 6877, 32191, 20488, -28272, -14390}; +int16_t var_77 [] = {-9272, 6480, 23710, -26200, -10002, 15766, 16296, 22542, -20837, -23948, 26261, 25825, 29785, -27571, 20391, 22236, -5484, -31468, -6557, -4992, -7302, -15536, 4982, 9881, 16502, -11417, -24719, -27524, -14185, 2026, 29115, 31200, -6220, 11180, 18656, -22473, -3476, 31030, -25960, -17740, 32565, -10169, -15162}; +int8_t var_76 [] = {57, -3, -103, 21, 52, -36, 52, -51, -105, 98, 83, 103, 114, -35, 102, -63, -68, -34, 78, 81, 114, -49, -60, 47, -34, -67, 39, -68, -125, 30, -108, -79, 69, 55, 21, -4, 123, 100, 35, 66, -58, -111, 123}; +int16_t var_75 [] = {-12646, 2213, 18070, -25056, 20976, 13975, 22983, -5316, 23375, 1375, 30183, -20303, -21873, -22498, -13300, 25563}; +uint16_t var_74 [] = {10847u, 47586u, 21367u, 56430u, 60552u, 49838u, 906u, 20140u, 15972u, 2432u, 48332u, 7048u, 63008u, 40299u, 20052u, 13973u, 42746u, 45489u, 29260u, 11899u, 11897u, 53839u, 61489u}; +int16_t var_73 [] = {5002, 10571, -15542, 26888, -93, -17789, 31891, 8998, -9045, -4977, -6086, -19325, 8565, 25188, -1205, 4422, -21197, 11152, -5851, 17451, 21681, -9264, -27896}; +int8_t var_72 [] = {-128, 27, -125, 81, 101, 93, 109, -84, 89, -55, 95, 63, 53, -83, 44, -68, 112, -118, -113, 66, 103, -82, -45, 70, 4, -100, -26, 50, 120, -6, -84, -3, 51, 30, -70, -72, 87, -114, -86, 20, -27, 91, -36}; +int8_t var_71 [] = {46, -55, 38, -91, -4, -52, -122, 8, -119, 32, -25, 50, -32, 7, -101, 67, 51, 49, 69, -63, 70, -8, 76, -106, -122, 4, -15, 112, -1, 55, -116, 15, -88, 35, 63, 42, 54, 23, 107, 67, 104, -59, -99}; +uint8_t var_70 [] = {227u, 90u, 33u, 177u, 193u, 6u, 63u, 227u, 151u, 211u, 162u, 248u, 135u, 190u, 160u, 173u, 153u, 227u, 227u, 111u, 175u, 121u, 98u, 3u, 249u, 197u, 131u, 120u, 149u, 7u, 36u, 64u, 118u, 96u, 94u, 191u, 142u, 221u, 242u, 76u, 208u, 30u, 7u}; +uint8_t var_69 [] = {126u, 146u, 114u, 95u, 190u, 25u, 23u, 215u, 116u, 98u, 139u, 9u, 83u, 252u, 171u, 206u, 156u, 41u, 160u, 253u, 151u, 15u, 100u, 135u, 192u, 187u, 166u, 238u, 242u, 249u, 31u, 197u, 142u, 15u, 122u, 153u, 0u, 71u, 48u, 161u, 133u, 60u, 186u}; +int8_t var_68 [] = {-100, 52, 10, -108}; +uint16_t var_67 [] = {30791u, 32459u, 39289u, 50133u, 53913u, 48374u, 15719u, 9547u, 28529u, 15519u, 26813u, 22990u, 62351u, 47984u, 32959u, 25324u, 32137u, 16732u, 63291u, 54919u, 40630u, 3912u, 64270u, 16071u, 36589u, 3729u, 38470u, 25306u, 58574u, 39571u, 47284u, 3995u, 52442u, 17945u, 38770u, 12707u, 15396u, 39496u, 45828u}; +uint16_t var_66 [] = {45618u, 62692u, 39356u, 14082u, 29123u, 46469u, 64388u, 61757u, 35123u, 64621u, 51420u, 8965u, 31645u, 53358u, 49100u, 52945u, 41586u, 57867u, 52741u, 48479u, 33678u, 37157u, 42709u, 6424u, 28769u, 39681u, 24575u, 19532u, 38277u, 17703u, 41691u, 2212u, 30429u, 56201u, 32882u, 34302u, 50077u, 24423u, 46580u, 38670u, 36911u, 10324u, 31124u}; +int16_t var_65 [] = {-10538, 31070, -6546, -810, 5895, 18940, 16260, 26564, 7998, -16670, -20866, 15828, -26614, -24949, -19205, 495}; +int16_t var_64 [] = {13702, -18610, -12797, 19185, 21065, -2396, 16058, -20073, -26093, -25203, -24989, 6430, -20885, -6194, 19788, -19441}; +int16_t var_63 [] = {11637, 14703, -7094, -28721, 27782, 10360, -14008, 7374, 11740, 22525, 16581, -437, -26907, 19495, 22176, 27240}; +uint8_t var_62 [] = {160u, 60u, 44u, 207u, 248u, 254u, 160u, 176u, 101u, 148u, 47u, 190u, 145u, 189u, 116u, 236u, 114u, 158u, 203u, 158u, 24u, 130u, 148u, 97u, 129u, 58u, 75u, 158u, 53u, 208u, 206u, 213u, 220u, 182u, 59u, 214u, 91u, 90u, 229u, 165u, 62u, 214u, 6u}; +uint8_t var_61 [] = {203u, 135u, 191u, 188u, 192u, 161u, 148u, 127u, 202u, 125u, 127u, 98u, 194u, 32u, 146u, 37u, 141u, 160u, 91u, 217u, 82u, 91u, 154u, 66u, 172u, 117u, 10u, 184u, 119u, 252u, 202u, 152u, 39u, 132u, 175u, 20u, 225u, 160u, 182u, 153u, 21u, 145u, 201u}; +int16_t var_60 [] = {1598, -8821, -23423, -10042, -23921, -19702, 21693, -15108, 12119, -2074, 13483, -6254, -22188, -16141, -25471, -6047, 28605, -17302, 25119, -20212, 28410, 30522, -12565, 4887, 6405, -25476, 3974, -17684, 7450, -674, 27331, -3539, 3566, 14853, -5480, -7573, 27415, -21047, 19826, 21081, -29014, -21530, -16291}; +int8_t var_59 [] = {-85, -43, 99, -52, 53, -81, 71, 39, 5, 30, 37, -61, 98, 104, -31, 93, 47, -87, 15, 110, 73, -5, -112, -85, -95, 16, -57, -81, 125, 99, 74, 67, -94, 15, -118, 58, 30, -46, -111, -111, -31, -111, -18}; +int8_t var_58 [] = {56, -35, -4, 36, -28, 88, 56, 2, 35, 79, 41, -113, 53, -46, -105, 59, 39, -89, -73, -71, 110, -91, 111, 99, 126, 32, -57, -106, -55, -60, 95, 11, 96, 38, 65, 56, 42, 104, -104, 44, 112, 64, -116}; +uint16_t var_57 [] = {40437u, 1413u, 18568u, 7352u, 56494u, 35473u, 28212u, 7527u, 6266u, 15098u, 64091u, 31478u, 56635u, 42334u, 35812u, 34310u, 10601u, 59359u, 58998u, 10634u, 4819u, 44391u, 5989u, 61550u, 18084u, 21434u, 9675u, 33913u, 45750u, 32052u, 32212u, 8999u, 30041u, 7670u, 21180u, 19159u, 48162u, 57027u, 50230u, 35468u, 22026u, 40268u, 51250u}; +uint8_t var_56 [] = {122u, 113u, 82u, 171u, 243u, 2u, 238u, 133u, 100u, 6u, 18u, 50u, 109u, 123u, 144u, 6u, 189u, 46u, 60u, 92u, 12u, 55u, 0u, 111u, 82u, 168u, 245u, 202u, 73u, 47u, 74u, 78u, 227u, 173u, 114u, 168u, 72u, 52u, 158u, 88u, 208u, 35u, 179u}; +int16_t var_55 [] = {-16284, -13415, -19274, -8700, 26691, 13019, 8586, 7041, 27796, -28029, 29469, 10834, 28383, 5432, -20502, 21913, 30298, 19435, 26604, -20204, -18279, 8553, 5469, -28047, 25998, -2386, -24509, -6229, -27464, 11837, 30385, -5603, 20110, -32594, -28965, -17685, -23970, -3083, 158, 18622, -12954, -16606, -25145}; +int16_t var_54 = -1354; +int8_t var_53 = -27; +uint16_t var_52 = 20066u; +int16_t var_51 = 7149; +uint16_t var_50 = 11724u; +__riscv_vsetvl_e16m8(43); +vuint16m8_t var_101 = __riscv_vle16_v_u16m8(var_102, 43); +// 118, 42, 34, 142, 166, 160, 2, 14, 108, 50, 48, 116, 70, 78, 88, 130, 78, 146, 30, 32, 28, 122, 58, 168, 72, 162, 164, 142, 50, 162, 112, 170, 30, 112, 16, 100, 144, 28, 24, 36, 42, 96, 132 + +__riscv_vsetvl_e16m8(35); +vuint16m8_t var_98 = __riscv_vle16_v_u16m8(var_99, 35); +// 104, 100, 88, 64, 74, 132, 22, 58, 78, 116, 4, 14, 104, 72, 122, 112, 36, 94, 4, 42, 16, 58, 88, 90, 68, 74, 6, 64, 58, 92, 34, 8, 32, 12, 78 + +__riscv_vsetvl_e16m8(13); +vuint16m8_t var_95 = __riscv_vle16_v_u16m8(var_96, 13); +// 0, 2, 24, 50, 46, 50, 44, 42, 40, 10, 4, 26, 30 + +__riscv_vsetvl_e16m8(16); +vuint16m8_t var_92 = __riscv_vle16_v_u16m8(var_93, 16); +// 0, 54, 20, 22, 38, 62, 42, 34, 32, 4, 18, 8, 18, 34, 8, 4 + +__riscv_vsetvl_e16m8(2); +vuint16m8_t var_89 = __riscv_vle16_v_u16m8(var_90, 2); +// 0, 0 + +__riscv_vsetvl_e16m8(39); +vuint16m8_t var_84 = __riscv_vle16_v_u16m8(var_85, 39); +// 36, 34, 114, 6, 56, 128, 152, 122, 124, 84, 52, 34, 108, 58, 116, 24, 42, 76, 140, 144, 30, 98, 134, 22, 88, 60, 118, 92, 136, 150, 108, 62, 70, 50, 152, 78, 56, 52, 58 + +__riscv_vsetvl_e16m8(23); +vuint16m8_t var_79 = __riscv_vle16_v_u16m8(var_80, 23); +// 56, 26, 8, 38, 84, 44, 82, 36, 40, 44, 88, 12, 38, 82, 72, 10, 68, 54, 20, 88, 30, 24, 34 + +__riscv_vsetvl_e16m8(43); +vint16m8_t var_21 = __riscv_vle16_v_i16m8(var_78, 43); +// -5511, 15397, -4090, 16445, -10331, -5993, -14277, 4670, 13645, 28158, 28011, 11743, -17516, 22469, 25023, 11351, 29064, 4055, 21504, 21062, -26487, -21392, -21758, -2303, 2416, -5950, 1317, 25973, 24101, -17769, 16867, -5484, -18462, 4760, -7010, -13594, 9063, -24357, 6877, 32191, 20488, -28272, -14390 + +vint16m8_t var_22 = __riscv_vle16_v_i16m8(var_77, 43); +// -9272, 6480, 23710, -26200, -10002, 15766, 16296, 22542, -20837, -23948, 26261, 25825, 29785, -27571, 20391, 22236, -5484, -31468, -6557, -4992, -7302, -15536, 4982, 9881, 16502, -11417, -24719, -27524, -14185, 2026, 29115, 31200, -6220, 11180, 18656, -22473, -3476, 31030, -25960, -17740, 32565, -10169, -15162 + +vint8m4_t var_23 = __riscv_vle8_v_i8m4(var_76, 43); +// 57, -3, -103, 21, 52, -36, 52, -51, -105, 98, 83, 103, 114, -35, 102, -63, -68, -34, 78, 81, 114, -49, -60, 47, -34, -67, 39, -68, -125, 30, -108, -79, 69, 55, 21, -4, 123, 100, 35, 66, -58, -111, 123 + +__riscv_vsetvl_e16m2(16); +vint16m2_t var_24 = __riscv_vle16_v_i16m2(var_75, 16); +// -12646, 2213, 18070, -25056, 20976, 13975, 22983, -5316, 23375, 1375, 30183, -20303, -21873, -22498, -13300, 25563 + +__riscv_vsetvl_e16m8(23); +vuint16m8_t var_25 = __riscv_vle16_v_u16m8(var_74, 23); +// 10847, 47586, 21367, 56430, 60552, 49838, 906, 20140, 15972, 2432, 48332, 7048, 63008, 40299, 20052, 13973, 42746, 45489, 29260, 11899, 11897, 53839, 61489 + +vint16m8_t var_26 = __riscv_vle16_v_i16m8(var_73, 23); +// 5002, 10571, -15542, 26888, -93, -17789, 31891, 8998, -9045, -4977, -6086, -19325, 8565, 25188, -1205, 4422, -21197, 11152, -5851, 17451, 21681, -9264, -27896 + +__riscv_vsetvl_e8m4(43); +vint8m4_t var_27 = __riscv_vle8_v_i8m4(var_72, 43); +// -128, 27, -125, 81, 101, 93, 109, -84, 89, -55, 95, 63, 53, -83, 44, -68, 112, -118, -113, 66, 103, -82, -45, 70, 4, -100, -26, 50, 120, -6, -84, -3, 51, 30, -70, -72, 87, -114, -86, 20, -27, 91, -36 + +vint8m4_t var_28 = __riscv_vle8_v_i8m4(var_71, 43); +// 46, -55, 38, -91, -4, -52, -122, 8, -119, 32, -25, 50, -32, 7, -101, 67, 51, 49, 69, -63, 70, -8, 76, -106, -122, 4, -15, 112, -1, 55, -116, 15, -88, 35, 63, 42, 54, 23, 107, 67, 104, -59, -99 + +vuint8m4_t var_29 = __riscv_vle8_v_u8m4(var_70, 43); +// 227, 90, 33, 177, 193, 6, 63, 227, 151, 211, 162, 248, 135, 190, 160, 173, 153, 227, 227, 111, 175, 121, 98, 3, 249, 197, 131, 120, 149, 7, 36, 64, 118, 96, 94, 191, 142, 221, 242, 76, 208, 30, 7 + +vuint8m4_t var_30 = __riscv_vle8_v_u8m4(var_69, 43); +// 126, 146, 114, 95, 190, 25, 23, 215, 116, 98, 139, 9, 83, 252, 171, 206, 156, 41, 160, 253, 151, 15, 100, 135, 192, 187, 166, 238, 242, 249, 31, 197, 142, 15, 122, 153, 0, 71, 48, 161, 133, 60, 186 + +__riscv_vsetvl_e8mf4(4); +vint8mf4_t var_31 = __riscv_vle8_v_i8mf4(var_68, 4); +// -100, 52, 10, -108 + +__riscv_vsetvl_e16m8(39); +vuint16m8_t var_32 = __riscv_vle16_v_u16m8(var_67, 39); +// 30791, 32459, 39289, 50133, 53913, 48374, 15719, 9547, 28529, 15519, 26813, 22990, 62351, 47984, 32959, 25324, 32137, 16732, 63291, 54919, 40630, 3912, 64270, 16071, 36589, 3729, 38470, 25306, 58574, 39571, 47284, 3995, 52442, 17945, 38770, 12707, 15396, 39496, 45828 + +__riscv_vsetvl_e16m8(43); +vuint16m8_t var_34 = __riscv_vle16_v_u16m8(var_66, 43); +// 45618, 62692, 39356, 14082, 29123, 46469, 64388, 61757, 35123, 64621, 51420, 8965, 31645, 53358, 49100, 52945, 41586, 57867, 52741, 48479, 33678, 37157, 42709, 6424, 28769, 39681, 24575, 19532, 38277, 17703, 41691, 2212, 30429, 56201, 32882, 34302, 50077, 24423, 46580, 38670, 36911, 10324, 31124 + +__riscv_vsetvl_e16m8(16); +vint16m8_t var_36 = __riscv_vle16_v_i16m8(var_65, 16); +// -10538, 31070, -6546, -810, 5895, 18940, 16260, 26564, 7998, -16670, -20866, 15828, -26614, -24949, -19205, 495 + +vint16m8_t var_37 = __riscv_vle16_v_i16m8(var_64, 16); +// 13702, -18610, -12797, 19185, 21065, -2396, 16058, -20073, -26093, -25203, -24989, 6430, -20885, -6194, 19788, -19441 + +__riscv_vsetvl_e16m2(16); +vint16m2_t var_38 = __riscv_vle16_v_i16m2(var_63, 16); +// 11637, 14703, -7094, -28721, 27782, 10360, -14008, 7374, 11740, 22525, 16581, -437, -26907, 19495, 22176, 27240 + +__riscv_vsetvl_e8m4(43); +vuint8m4_t var_40 = __riscv_vle8_v_u8m4(var_62, 43); +// 160, 60, 44, 207, 248, 254, 160, 176, 101, 148, 47, 190, 145, 189, 116, 236, 114, 158, 203, 158, 24, 130, 148, 97, 129, 58, 75, 158, 53, 208, 206, 213, 220, 182, 59, 214, 91, 90, 229, 165, 62, 214, 6 + +vuint8m4_t var_41 = __riscv_vle8_v_u8m4(var_61, 43); +// 203, 135, 191, 188, 192, 161, 148, 127, 202, 125, 127, 98, 194, 32, 146, 37, 141, 160, 91, 217, 82, 91, 154, 66, 172, 117, 10, 184, 119, 252, 202, 152, 39, 132, 175, 20, 225, 160, 182, 153, 21, 145, 201 + +vint16m8_t var_42 = __riscv_vle16_v_i16m8(var_60, 43); +// 1598, -8821, -23423, -10042, -23921, -19702, 21693, -15108, 12119, -2074, 13483, -6254, -22188, -16141, -25471, -6047, 28605, -17302, 25119, -20212, 28410, 30522, -12565, 4887, 6405, -25476, 3974, -17684, 7450, -674, 27331, -3539, 3566, 14853, -5480, -7573, 27415, -21047, 19826, 21081, -29014, -21530, -16291 + +vint8m4_t var_45 = __riscv_vle8_v_i8m4(var_59, 43); +// -85, -43, 99, -52, 53, -81, 71, 39, 5, 30, 37, -61, 98, 104, -31, 93, 47, -87, 15, 110, 73, -5, -112, -85, -95, 16, -57, -81, 125, 99, 74, 67, -94, 15, -118, 58, 30, -46, -111, -111, -31, -111, -18 + +vint8m4_t var_46 = __riscv_vle8_v_i8m4(var_58, 43); +// 56, -35, -4, 36, -28, 88, 56, 2, 35, 79, 41, -113, 53, -46, -105, 59, 39, -89, -73, -71, 110, -91, 111, 99, 126, 32, -57, -106, -55, -60, 95, 11, 96, 38, 65, 56, 42, 104, -104, 44, 112, 64, -116 + +vuint16m8_t var_47 = __riscv_vle16_v_u16m8(var_57, 43); +// 40437, 1413, 18568, 7352, 56494, 35473, 28212, 7527, 6266, 15098, 64091, 31478, 56635, 42334, 35812, 34310, 10601, 59359, 58998, 10634, 4819, 44391, 5989, 61550, 18084, 21434, 9675, 33913, 45750, 32052, 32212, 8999, 30041, 7670, 21180, 19159, 48162, 57027, 50230, 35468, 22026, 40268, 51250 + +vuint8m4_t var_48 = __riscv_vle8_v_u8m4(var_56, 43); +// 122, 113, 82, 171, 243, 2, 238, 133, 100, 6, 18, 50, 109, 123, 144, 6, 189, 46, 60, 92, 12, 55, 0, 111, 82, 168, 245, 202, 73, 47, 74, 78, 227, 173, 114, 168, 72, 52, 158, 88, 208, 35, 179 + +vint16m8_t var_49 = __riscv_vle16_v_i16m8(var_55, 43); +// -16284, -13415, -19274, -8700, 26691, 13019, 8586, 7041, 27796, -28029, 29469, 10834, 28383, 5432, -20502, 21913, 30298, 19435, 26604, -20204, -18279, 8553, 5469, -28047, 25998, -2386, -24509, -6229, -27464, 11837, 30385, -5603, 20110, -32594, -28965, -17685, -23970, -3083, 158, 18622, -12954, -16606, -25145 + +vbool2_t var_20 = __riscv_vmadc_vx_i8m4_b2(var_23, var_53, 43); +// 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m2(16); +int16_t var_18 = __riscv_vmv_x_s_i16m2_i16(var_24); +// -12646 + +__riscv_vsetvl_e16m8(23); +__riscv_vse16_v_u16m8(var_83, var_25, 23); +__riscv_vsoxei16_v_i16m8(var_82, var_79, var_26, 23); +__riscv_vsetvl_e8m4(43); +vint8m4_t var_16 = __riscv_vor_vv_i8m4(var_27, var_28, 43); +// -82, -37, -89, -11, -3, -35, -17, -84, -39, -23, -1, 63, -11, -81, -65, -1, 115, -69, -49, -61, 103, -2, -33, -42, -122, -100, -9, 114, -1, -1, -84, -1, -69, 63, -65, -70, 119, -97, -21, 87, -19, -33, -35 + +vuint16m8_t var_15 = __riscv_vwsubu_vv_u16m8(var_29, var_30, 43); +// 101, 65480, 65455, 82, 3, 65517, 40, 12, 35, 113, 23, 239, 52, 65474, 65525, 65503, 65533, 186, 67, 65394, 24, 106, 65534, 65404, 57, 10, 65501, 65418, 65443, 65294, 5, 65403, 65512, 81, 65508, 38, 142, 150, 194, 65451, 75, 65506, 65357 + +__riscv_vsetvl_e8mf4(4); +int8_t var_14 = __riscv_vmv_x_s_i8mf4_i8(var_31); +// -100 + +__riscv_vsetvl_e16m8(39); +__riscv_vse16_v_u16m8(var_88, var_32, 39); +__riscv_vsetvl_e16m8(43); +vbool2_t var_33 = __riscv_vmsbc_vx_u16m8_b2(var_34, var_52, 43); +// 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m8(16); +vbool2_t var_35 = __riscv_vmsne_vv_i16m8_b2(var_36, var_37, 16); +// 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m2(16); +int16_t var_10 = __riscv_vmv_x_s_i16m2_i16(var_38); +// 11637 + +__riscv_vsetvl_e16m8(43); +vbool2_t var_39 = __riscv_vmadc_vx_i16m8_b2(var_42, var_51, 43); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool2_t var_44 = __riscv_vmsle_vv_i8m4_b2(var_45, var_46, 43); +// 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool2_t var_43 = __riscv_vmadc_vx_u16m8_b2(var_47, var_50, 43); +// 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vint16m8_t var_19 = __riscv_vdiv_vx_i16m8_mu(var_20, var_21, var_22, var_54, 43); +// 6, -4, -17, 16445, 7, -11, -12, -16, 15, 17, -19, -19, -21, 20, -15, -16, 4, 23, 4, 3, 5, 11, -3, -7, -12, 8, 18, 20, 10, -1, -21, -23, 4, -8, -7010, 16, 2, -22, 19, 13, -24, 7, 11 + +if(!check(var_83, var_128, var_129)) {cerr << "check 127 fails" << endl; return_value = 1;} +if(!check(var_82, var_125, var_126)) {cerr << "check 124 fails" << endl; return_value = 1;} +if(!check(var_88, var_131, var_132)) {cerr << "check 130 fails" << endl; return_value = 1;} +vuint16m8_t var_8 = __riscv_vwmulu_vv_u16m8_mu(var_39, var_15, var_40, var_41, 43); +// 101, 65480, 65455, 82, 3, 65517, 40, 12, 35, 18500, 23, 18620, 52, 65474, 65525, 8732, 65533, 186, 67, 65394, 24, 106, 65534, 65404, 57, 10, 65501, 65418, 65443, 52416, 5, 32376, 65512, 81, 10325, 38, 142, 150, 194, 65451, 75, 65506, 65357 + +vbool2_t var_6 = __riscv_vmsge_vv_i8m4_b2_mu(var_43, var_44, var_16, var_16, 43); +// 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e16m8(39); +__riscv_vsoxei16_v_i16m8(var_87, var_84, var_19, 39); +__riscv_vsetvl_e16m8(43); +vint16m8_t var_12 = __riscv_vmerge_vxm_i16m8(var_19, var_18, var_33, 43); +// 6, -4, -17, -12646, 7, -11, -12, -16, 15, 17, -19, -12646, -21, 20, -15, -16, 4, 23, 4, 3, 5, 11, -3, -12646, -12, 8, 18, -12646, 10, -12646, -21, -12646, 4, -8, -7010, 16, 2, -22, 19, 13, -24, -12646, 11 + +__riscv_vse16_v_u16m8(var_105, var_8, 43); +if(!check(var_87, var_122, var_123)) {cerr << "check 121 fails" << endl; return_value = 1;} +vint8m4_t var_5 = __riscv_vnsra_wv_i8m4(var_12, var_48, 43); +// 0, -2, -5, -7, 0, -3, -1, -1, 0, 0, -5, -90, -1, 0, -15, -1, 0, 0, 0, 0, 0, 0, -3, -1, -3, 0, 0, -13, 0, -1, -1, -1, 0, -1, 39, 0, 0, -2, 0, 0, -24, -45, 1 + +vint16m8_t var_4 = __riscv_vssub_vx_i16m8_mu(var_6, var_12, var_49, var_10, 43); +// -27921, -25052, -17, -20337, 15054, 1382, -12, -16, 16159, -32768, 17832, -12646, 16746, 20, -15, -16, 4, 7798, 14967, 3, -29916, 11, -6168, -32768, 14361, -14023, -32768, -12646, 10, -12646, 18748, -12646, 8473, -32768, -32768, 16, -32768, -14720, -11479, 6985, -24591, -28243, 11 + +__riscv_vsetvl_e16m8(16); +vint16m8_t var_11 = __riscv_vdiv_vv_i16m8_mu(var_35, var_12, var_12, var_12, 16); +// 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 23, 4, 3, 5, 11, -3, -12646, -12, 8, 18, -12646, 10, -12646, -21, -12646, 4, -8, -7010, 16, 2, -22, 19, 13, -24, -12646, 11 + +if(!check(var_105, var_134, var_135)) {cerr << "check 133 fails" << endl; return_value = 1;} +__riscv_vsetvl_e8m4(43); +vint16m8_t var_1 = __riscv_vwmacc_vx_i16m8_mu(var_6, var_4, var_14, var_5, 43); +// -27921, -24852, -17, -19637, 15054, 1682, -12, -16, 16159, -32768, 18332, -12646, 16846, 20, -15, -16, 4, 7798, 14967, 3, -29916, 11, -5868, -32668, 14661, -14023, -32768, -12646, 10, -12646, 18848, -12646, 8473, -32668, 28868, 16, -32768, -14520, -11479, 6985, -22191, -23743, 11 + +__riscv_vsetvl_e16m8(13); +__riscv_vsoxei16_v_i16m8(var_97, var_95, var_4, 13); +__riscv_vsetvl_e16m8(35); +__riscv_vsoxei16_v_i16m8(var_100, var_98, var_4, 35); +__riscv_vsetvl_e16m8(16); +__riscv_vsoxei16_v_i16m8(var_94, var_92, var_11, 16); +__riscv_vsetvl_e16m8(2); +__riscv_vsoxei16_v_i16m8(var_91, var_89, var_11, 2); +__riscv_vsetvl_e16m8(43); +__riscv_vsoxei16_v_i16m8(var_104, var_101, var_1, 43); +if(!check(var_97, var_113, var_114)) {cerr << "check 112 fails" << endl; return_value = 1;} +if(!check(var_100, var_110, var_111)) {cerr << "check 109 fails" << endl; return_value = 1;} +if(!check(var_94, var_116, var_117)) {cerr << "check 115 fails" << endl; return_value = 1;} +if(!check(var_91, var_119, var_120)) {cerr << "check 118 fails" << endl; return_value = 1;} +if(!check(var_104, var_107, var_108)) {cerr << "check 106 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +} diff --git a/gcc/testsuite/g++.target/riscv/rvv/base/bug-9.C b/gcc/testsuite/g++.target/riscv/rvv/base/bug-9.C new file mode 100644 index 00000000000..9afcbf391e1 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/rvv/base/bug-9.C @@ -0,0 +1,580 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ +/* { dg-skip-if "" { riscv32-*-* } } */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include"riscv_vector.h" + +using std::addressof; +using std::cerr; +using std::endl; +using std::int8_t; +using std::int16_t; +using std::int32_t; +using std::int64_t; +using std::uint8_t; +using std::uint16_t; +using std::uint32_t; +using std::uint64_t; +using std::ptrdiff_t; +using std::size_t; +using float16_t = _Float16; +using float32_t = float; +using float64_t = double; + +template +constexpr T uint_to_float(T2 val) noexcept +{ + return *reinterpret_cast(&val); +} + +constexpr const auto &f16(uint_to_float); +constexpr const auto &f32(uint_to_float); +constexpr const auto &f64(uint_to_float); + +template +struct To_uint +{ + using type = std::conditional_t< + sizeof(T) == 1, uint8_t, std::conditional_t< + sizeof(T) == 2, uint16_t, std::conditional_t< + sizeof(T) == 4, uint32_t, std::conditional_t< + sizeof(T) == 8, uint64_t, void + > + > + > + >; +}; + +// isnan() does not support half type +template +struct To_float +{ + using type = std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, float, std::conditional_t< + std::is_same::value, double, float + > + > + >; +}; + +template +using To_uint_t = typename To_uint::type; + +template +using To_isnan_float = typename To_float::type; + +template +void print_float(std::ostream &os, T val) +{ + using std::setw; + os << std::hex << std::setfill('0') << setw(sizeof(T) * 2) << *reinterpret_cast*>(addressof(val)) << setw(0) << std::dec; +} + +template +bool __attribute__((noinline)) +check(const T *a, const T *b, size_t size) +{ + bool rv = true; + for (size_t i = 0; i < (size / sizeof(T)); ++i) { + if (reinterpret_cast *>(a)[i] == + reinterpret_cast *>(b)[i]) + continue; + // floating negative zero == positive zero + if ((std::is_floating_point_v || std::is_same::value) && + (a[i] == b[i])) + continue; + // if both result are NaN, return true + if ((std::is_same::value || std::is_floating_point_v) && + std::isnan(static_cast>(a[i])) && + std::isnan(static_cast>(b[i]))) + continue; + + if (std::is_same::value) { + cerr << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << "[" + << i + << "] result/golden:" << reinterpret_cast *>(a)[i] + << " != " << reinterpret_cast *>(b)[i] + << std::setw(0) << std::dec << endl; + } else if constexpr (std::is_floating_point_v) { + cerr << "[" << i << "] result/golden:" << a[i] << "("; + print_float(cerr, a[i]); + cerr << ") != " << b[i] << "("; + print_float(cerr, b[i]); + cerr << ")" << endl; + } else if constexpr (std::is_unsigned_v) { + cerr << "[" << i << "] result/golden: " << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } else { + cerr << "[" << i << "] result/golden:" << static_cast(a[i]) + << " != " << static_cast(b[i]) << endl; + } + rv = false; + } + return rv; +} + +template +bool __attribute__((noinline)) +check(const T a, const T golden) +{ + return check(addressof(a), addressof(golden), sizeof(T)); +} + + + +int main() +{ +int return_value = 0; + +size_t var_211 = 16u; +uint64_t var_210 [] = {3413955448782123771u, 5770915057685053022u}; +size_t var_208 = 40u; +uint64_t var_207 [] = {11686681238268631633u, 17217089646841358934u, 4917608144621004608u, 2800347682848664045u, 13139172270140052590u}; +size_t var_205 = 64u; +uint64_t var_204 [] = {2155812772479464600u, 3170612777771403051u, 1681134711641298423u, 8156897225395734044u, 17350593003963396555u, 15651252092822179957u, 8877172929823018199u, 10633166244594888701u}; +size_t var_202 = 56u; +uint64_t var_201 [] = {7116734975071460602u, 12441625220002408740u, 2786654427366964938u, 13829764222335973050u, 4762436333200299360u, 11395394244577961796u, 8944665256461003018u}; +size_t var_199 = 8u; +uint64_t var_198 [] = {5797432571859372123u}; +size_t var_196 = 48u; +uint64_t var_195 [] = {12379964670789626889u, 13436296814432206489u, 4659013173841538396u, 6196494238874966981u, 6730617828857168898u, 8296127193014163030u}; +size_t var_193 = 128u; +uint64_t var_192 [] = {1922947498486410857u, 16951704142057129556u, 5388344212325078882u, 5448258397625405342u, 1703194961276899101u, 9646419556518517367u, 16273654145082032307u, 3551281066422685306u, 10669730802081923878u, 8008712173776472922u, 5606540849143552077u, 17565367472452138214u, 2648738666890881870u, 2998195017278264134u, 2065211952219847096u, 18169511136733880014u}; +size_t var_190 = 88u; +uint64_t var_189 [] = {15401374053725176026u, 15159971213859746434u, 15996044860437899159u, 10024478611893507882u, 17312537202804145326u, 13286484462280416129u, 5653446096408344014u, 1589575317326256715u, 1256266953356618611u, 5852474666329482281u, 8236254411035780100u}; +size_t var_187 = 64u; +uint64_t var_186 [] = {1280769246380200460u, 14023690319710955253u, 13247119119507366408u, 7767358375133657872u, 10775238306218042028u, 6738525377594107821u, 1491839643263654600u, 17664969632620412524u}; +size_t var_184 = 56u; +uint64_t var_183 [] = {11601634546274575695u, 18347035667798957494u, 13451989570814404378u, 456765431602104240u, 10052606093390301498u, 2437914183458767421u, 1539225365727642394u}; +size_t var_181 = 256u; +float64_t var_180 [] = {f64(6187698773816159056u), f64(9776498580032912749u), f64(18269226306426886945u), f64(12870129469455680428u), f64(8111286762322373945u), f64(9289281457567414133u), f64(10639002934180078457u), f64(6195007212266041285u), f64(10865104194439280749u), f64(12224740054729171255u), f64(9698718863891634989u), f64(16464479761714716521u), f64(10670676975682736140u), f64(8962998596501157150u), f64(8766120491176435417u), f64(2717371620507294816u), f64(3837943005303818774u), f64(5129903549361771946u), f64(17642969427757166520u), f64(4007765606054665226u), f64(1647027738278082783u), f64(10690219188164819365u), f64(15228053371569790034u), f64(10344531484724988184u), f64(710760864140949770u), f64(15615459515851778470u), f64(9927951426822621308u), f64(4957518843951601594u), f64(7641934781991551769u), f64(14252201341143490410u), f64(10241407868670681836u), f64(8264550004758408330u)}; +// 4.4611521076973743e+105, -1.0758468088979187e-271, -5.176835491667206e+296, -6.619601004503453e-65, 1.6970322567792563e+234, -2.979938591390489e-304, -4.950276524818289e-214, 1.438417155610527e+106, -6.428709007665846e-199, -4.896911894513031e-108, -6.986997664109763e-277, -1.1706628228396777e+176, -6.493431793743611e-212, 1.4787708549897394e+291, 1.0421560948913072e+278, 5.088139069960686e-127, 3.990899891565144e-52, 8.867669768871947e+34, -7.161121366560219e+254, 8.736910566334191e-41, 1.432775837239442e-198, -1.2969217753816681e-210, -2.726501234875066e+93, -9.799637510894672e-234, 3.7003426124468857e-261, -2.1441371653352167e+119, -1.4715600945527723e-261, 2.705444685329441e+23, 7.251873910049452e+202, -1.6087437906676368e+28, -1.2589823680213738e-240, 3.000901131149856e+244 + +size_t var_178 = 256u; +float64_t var_177 [] = {f64(12268982402006723053u), f64(1322662639198263372u), f64(10892092016535164825u), f64(14850734564898422239u), f64(4523747090804693057u), f64(15313422636296236341u), f64(6682154344242841459u), f64(8061073346680340919u), f64(6867894128954076650u), f64(2628301318073533989u), f64(10642317549290804120u), f64(16892802778425156682u), f64(16296392560269218515u), f64(4745368322886126618u), f64(2775903153273905952u), f64(4227008168332205515u), f64(1428962108255738703u), f64(15685550439166428737u), f64(8721174667886690300u), f64(6389093016280766630u), f64(915371217100750559u), f64(13102858936469556209u), f64(14325435142686572326u), f64(13100434734449401387u), f64(16751290947827411650u), f64(3724510073455636207u), f64(13176800956873038965u), f64(17108147774706966430u), f64(10272006816657832197u), f64(2166840198934152003u), f64(3126865544766700112u), f64(3984812247613312207u)}; +// -4.3997420428351414e-105, 2.992377506963031e-220, -4.094307940460808e-197, -1.6450844168843733e+68, 2.8107367677455903e-06, -1.381116861022872e+99, 5.1692570320776656e+138, 7.443728610914345e+230, 1.2955022920890574e+151, 5.635813034929725e-133, -7.93999595358361e-214, -4.905389684561529e+204, -7.030330639871949e+164, 1807574008.0749574, 4.157950442133119e-123, 4.09547138485164e-26, 3.8417697419442373e-213, -1.0004951443736317e+124, 1.0315950134023327e+275, 1.3424750996227978e+119, 1.7924122107403712e-247, -2.427530528447156e-49, -1.2238156964734415e+33, -1.608666481217323e-49, -1.7914323013217252e+195, 1.0030184333291902e-59, -2.0599789696372077e-44, -1.2509772089128461e+219, -1.4156718618632884e-238, 7.88506931791861e-164, 1.1920211310425338e-99, 2.5915707560738407e-42 + +size_t var_175 = 256u; +float64_t var_174 [] = {f64(2300673783722258919u), f64(3467781142773234771u), f64(2345233581152263551u), f64(1868587953186126122u), f64(14774452287169263094u), f64(13922652697835041731u), f64(2386878503535424367u), f64(16547495967924420906u), f64(8942958103762160449u), f64(3567426388470419897u), f64(8511350044499123665u), f64(15485424648914767536u), f64(18041792644663864377u), f64(16469534312049021029u), f64(14429124106383846452u), f64(4626547782719094966u), f64(16292164099935306522u), f64(6083025255475019503u), f64(3059779533977631997u), f64(18445158560006719557u), f64(319680150795867099u), f64(4740419680481906389u), f64(1941324043466159959u), f64(9897452317974437047u), f64(9477233337600713314u), f64(13752614432306922614u), f64(5813536777454517309u), f64(5288450412570259281u), f64(1967956071157440815u), f64(480961478938269997u), f64(8707019076078059829u), f64(11673730106455029722u)}; +// 6.9071744526170175e-155, 6.923400865513078e-77, 6.6691704148362785e-152, 8.989536893970336e-184, -1.3060543175303795e+63, -1520349.006217227, 3.8975989077786173e-149, -4.256422679919585e+181, 6.765582943934791e+289, 3.26810917231141e-70, 9.34508116044192e+260, -4.373920489375915e+110, -3.1445758471145765e+281, -2.4962431291505274e+176, -1.0394464537775981e+40, 20.799593290256517, -3.6558900666657e+164, 4.6559448455176147e+98, 3.927729333541973e-104, nan, 2.604906894646101e-287, 850733770.7895151, 6.542829947198155e-179, -1.3305439476683419e-263, -1.0971075979162187e-291, -6.4614803614591834e-06, 4.4214616749469996e+80, 3.630582797776415e+45, 3.8971392710020073e-177, 1.6200731142167154e-276, 1.1655694468313672e+274, -6.975510498054295e-145 + +size_t var_172 = 256u; +float64_t var_171 [] = {f64(13145979413242798804u), f64(18249049212272875542u), f64(5686275838205320814u), f64(12870065405008121229u), f64(15805617088064363265u), f64(3117616025036960168u), f64(7870459193100051406u), f64(3315587624886762670u), f64(14216093991953321985u), f64(6167009503567322368u), f64(5975854712965768936u), f64(1416387832014661521u), f64(11346221027479399797u), f64(4353915784447293972u), f64(6406040773904701275u), f64(17372403961692722173u), f64(13460688990661137053u), f64(5732641488031677947u), f64(8302093860329706908u), f64(8215692482325664371u), f64(12755166353681822613u), f64(7343163571706921621u), f64(6870297400155601231u), f64(17333100453460500437u), f64(4003950932397511804u), f64(14059799586156460318u), f64(9475401553823698285u), f64(4490512161850491093u), f64(14784584775073250232u), f64(16914986396484564094u), f64(17691693453950978772u), f64(6279794993919638703u)}; +// -1.7461975733798845e-46, -2.254087553597392e+295, 1.4195485286653068e+72, -6.56557059752003e-65, -1.1016163011924826e+132, 2.8570537732987263e-100, 1.405831311328661e+218, 4.859391936026342e-87, -6.216679631024869e+25, 1.9368435102568067e+104, 3.1065594384724844e+91, 5.574344229526038e-214, -9.273922549336407e-167, 1.223681041535281e-17, 1.8421677350513206e+120, -5.895455415968474e+236, -1.937018094571547e-25, 1.7207015532833868e+75, 1.0034462709138033e+247, 1.6672588912213468e+241, -1.3763203172142895e-72, 8.019409183696546e+182, 1.9803645707206568e+151, -1.3683560131281643e+234, 4.847550088368645e-41, -2142187190128199.5, -7.863533030929549e-292, 1.6301853792973474e-08, -6.046522871793079e+63, -1.5101313690964458e+206, -1.2925742773419124e+258, 6.707760764200356e+111 + +size_t var_169 = 256u; +float64_t var_168 [] = {f64(13224541104105447859u), f64(15997926192552457056u), f64(4094401123071894779u), f64(1545273865987701927u), f64(15659828517197660337u), f64(6915099360988292381u), f64(8958927779396419652u), f64(8685124436318166792u), f64(11977899365095451790u), f64(7576084845947023205u), f64(11316065961843452656u), f64(14752197883205700933u), f64(17170357365308316348u), f64(16822887611204495095u), f64(929241872652159986u), f64(2416525204936783495u), f64(15618689276009020277u), f64(3390556701043326625u), f64(8619163760572831983u), f64(10045360014138332961u), f64(6473997592331735548u), f64(6092137062352193108u), f64(3920024461294893156u), f64(5925543705618177486u), f64(3040463253665551873u), f64(7832216569604445537u), f64(3260652848984743697u), f64(5264387754046825011u), f64(12437208545964732727u), f64(18032103368874551954u), f64(10928493007737974437u), f64(8736180249753791438u)}; +// -3.301497051880758e-41, -7.824357091719868e+144, 5.48735852433986e-35, 2.232103621266717e-205, -1.950836146289716e+122, 1.9582178940580678e+154, 7.99321150819077e+290, 4.0167944017799746e+272, -1.5391400570269561e-124, 2.939249845694959e+198, -8.857511628261053e-169, -4.231905412538173e+61, -1.833646749363425e+223, -1.0956913814650382e+200, 1.525354422288766e-246, 3.9450657524151244e-147, -3.37529024887866e+119, 4.888478223185148e-82, 1.5178661307387018e+268, -1.0352474730035452e-253, 6.4148349766401e+124, 1.8877801849557373e+99, 1.2439000706934742e-46, 1.3805781208153196e+88, 1.9506651391806318e-105, 3.796953938141276e+215, 9.920037370309857e-91, 8.603177109513668e+43, -7.742646945720953e-94, -7.011301093277985e+280, -1.104748850672612e-194, 1.0091390349968425e+276 + +size_t var_166 = 256u; +float64_t var_165 [] = {f64(13033630116291160682u), f64(13772017025171702634u), f64(16452570950244089285u), f64(10209873756352972180u), f64(17119853242907834613u), f64(14245066108076568688u), f64(17699335364636616925u), f64(3116209871420214325u), f64(14463765876127797749u), f64(18031450949543799456u), f64(9210760816764462022u), f64(12120025697351591259u), f64(16995241348632377744u), f64(7915899406135338251u), f64(406377938911823835u), f64(16065803484180075706u), f64(14968592841381640912u), f64(1043738279784612710u), f64(15175473985883537247u), f64(13199875443726906855u), f64(15788495357954902769u), f64(17993851087565454968u), f64(12586360954608982297u), f64(4415008118551710253u), f64(17150087706896440098u), f64(11615746700657174614u), f64(6938776541782514361u), f64(3490026499357013992u), f64(10928968634653961674u), f64(10625417857303851178u), f64(8065318126631907784u), f64(11133154175594107343u)}; +// -5.466899617959982e-54, -0.00012232414246285, -1.9068052426878134e+175, -9.817245583224469e-243, -7.743726959095287e+219, -5.150207386507462e+27, -4.005015332238227e+258, 2.214640668568439e-100, -2.2317187718408813e+42, -6.485377075266914e+280, 5.391940644291987e+307, -4.817288312673622e-115, -3.5803659177737863e+211, 1.5206806950059204e+221, 1.6995712452525845e-281, -2.7107509173254475e+149, -1.2268777941161214e+76, 6.743419999793945e-239, -8.311747154223234e+89, -7.0352015396959275e-43, -7.764425028177321e+130, -2.0386407935305358e+278, -7.138820689120118e-84, 1.5105950122009423e-13, -7.839999953325312e+221, -9.493370139050926e-149, 7.370629774472962e+155, 2.1462525702061535e-75, -1.177085676167517e-194, -6.11129595835773e-215, 1.4441344931021933e+231, -5.09370538181253e-181 + +size_t var_163 = 256u; +float64_t var_162 [] = {f64(2632921265178571059u), f64(7739823830606308283u), f64(17697032702367856286u), f64(5624473324698136339u), f64(1188717030892108108u), f64(10606512620327013719u), f64(978729597025812214u), f64(8118890521685184687u), f64(11007430839376624032u), f64(2348795760367716774u), f64(1666052550638850530u), f64(14766276574517822248u), f64(10218395580884964891u), f64(12864696557087944463u), f64(3179091509485438472u), f64(12860044981525174075u), f64(7151919826670670809u), f64(14826929065008683114u), f64(13933918488568616870u), f64(15897872117805872548u), f64(8685067125261860160u), f64(11984743900469710868u), f64(1136675127470815317u), f64(969291925713753836u), f64(2070265963710882159u), f64(7885445542263917712u), f64(13056849031755908653u), f64(13101601188901844550u), f64(10901757296049235944u), f64(4705400189456856572u), f64(7109449830182884890u), f64(13160060282619420098u)}; +// 1.1453608349705888e-132, 2.6072597653252422e+209, -2.9417641187959127e+258, 1.0158277633751194e+68, 3.2124591426633125e-229, -3.24575766418193e-216, 3.0969364862449104e-243, 5.58278810533562e+234, -2.048039168742427e-189, 1.1741851527965889e-151, 2.5925802850748534e-197, -3.6448917413702844e+62, -3.6360331565189224e-242, -2.917920547847776e-65, 3.558295462025385e-96, -1.4277604418874809e-65, 1.2622695056025323e+170, -4.177465611769624e+66, -8184873.255941307, -1.5432460055462645e+138, 3.9823733042040855e+272, -4.3404967266843524e-124, 1.1212265530695812e-232, 7.182391930036128e-244, 2.8010811508046684e-170, 1.3559786058413101e+219, -2.009392564122529e-52, -1.949809438996329e-49, -1.7941070300540528e-196, 3793173.5205600243, 1.904646631992245e+167, -1.569995522922617e-45 + +size_t var_160 = 256u; +float64_t var_159 [] = {f64(14399718874005915098u), f64(15571815439736755123u), f64(15184880873889889051u), f64(9847979870979827366u), f64(12421407484372908519u), f64(7713300078375383008u), f64(2092709178248925316u), f64(6013523761173124620u), f64(8690015471402520246u), f64(7665390200081996829u), f64(12474830707341252676u), f64(2806689855448223324u), f64(2930519840717419624u), f64(7557401689543362471u), f64(6194550792424245657u), f64(10363031979926300333u), f64(210521861724201706u), f64(7426682387493218810u), f64(10159668005810775079u), f64(7834135109053839824u), f64(10035779077385053057u), f64(10929870836272427382u), f64(11180733598665910010u), f64(6988926481853656685u), f64(10302766308584164910u), f64(2362866735761578619u), f64(16566436948637593932u), f64(7657618613119722783u), f64(2704140616799128185u), f64(14022246625121577556u), f64(16360055489489409415u), f64(5848231571965353358u)}; +// -1.173879235740122e+38, -2.5810004906693034e+116, -3.5054832194770695e+90, -6.554597307406097e-267, -6.630856606830876e-95, 4.3577672186230927e+207, 8.875460424589357e-169, 1.0600734757558945e+94, 8.498977317699981e+272, 2.655056358903447e+204, -2.4163244305828842e-91, 4.687153285841857e-121, 8.867909590829656e-113, 1.6150294500628063e+197, 1.345442791805468e+106, -1.6994033973485e-232, 1.3663132941226661e-294, 2.93717316375549e+188, -4.346659678864265e-246, 5.2655009521218076e+215, -2.3709150338905216e-254, -1.3142991072045571e-194, -8.003307628270562e-178, 1.6285887920683165e+159, -1.6449565503335684e-236, 1.0153452684011588e-150, -7.903053294195814e+182, 8.358041199622042e+203, 6.64698250963969e-128, -6879477289642.582, -1.2545086730594271e+169, 9.520710064215625e+82 + +size_t var_157 = 256u; +float64_t var_156 [] = {f64(7255389652619498159u), f64(11863592198503758248u), f64(1969861952934041841u), f64(14465802635759213596u), f64(11987915719740930989u), f64(8348926455447142360u), f64(18125216623108691390u), f64(3871463617952730428u), f64(13438223262881941206u), f64(4221934333025834245u), f64(4996973116443597634u), f64(17474422668216801327u), f64(11725728403266292315u), f64(7035920488256748319u), f64(14861010728333006889u), f64(3059446796589634216u), f64(16594761466888570085u), f64(12940937831007012101u), f64(16899747385326341061u), f64(10970432581561643055u), f64(15997942716186654365u), f64(9188923438452309560u), f64(10714463679512932715u), f64(10214480283686026984u), f64(2157908360834425177u), f64(16195744088095360215u), f64(6298184597360631864u), f64(2384636251274771142u), f64(768186602526962554u), f64(11394792936284522431u), f64(10786182531884216994u), f64(7168677360139691009u)}; +// 1.0334573093152597e+177, -3.512642050519687e-132, 5.516797633442999e-177, -2.93653754293034e+42, -7.003982839140666e-124, 1.3131484076683424e+250, -1.2231619672889087e+287, 7.003111936882136e-50, -6.0906836879560264e-27, 1.8840860783382415e-26, 1.1999673595322263e+26, -3.7597876802005495e+243, -2.1449060009502597e-141, 2.318173484551994e+162, -7.795763884493084e+68, 3.721560354577447e-104, -6.041388700192658e+184, -3.6477524459116975e-60, -1.502660994358613e+205, -6.752064838664454e-192, -7.847264381607677e+144, 1.8972327765919883e+306, -5.299231972045231e-209, -2.0062927209415055e-242, 2.0003256246037705e-164, -1.293434978849255e+158, 1.1373563518337742e+113, 2.924164175177123e-149, 2.6168617111373365e-257, -1.6007971485693217e-163, -3.233003820801041e-204, 1.7063211043344023e+171 + +size_t var_154 = 256u; +float64_t var_153 [] = {f64(3105541477770240205u), f64(15227122452644821730u), f64(11678207403249918316u), f64(11128540721469280860u), f64(18275261683157975961u), f64(6461767542735320167u), f64(3109276659177311872u), f64(4266815001250444883u), f64(1612238301678626405u), f64(14093772356554162507u), f64(4201917729312711379u), f64(2860219621414878541u), f64(150937946329558483u), f64(14210177997135595118u), f64(16665578249559877062u), f64(8155633507205672198u), f64(14839034989466928520u), f64(6138980857711264887u), f64(15729868420075129818u), f64(10582523735765810008u), f64(12889391048551104296u), f64(18433971604506014850u), f64(8676317621761077002u), f64(9342788639089810943u), f64(1891945788602585138u), f64(10298412558729337383u), f64(12420181664158716352u), f64(15074325653973558305u), f64(1221095909190347100u), f64(6952866046159325456u), f64(6747173569448055456u), f64(3770367332817146332u)}; +// 4.482597982526992e-101, -2.2953290459445205e+93, -1.3876185986783294e-144, -2.488068483251321e-181, -1.2578064004084964e+297, 9.522490838457363e+123, 7.990095590127968e-101, 1.8836573331597036e-23, 6.495575795920485e-201, -4.168142169120652e+17, 8.184258530893848e-28, 1.7390228660324606e-117, 1.4477864297130512e-298, -2.5017207003516037e+25, -3.3455037516407536e+189, 1.5582739660028077e+237, -2.598482837820986e+67, 2.5254895685248244e+102, -9.381689972569665e+126, -8.123708368435597e-218, -1.2394290799474622e-63, -5.231026904268411e+307, 1.0342864302420205e+272, -1.1317219513511448e-300, 3.302660128750505e-182, -8.388294784296539e-237, -5.496155351184002e-95, -1.423835876822299e+83, 4.80278823243729e-227, 6.337561690461767e+156, 1.1447935694863294e+143, 1.2130182497903373e-56 + +size_t var_151 = 256u; +float64_t var_150 [] = {f64(12874656926157541625u), f64(10984361015792627889u), f64(4749994239954255872u), f64(2507944306858608414u), f64(2540008438893585319u), f64(3503256139372151119u), f64(15438029745595274859u), f64(16289407516372582417u), f64(11439186572662330235u), f64(2275939344695701572u), f64(6325322638742505882u), f64(12773319639513182300u), f64(12091917200326777123u), f64(14901662909839393349u), f64(14362263934758655200u), f64(10322547615606009407u), f64(12020404286899312514u), f64(11715727083193098381u), f64(7789781619114644950u), f64(4420926019493481983u), f64(6961562765584694572u), f64(9447434243951189849u), f64(9773179847478454830u), f64(5113924339932864446u), f64(11836669285237257358u), f64(1714811448298014619u), f64(2974566882611829175u), f64(12171651892852916674u), f64(1942383630757053263u), f64(14427654890492813348u), f64(7949545421220510370u), f64(10842857940942377413u)}; +// -1.3279442969267285e-64, -5.7126034259879e-191, 3673473517.0, 4.9216388223873334e-141, 6.7016535128759384e-139, 1.6617926499019489e-74, -2.8347139154509724e+107, -2.2747158128529418e+164, -1.4363121221015763e-160, 1.584958734257381e-156, 7.406426345287954e+114, -2.2579664519032115e-71, -6.170299816256117e-117, -4.050173433306196e+71, -3.533158536686456e+35, -3.3526906713116416e-235, -1.031969187757535e-121, -4.638193538312987e-142, 5.6522712684828104e+212, 3.735229714087532e-13, 2.4403723366100964e+157, -1.0971595804690102e-293, -6.399472919878548e-272, 7.888706862480327e+33, -5.584975159330578e-134, 4.834667193907169e-194, 7.911972107345559e-110, -1.3718912362953205e-111, 7.994338278617173e-179, -8.618291512517948e+39, 2.6689428921546715e+223, -2.087800215285169e-200 + +uint64_t var_148 [] = {10110301610812824219u, 18440176424075637850u}; +float64_t var_147 [] = {f64(12874656926157541625u), f64(10984361015792627889u), f64(14503716710727919861u), f64(2507944306858608414u), f64(2540008438893585319u), f64(3503256139372151119u), f64(15438029745595274859u), f64(16289407516372582417u), f64(11439186572662330235u), f64(2275939344695701572u), f64(6325322638742505882u), f64(12773319639513182300u), f64(12091917200326777123u), f64(14901662909839393349u), f64(14362263934758655200u), f64(10322547615606009407u), f64(12020404286899312514u), f64(11715727083193098381u), f64(7789781619114644950u), f64(4420926019493481983u), f64(6961562765584694572u), f64(9447434243951189849u), f64(9773179847478454830u), f64(5113924339932864446u), f64(11836669285237257358u), f64(1714811448298014619u), f64(2974566882611829175u), f64(12171651892852916674u), f64(1942383630757053263u), f64(14427654890492813348u), f64(7949545421220510370u), f64(10842857940942377413u)}; +// -1.3279442969267285e-64, -5.7126034259879e-191, -1.0504878265636506e+45, 4.9216388223873334e-141, 6.7016535128759384e-139, 1.6617926499019489e-74, -2.8347139154509724e+107, -2.2747158128529418e+164, -1.4363121221015763e-160, 1.584958734257381e-156, 7.406426345287954e+114, -2.2579664519032115e-71, -6.170299816256117e-117, -4.050173433306196e+71, -3.533158536686456e+35, -3.3526906713116416e-235, -1.031969187757535e-121, -4.638193538312987e-142, 5.6522712684828104e+212, 3.735229714087532e-13, 2.4403723366100964e+157, -1.0971595804690102e-293, -6.399472919878548e-272, 7.888706862480327e+33, -5.584975159330578e-134, 4.834667193907169e-194, 7.911972107345559e-110, -1.3718912362953205e-111, 7.994338278617173e-179, -8.618291512517948e+39, 2.6689428921546715e+223, -2.087800215285169e-200 + +uint64_t var_145 [] = {16u, 16u}; +float64_t var_143 [] = {f64(3105541477770240205u), f64(11645929167617686076u), f64(11678207403249918316u), f64(11128540721469280860u), f64(18275261683157975961u), f64(6461767542735320167u), f64(3109276659177311872u), f64(4266815001250444883u), f64(1612238301678626405u), f64(14093772356554162507u), f64(4201917729312711379u), f64(2860219621414878541u), f64(150937946329558483u), f64(14210177997135595118u), f64(16665578249559877062u), f64(8155633507205672198u), f64(14839034989466928520u), f64(6138980857711264887u), f64(15729868420075129818u), f64(10582523735765810008u), f64(12889391048551104296u), f64(18433971604506014850u), f64(8676317621761077002u), f64(9342788639089810943u), f64(1891945788602585138u), f64(10298412558729337383u), f64(12420181664158716352u), f64(15074325653973558305u), f64(1221095909190347100u), f64(6952866046159325456u), f64(6747173569448055456u), f64(3770367332817146332u)}; +// 4.482597982526992e-101, -9.588681720006641e-147, -1.3876185986783294e-144, -2.488068483251321e-181, -1.2578064004084964e+297, 9.522490838457363e+123, 7.990095590127968e-101, 1.8836573331597036e-23, 6.495575795920485e-201, -4.168142169120652e+17, 8.184258530893848e-28, 1.7390228660324606e-117, 1.4477864297130512e-298, -2.5017207003516037e+25, -3.3455037516407536e+189, 1.5582739660028077e+237, -2.598482837820986e+67, 2.5254895685248244e+102, -9.381689972569665e+126, -8.123708368435597e-218, -1.2394290799474622e-63, -5.231026904268411e+307, 1.0342864302420205e+272, -1.1317219513511448e-300, 3.302660128750505e-182, -8.388294784296539e-237, -5.496155351184002e-95, -1.423835876822299e+83, 4.80278823243729e-227, 6.337561690461767e+156, 1.1447935694863294e+143, 1.2130182497903373e-56 + +uint64_t var_142 [] = {8u}; +uint64_t var_140 [] = {2174953555673768977u, 2225785007977329183u, 17185955649875337423u, 15256053411745002566u, 1493105653971291160u}; +float64_t var_139 [] = {f64(13879594102898563438u), f64(11863592198503758248u), f64(13200161071657400096u), f64(14465802635759213596u), f64(11987915719740930989u), f64(14727513166716404377u), f64(18125216623108691390u), f64(3871463617952730428u), f64(13438223262881941206u), f64(15120750088449560219u), f64(4996973116443597634u), f64(17474422668216801327u), f64(11725728403266292315u), f64(7035920488256748319u), f64(14861010728333006889u), f64(3059446796589634216u), f64(16594761466888570085u), f64(12940937831007012101u), f64(16899747385326341061u), f64(10970432581561643055u), f64(15997942716186654365u), f64(9188923438452309560u), f64(10714463679512932715u), f64(10214480283686026984u), f64(2157908360834425177u), f64(16195744088095360215u), f64(6298184597360631864u), f64(2384636251274771142u), f64(768186602526962554u), f64(11394792936284522431u), f64(10786182531884216994u), f64(7168677360139691009u)}; +// -1934.3248362556, -3.512642050519687e-132, -7.350786487711076e-43, -2.93653754293034e+42, -7.003982839140666e-124, -9.359149702594958e+59, -1.2231619672889087e+287, 7.003111936882136e-50, -6.0906836879560264e-27, -1.8413138694839325e+86, 1.1999673595322263e+26, -3.7597876802005495e+243, -2.1449060009502597e-141, 2.318173484551994e+162, -7.795763884493084e+68, 3.721560354577447e-104, -6.041388700192658e+184, -3.6477524459116975e-60, -1.502660994358613e+205, -6.752064838664454e-192, -7.847264381607677e+144, 1.8972327765919883e+306, -5.299231972045231e-209, -2.0062927209415055e-242, 2.0003256246037705e-164, -1.293434978849255e+158, 1.1373563518337742e+113, 2.924164175177123e-149, 2.6168617111373365e-257, -1.6007971485693217e-163, -3.233003820801041e-204, 1.7063211043344023e+171 + +uint64_t var_137 [] = {72u, 16u, 0u, 0u, 40u}; +uint64_t var_135 [] = {13247355471621574986u, 11624887258427325317u, 9942614915966752235u, 4139325451928433498u, 4665401268889591332u, 9660725369276401929u, 693164432746007111u, 14002700909243782976u}; +float64_t var_134 [] = {f64(14399718874005915098u), f64(15571815439736755123u), f64(15184880873889889051u), f64(9847979870979827366u), f64(1228142684408972675u), f64(3371124014568150452u), f64(8087692759457401387u), f64(9609384580782505387u), f64(1477597197320753420u), f64(15104241445223582113u), f64(4381946958418744703u), f64(2806689855448223324u), f64(2930519840717419624u), f64(7557401689543362471u), f64(6194550792424245657u), f64(10363031979926300333u), f64(210521861724201706u), f64(7426682387493218810u), f64(10159668005810775079u), f64(7834135109053839824u), f64(10035779077385053057u), f64(10929870836272427382u), f64(11180733598665910010u), f64(6988926481853656685u), f64(10302766308584164910u), f64(2362866735761578619u), f64(16566436948637593932u), f64(7657618613119722783u), f64(2704140616799128185u), f64(14022246625121577556u), f64(16360055489489409415u), f64(5848231571965353358u)}; +// -1.173879235740122e+38, -2.5810004906693034e+116, -3.5054832194770695e+90, -6.554597307406097e-267, 1.4373066879102555e-226, 2.5365516056520468e-83, 4.5421550575223275e+232, -7.368321057939974e-283, 6.646130444492209e-210, -1.4106296941045448e+85, 8.827077666729902e-16, 4.687153285841857e-121, 8.867909590829656e-113, 1.6150294500628063e+197, 1.345442791805468e+106, -1.6994033973485e-232, 1.3663132941226661e-294, 2.93717316375549e+188, -4.346659678864265e-246, 5.2655009521218076e+215, -2.3709150338905216e-254, -1.3142991072045571e-194, -8.003307628270562e-178, 1.6285887920683165e+159, -1.6449565503335684e-236, 1.0153452684011588e-150, -7.903053294195814e+182, 8.358041199622042e+203, 6.64698250963969e-128, -6879477289642.582, -1.2545086730594271e+169, 9.520710064215625e+82 + +uint64_t var_132 [] = {80u, 32u, 72u, 48u, 64u, 56u, 48u, 40u}; +uint64_t var_130 [] = {17990819689217368475u, 14267941834120012433u, 3465934470447936347u, 9314078761803266462u, 11918246364261742983u, 9337666089742224978u, 15262252020620409617u}; +float64_t var_129 [] = {f64(2632921265178571059u), f64(16122410467215816819u), f64(17697032702367856286u), f64(5624473324698136339u), f64(5392093733751496085u), f64(10606512620327013719u), f64(978729597025812214u), f64(1563413232623796983u), f64(11007430839376624032u), f64(2348795760367716774u), f64(1666052550638850530u), f64(14766276574517822248u), f64(10218395580884964891u), f64(6974100765172843093u), f64(3179091509485438472u), f64(12860044981525174075u), f64(7151919826670670809u), f64(14826929065008683114u), f64(13933918488568616870u), f64(15897872117805872548u), f64(8685067125261860160u), f64(11984743900469710868u), f64(1136675127470815317u), f64(969291925713753836u), f64(2070265963710882159u), f64(7885445542263917712u), f64(13056849031755908653u), f64(13101601188901844550u), f64(10901757296049235944u), f64(4705400189456856572u), f64(7109449830182884890u), f64(13160060282619420098u)}; +// 1.1453608349705888e-132, -1.587369346275365e+153, -2.9417641187959127e+258, 1.0158277633751194e+68, 3.0777367264321676e+52, -3.24575766418193e-216, 3.0969364862449104e-243, 3.659869695523208e-204, -2.048039168742427e-189, 1.1741851527965889e-151, 2.5925802850748534e-197, -3.6448917413702844e+62, -3.6360331565189224e-242, 1.715045151657037e+158, 3.558295462025385e-96, -1.4277604418874809e-65, 1.2622695056025323e+170, -4.177465611769624e+66, -8184873.255941307, -1.5432460055462645e+138, 3.9823733042040855e+272, -4.3404967266843524e-124, 1.1212265530695812e-232, 7.182391930036128e-244, 2.8010811508046684e-170, 1.3559786058413101e+219, -2.009392564122529e-52, -1.949809438996329e-49, -1.7941070300540528e-196, 3793173.5205600243, 1.904646631992245e+167, -1.569995522922617e-45 + +uint64_t var_127 [] = {8u, 104u, 32u, 8u, 32u, 56u, 32u}; +uint64_t var_125 [] = {7749970125292175198u}; +float64_t var_124 [] = {f64(6717432649256650565u), f64(13772017025171702634u), f64(16452570950244089285u), f64(10209873756352972180u), f64(17119853242907834613u), f64(14245066108076568688u), f64(17699335364636616925u), f64(3116209871420214325u), f64(14463765876127797749u), f64(18031450949543799456u), f64(9210760816764462022u), f64(12120025697351591259u), f64(16995241348632377744u), f64(7915899406135338251u), f64(406377938911823835u), f64(16065803484180075706u), f64(14968592841381640912u), f64(1043738279784612710u), f64(15175473985883537247u), f64(13199875443726906855u), f64(15788495357954902769u), f64(17993851087565454968u), f64(12586360954608982297u), f64(4415008118551710253u), f64(17150087706896440098u), f64(11615746700657174614u), f64(6938776541782514361u), f64(3490026499357013992u), f64(10928968634653961674u), f64(10625417857303851178u), f64(8065318126631907784u), f64(11133154175594107343u)}; +// 1.1963237920104146e+141, -0.00012232414246285, -1.9068052426878134e+175, -9.817245583224469e-243, -7.743726959095287e+219, -5.150207386507462e+27, -4.005015332238227e+258, 2.214640668568439e-100, -2.2317187718408813e+42, -6.485377075266914e+280, 5.391940644291987e+307, -4.817288312673622e-115, -3.5803659177737863e+211, 1.5206806950059204e+221, 1.6995712452525845e-281, -2.7107509173254475e+149, -1.2268777941161214e+76, 6.743419999793945e-239, -8.311747154223234e+89, -7.0352015396959275e-43, -7.764425028177321e+130, -2.0386407935305358e+278, -7.138820689120118e-84, 1.5105950122009423e-13, -7.839999953325312e+221, -9.493370139050926e-149, 7.370629774472962e+155, 2.1462525702061535e-75, -1.177085676167517e-194, -6.11129595835773e-215, 1.4441344931021933e+231, -5.09370538181253e-181 + +uint64_t var_122 [] = {0u}; +uint64_t var_120 [] = {8448416982140549461u, 3258302210728262219u, 8199730978408770741u, 9128214378827162799u, 4536927345912178180u, 2991083242117142323u}; +float64_t var_119 [] = {f64(13224541104105447859u), f64(15997926192552457056u), f64(3195903267007773770u), f64(1545273865987701927u), f64(6215025560157673690u), f64(6915099360988292381u), f64(2632921648119447519u), f64(17895236051778914459u), f64(11977899365095451790u), f64(7576084845947023205u), f64(9278818693610826823u), f64(14752197883205700933u), f64(17170357365308316348u), f64(16822887611204495095u), f64(929241872652159986u), f64(2416525204936783495u), f64(15618689276009020277u), f64(3390556701043326625u), f64(8619163760572831983u), f64(10045360014138332961u), f64(6473997592331735548u), f64(6092137062352193108u), f64(3920024461294893156u), f64(5925543705618177486u), f64(3040463253665551873u), f64(7832216569604445537u), f64(3260652848984743697u), f64(5264387754046825011u), f64(12437208545964732727u), f64(18032103368874551954u), f64(10928493007737974437u), f64(8736180249753791438u)}; +// -3.301497051880758e-41, -7.824357091719868e+144, 4.893148204050249e-95, 2.232103621266717e-205, 2.97353410506837e+107, 1.9582178940580678e+154, 1.1454207318030275e-132, -5.208964322758926e+271, -1.5391400570269561e-124, 2.939249845694959e+198, -5.977038512818269e-305, -4.231905412538173e+61, -1.833646749363425e+223, -1.0956913814650382e+200, 1.525354422288766e-246, 3.9450657524151244e-147, -3.37529024887866e+119, 4.888478223185148e-82, 1.5178661307387018e+268, -1.0352474730035452e-253, 6.4148349766401e+124, 1.8877801849557373e+99, 1.2439000706934742e-46, 1.3805781208153196e+88, 1.9506651391806318e-105, 3.796953938141276e+215, 9.920037370309857e-91, 8.603177109513668e+43, -7.742646945720953e-94, -7.011301093277985e+280, -1.104748850672612e-194, 1.0091390349968425e+276 + +uint64_t var_117 [] = {48u, 48u, 56u, 80u, 32u, 16u}; +uint64_t var_115 [] = {12453453393991684959u, 1655499287040947693u, 6189547968460419452u, 4629587434453153441u, 16888425463350897627u, 17105020277016971372u, 7164930518073510035u, 10387124655452247732u, 9432696966287778066u, 9703442708627101798u, 10649378859654593450u, 4434227414598513652u, 16404836041053194768u, 13937807261870445194u, 2491338157831118301u, 3743397714460008323u}; +float64_t var_114 [] = {f64(13145979413242798804u), f64(18249049212272875542u), f64(11866001986412525350u), f64(11677155855818879728u), f64(15805617088064363265u), f64(3117616025036960168u), f64(295759759671089251u), f64(3315587624886762670u), f64(14216093991953321985u), f64(6167009503567322368u), f64(5975854712965768936u), f64(1416387832014661521u), f64(11346221027479399797u), f64(4353915784447293972u), f64(10092973457820298185u), f64(4793549766813476845u), f64(18041407716158862495u), f64(5732641488031677947u), f64(1877837052694714372u), f64(17406371823426831493u), f64(12755166353681822613u), f64(7343163571706921621u), f64(3099293917688714607u), f64(17333100453460500437u), f64(9758115797673631714u), f64(14059799586156460318u), f64(9475401553823698285u), f64(5222253444020763116u), f64(14784584775073250232u), f64(16914986396484564094u), f64(17691693453950978772u), f64(6279794993919638703u)}; +// -1.7461975733798845e-46, -2.254087553597392e+295, -5.0203281864944534e-132, -1.184886369616024e-144, -1.1016163011924826e+132, 2.8570537732987263e-100, 6.862206746477298e-289, 4.859391936026342e-87, -6.216679631024869e+25, 1.9368435102568067e+104, 3.1065594384724844e+91, 5.574344229526038e-214, -9.273922549336407e-167, 1.223681041535281e-17, -1.5228291748021803e-250, 3038751425116.9907, -2.9003344503478956e+281, 1.7207015532833868e+75, 3.696942236742707e-183, -1.0371652147038235e+239, -1.3763203172142895e-72, 8.019409183696546e+182, 1.6880402163604667e-101, -1.3683560131281643e+234, -6.421633541911156e-273, -2142187190128199.5, -7.863533030929549e-292, 1.3704529179157082e+41, -6.046522871793079e+63, -1.5101313690964458e+206, -1.2925742773419124e+258, 6.707760764200356e+111 + +uint64_t var_112 [] = {48u, 144u, 144u, 216u, 24u, 120u, 128u, 16u, 128u, 112u, 192u, 216u, 176u, 176u, 152u, 48u}; +uint64_t var_110 [] = {1974574619820150201u, 6828673976832995218u, 4469486898657243538u, 12171083690363424775u, 4733747186279628566u, 804531996737134521u, 17932648977680029171u, 7199266062394303577u, 11206859691607683769u, 2456110949156168632u, 4233775760192098211u}; +float64_t var_109 [] = {f64(14644260122741405446u), f64(3467781142773234771u), f64(7831633878900570457u), f64(1868587953186126122u), f64(14774452287169263094u), f64(13922652697835041731u), f64(2386878503535424367u), f64(16547495967924420906u), f64(8942958103762160449u), f64(3567426388470419897u), f64(13457489635873293098u), f64(15485424648914767536u), f64(197721995978144155u), f64(8306488134467655190u), f64(8909600536278509230u), f64(4626547782719094966u), f64(18249362645861906414u), f64(6083025255475019503u), f64(3587950130224573213u), f64(13544553895317881614u), f64(12150708944791209477u), f64(4740419680481906389u), f64(1941324043466159959u), f64(9897452317974437047u), f64(9477233337600713314u), f64(13752614432306922614u), f64(5813536777454517309u), f64(5288450412570259281u), f64(1967956071157440815u), f64(480961478938269997u), f64(8707019076078059829u), f64(11673730106455029722u)}; +// -2.5729885582194777e+54, 6.923400865513078e-77, 3.399107850939321e+215, 8.989536893970336e-184, -1.3060543175303795e+63, -1520349.006217227, 3.8975989077786173e-149, -4.256422679919585e+181, 6.765582943934791e+289, 3.26810917231141e-70, -1.2024822587538113e-25, -4.373920489375915e+110, 1.8623719629834263e-295, 1.9729465817720833e+247, 4.0465318686762067e+287, 20.799593290256517, -2.396324201111364e+295, 4.6559448455176147e+98, 7.812372448435905e-69, -8.105054017547407e-20, -5.196060342532765e-113, 850733770.7895151, 6.542829947198155e-179, -1.3305439476683419e-263, -1.0971075979162187e-291, -6.4614803614591834e-06, 4.4214616749469996e+80, 3.630582797776415e+45, 3.8971392710020073e-177, 1.6200731142167154e-276, 1.1655694468313672e+274, -6.975510498054295e-145 + +uint64_t var_107 [] = {0u, 16u, 112u, 144u, 80u, 128u, 160u, 96u, 104u, 144u, 152u}; +uint64_t var_105 [] = {17986676480636375055u, 16561927364456256080u, 9763399153731215526u, 17011184081394977003u, 5515476774723883814u, 9457918034744210939u, 10603173954453111005u, 9727232406901432990u}; +float64_t var_104 [] = {f64(12268982402006723053u), f64(11633317314059709852u), f64(2355759684042883150u), f64(14916586682027897541u), f64(4523747090804693057u), f64(15313422636296236341u), f64(17852314057458726189u), f64(8061073346680340919u), f64(6867894128954076650u), f64(2628301318073533989u), f64(12362862840435370860u), f64(16892802778425156682u), f64(16296392560269218515u), f64(4745368322886126618u), f64(17610928996722171208u), f64(4227008168332205515u), f64(1428962108255738703u), f64(15685550439166428737u), f64(8721174667886690300u), f64(6389093016280766630u), f64(915371217100750559u), f64(13102858936469556209u), f64(14325435142686572326u), f64(13100434734449401387u), f64(16751290947827411650u), f64(3724510073455636207u), f64(13176800956873038965u), f64(17108147774706966430u), f64(10272006816657832197u), f64(2166840198934152003u), f64(3126865544766700112u), f64(3984812247613312207u)}; +// -4.3997420428351414e-105, -1.3956358185785168e-147, 3.310721118965692e-151, -4.055255512934733e+72, 2.8107367677455903e-06, -1.381116861022872e+99, -6.669862983800634e+268, 7.443728610914345e+230, 1.2955022920890574e+151, 5.635813034929725e-133, -8.097801568182746e-99, -4.905389684561529e+204, -7.030330639871949e+164, 1807574008.0749574, -5.175243087826741e+252, 4.09547138485164e-26, 3.8417697419442373e-213, -1.0004951443736317e+124, 1.0315950134023327e+275, 1.3424750996227978e+119, 1.7924122107403712e-247, -2.427530528447156e-49, -1.2238156964734415e+33, -1.608666481217323e-49, -1.7914323013217252e+195, 1.0030184333291902e-59, -2.0599789696372077e-44, -1.2509772089128461e+219, -1.4156718618632884e-238, 7.88506931791861e-164, 1.1920211310425338e-99, 2.5915707560738407e-42 + +uint64_t var_102 [] = {112u, 48u, 48u, 112u, 16u, 80u, 8u, 24u}; +uint64_t var_100 [] = {10626802471431058568u, 313001281678515730u, 16466312065171707704u, 13381090709553971058u, 7068539325592326040u, 15412762098109586724u, 14400127101981903638u}; +float64_t var_99 [] = {f64(6187698773816159056u), f64(9776498580032912749u), f64(18269226306426886945u), f64(12870129469455680428u), f64(13778738789904889113u), f64(9289281457567414133u), f64(10639002934180078457u), f64(6195007212266041285u), f64(10865104194439280749u), f64(16359521363106835779u), f64(9698718863891634989u), f64(230294556184204338u), f64(10670676975682736140u), f64(11465988120190307059u), f64(8766120491176435417u), f64(2717371620507294816u), f64(3837943005303818774u), f64(5129903549361771946u), f64(17642969427757166520u), f64(4007765606054665226u), f64(1647027738278082783u), f64(10690219188164819365u), f64(15228053371569790034u), f64(10344531484724988184u), f64(710760864140949770u), f64(15615459515851778470u), f64(9927951426822621308u), f64(4957518843951601594u), f64(7641934781991551769u), f64(14252201341143490410u), f64(10241407868670681836u), f64(8264550004758408330u)}; +// 4.4611521076973743e+105, -1.0758468088979187e-271, -5.176835491667206e+296, -6.619601004503453e-65, -0.00036489525625856136, -2.979938591390489e-304, -4.950276524818289e-214, 1.438417155610527e+106, -6.428709007665846e-199, -1.1649903737111477e+169, -6.986997664109763e-277, 2.845076679936957e-293, -6.493431793743611e-212, -8.925983327534352e-159, 1.0421560948913072e+278, 5.088139069960686e-127, 3.990899891565144e-52, 8.867669768871947e+34, -7.161121366560219e+254, 8.736910566334191e-41, 1.432775837239442e-198, -1.2969217753816681e-210, -2.726501234875066e+93, -9.799637510894672e-234, 3.7003426124468857e-261, -2.1441371653352167e+119, -1.4715600945527723e-261, 2.705444685329441e+23, 7.251873910049452e+202, -1.6087437906676368e+28, -1.2589823680213738e-240, 3.000901131149856e+244 + +uint64_t var_97 [] = {104u, 72u, 88u, 32u, 88u, 32u, 88u}; +uint32_t var_95 [] = {348891937u, 929472872u}; +uint32_t var_94 [] = {421885700u, 716864914u}; +uint8_t var_93 [] = {113u, 117u}; +uint8_t var_92 [] = {252u, 80u}; +uint32_t var_91 [] = {264712479u, 258897714u}; +uint64_t var_90 [] = {11601634546274575695u, 18347035667798957494u, 13451989570814404378u, 456765431602104240u, 10052606093390301498u, 2437914183458767421u, 1539225365727642394u}; +float64_t var_89 [] = {f64(8962998596501157150u), f64(12224740054729171255u), f64(7400247037932311376u), f64(6032466557879469896u), f64(5839367888926184591u), f64(8111286762322373945u), f64(16464479761714716521u)}; +// 1.4787708549897394e+291, -4.896911894513031e-108, 5.155727613246544e+186, 1.971320548368363e+95, 2.4285423850251372e+82, 1.6970322567792563e+234, -1.1706628228396777e+176 + +uint64_t var_88 [] = {1280769246380200460u, 14023690319710955253u, 13247119119507366408u, 7767358375133657872u, 10775238306218042028u, 6738525377594107821u, 1491839643263654600u, 17664969632620412524u}; +float64_t var_87 [] = {f64(16304373337755592897u), f64(11714700170807880927u), f64(6682154344242841459u), f64(2775903153273905952u), f64(10892092016535164825u), f64(10642317549290804120u), f64(1322662639198263372u), f64(14850734564898422239u)}; +// -2.392147333909853e+165, -3.8902382189730166e-142, 5.1692570320776656e+138, 4.157950442133119e-123, -4.094307940460808e-197, -7.93999595358361e-214, 2.992377506963031e-220, -1.6450844168843733e+68 + +uint64_t var_86 [] = {15401374053725176026u, 15159971213859746434u, 15996044860437899159u, 10024478611893507882u, 17312537202804145326u, 13286484462280416129u, 5653446096408344014u, 1589575317326256715u, 1256266953356618611u, 5852474666329482281u, 8236254411035780100u}; +float64_t var_85 [] = {f64(2300673783722258919u), f64(2345233581152263551u), f64(14429124106383846452u), f64(3279288055166527134u), f64(8511350044499123665u), f64(16292164099935306522u), f64(319680150795867099u), f64(18041792644663864377u), f64(16469534312049021029u), f64(3059779533977631997u), f64(18445158560006719557u)}; +// 6.9071744526170175e-155, 6.6691704148362785e-152, -1.0394464537775981e+40, 1.803751188554954e-89, 9.34508116044192e+260, -3.6558900666657e+164, 2.604906894646101e-287, -3.1445758471145765e+281, -2.4962431291505274e+176, 3.927729333541973e-104, nan + +uint64_t var_84 [] = {1922947498486410857u, 16951704142057129556u, 5388344212325078882u, 5448258397625405342u, 1703194961276899101u, 9646419556518517367u, 16273654145082032307u, 3551281066422685306u, 10669730802081923878u, 8008712173776472922u, 5606540849143552077u, 17565367472452138214u, 2648738666890881870u, 2998195017278264134u, 2065211952219847096u, 18169511136733880014u}; +float64_t var_83 [] = {f64(17659590213590998702u), f64(15964857636350179584u), f64(8302093860329706908u), f64(10398331577184171968u), f64(12870065405008121229u), f64(17372403961692722173u), f64(8998427184828039058u), f64(5686275838205320814u), f64(13460688990661137053u), f64(6406040773904701275u), f64(4003950932397511804u), f64(4490512161850491093u), f64(4134453016479536686u), f64(6870297400155601231u), f64(8215692482325664371u), f64(7870459193100051406u)}; +// -9.134636827727053e+255, -4.659469567024577e+142, 1.0034462709138033e+247, -3.902670263958087e-230, -6.56557059752003e-65, -5.895455415968474e+236, 3.3600664624367966e+293, 1.4195485286653068e+72, -1.937018094571547e-25, 1.8421677350513206e+120, 4.847550088368645e-41, 1.6301853792973474e-08, 2.5465086384920936e-32, 1.9803645707206568e+151, 1.6672588912213468e+241, 1.405831311328661e+218 + +uint64_t var_82 [] = {12379964670789626889u, 13436296814432206489u, 4659013173841538396u, 6196494238874966981u, 6730617828857168898u, 8296127193014163030u}; +float64_t var_81 [] = {f64(5926993659265029067u), f64(8958927779396419652u), f64(8685124436318166792u), f64(11316065961843452656u), f64(15659828517197660337u), f64(4094401123071894779u)}; +// 1.682091154120208e+88, 7.99321150819077e+290, 4.0167944017799746e+272, -8.857511628261053e-169, -1.950836146289716e+122, 5.48735852433986e-35 + +uint64_t var_80 [] = {5797432571859372123u}; +float64_t var_79 [] = {f64(13033630116291160682u)}; +// -5.466899617959982e-54 + +int64_t var_78 [] = {2849001835972176893, -2276289870088551842}; +int8_t var_77 [] = {-108, -85}; +int64_t var_76 [] = {-3392684395881840317, -432674178100072972}; +int64_t var_75 [] = {-2471443589070945772, -1223946683744760999}; +uint64_t var_74 [] = {7116734975071460602u, 12441625220002408740u, 2786654427366964938u, 13829764222335973050u, 4762436333200299360u, 11395394244577961796u, 8944665256461003018u}; +float64_t var_73 [] = {f64(15952028776600326978u), f64(12864696557087944463u), f64(13582857386678690992u), f64(7739823830606308283u), f64(13001311485958403778u), f64(8118890521685184687u), f64(1188717030892108108u)}; +// -6.47474704450738e+141, -2.917920547847776e-65, -2.776118718553634e-17, 2.6072597653252422e+209, -3.815411605227875e-56, 5.58278810533562e+234, 3.2124591426633125e-229 + +uint64_t var_72 [] = {2155812772479464600u, 3170612777771403051u, 1681134711641298423u, 8156897225395734044u, 17350593003963396555u, 15651252092822179957u, 8877172929823018199u, 10633166244594888701u}; +float64_t var_71 [] = {f64(12474830707341252676u), f64(12421407484372908519u), f64(7665390200081996829u), f64(14912023387491630955u), f64(8690015471402520246u), f64(6013523761173124620u), f64(2092709178248925316u), f64(7713300078375383008u)}; +// -2.4163244305828842e-91, -6.630856606830876e-95, 2.655056358903447e+204, -2.004208317953279e+72, 8.498977317699981e+272, 1.0600734757558945e+94, 8.875460424589357e-169, 4.3577672186230927e+207 + +uint32_t var_70 [] = {2502819275u, 3673473517u}; +uint32_t var_69 [] = {1873404000u, 3357537829u}; +uint32_t var_68 [] = {2249156032u, 2604756913u}; +uint64_t var_67 [] = {11686681238268631633u, 17217089646841358934u, 4917608144621004608u, 2800347682848664045u, 13139172270140052590u}; +float64_t var_66 [] = {f64(4221934333025834245u), f64(1969861952934041841u), f64(4767317979525211814u), f64(7255389652619498159u), f64(8348926455447142360u)}; +// 1.8840860783382415e-26, 5.516797633442999e-177, 53506266743.450485, 1.0334573093152597e+177, 1.3131484076683424e+250 + +uint64_t var_65 [] = {3413955448782123771u, 5770915057685053022u}; +float32_t var_64 [] = {f32(4282101878u), f32(2381220644u)}; +// -2.4948187278321463e+38, -1.470137934347422e-30 + +float64_t var_63 [] = {f64(830612788143373984u), f64(2638216761943270681u)}; +// 3.9093685536053063e-253, 2.5384472749053234e-132 + +float64_t var_62 [] = {f64(15227122452644821730u)}; +// -2.2953290459445205e+93 + +int64_t var_61 = 203570955881815601; +uint32_t var_60 = 2733979527u; +int8_t var_59 = -26; +uint32_t var_58 = 1897186263u; +__riscv_vsetvl_e64m8(2); +vuint64m8_t var_144 = __riscv_vle64_v_u64m8(var_145, 2); +// 16, 16 + +__riscv_vsetvl_e64m8(1); +vuint64m8_t var_141 = __riscv_vle64_v_u64m8(var_142, 1); +// 8 + +__riscv_vsetvl_e64m8(5); +vuint64m8_t var_136 = __riscv_vle64_v_u64m8(var_137, 5); +// 72, 16, 0, 0, 40 + +__riscv_vsetvl_e64m8(8); +vuint64m8_t var_131 = __riscv_vle64_v_u64m8(var_132, 8); +// 80, 32, 72, 48, 64, 56, 48, 40 + +__riscv_vsetvl_e64m8(7); +vuint64m8_t var_126 = __riscv_vle64_v_u64m8(var_127, 7); +// 8, 104, 32, 8, 32, 56, 32 + +__riscv_vsetvl_e64m8(1); +vuint64m8_t var_121 = __riscv_vle64_v_u64m8(var_122, 1); +// 0 + +__riscv_vsetvl_e64m8(6); +vuint64m8_t var_116 = __riscv_vle64_v_u64m8(var_117, 6); +// 48, 48, 56, 80, 32, 16 + +__riscv_vsetvl_e64m8(16); +vuint64m8_t var_111 = __riscv_vle64_v_u64m8(var_112, 16); +// 48, 144, 144, 216, 24, 120, 128, 16, 128, 112, 192, 216, 176, 176, 152, 48 + +__riscv_vsetvl_e64m8(11); +vuint64m8_t var_106 = __riscv_vle64_v_u64m8(var_107, 11); +// 0, 16, 112, 144, 80, 128, 160, 96, 104, 144, 152 + +__riscv_vsetvl_e64m8(8); +vuint64m8_t var_101 = __riscv_vle64_v_u64m8(var_102, 8); +// 112, 48, 48, 112, 16, 80, 8, 24 + +__riscv_vsetvl_e64m8(7); +vuint64m8_t var_96 = __riscv_vle64_v_u64m8(var_97, 7); +// 104, 72, 88, 32, 88, 32, 88 + +__riscv_vsetvl_e32m2(2); +vuint32m2_t var_21 = __riscv_vle32_v_u32m2(var_95, 2); +// 348891937, 929472872 + +vuint32m2_t var_22 = __riscv_vle32_v_u32m2(var_94, 2); +// 421885700, 716864914 + +vuint8mf2_t var_23 = __riscv_vle8_v_u8mf2(var_93, 2); +// 113, 117 + +vuint8mf2_t var_24 = __riscv_vle8_v_u8mf2(var_92, 2); +// 252, 80 + +vuint32m2_t var_25 = __riscv_vle32_v_u32m2(var_91, 2); +// 264712479, 258897714 + +__riscv_vsetvl_e64m8(7); +vuint64m8_t var_26 = __riscv_vle64_v_u64m8(var_90, 7); +// 11601634546274575695, 18347035667798957494, 13451989570814404378, 456765431602104240, 10052606093390301498, 2437914183458767421, 1539225365727642394 + +vfloat64m8_t var_27 = __riscv_vle64_v_f64m8(var_89, 7); +// 1.4787708549897394e+291, -4.896911894513031e-108, 5.155727613246544e+186, 1.971320548368363e+95, 2.4285423850251372e+82, 1.6970322567792563e+234, -1.1706628228396777e+176 + +__riscv_vsetvl_e64m8(8); +vuint64m8_t var_28 = __riscv_vle64_v_u64m8(var_88, 8); +// 1280769246380200460, 14023690319710955253, 13247119119507366408, 7767358375133657872, 10775238306218042028, 6738525377594107821, 1491839643263654600, 17664969632620412524 + +vfloat64m8_t var_29 = __riscv_vle64_v_f64m8(var_87, 8); +// -2.392147333909853e+165, -3.8902382189730166e-142, 5.1692570320776656e+138, 4.157950442133119e-123, -4.094307940460808e-197, -7.93999595358361e-214, 2.992377506963031e-220, -1.6450844168843733e+68 + +__riscv_vsetvl_e64m8(11); +vuint64m8_t var_30 = __riscv_vle64_v_u64m8(var_86, 11); +// 15401374053725176026, 15159971213859746434, 15996044860437899159, 10024478611893507882, 17312537202804145326, 13286484462280416129, 5653446096408344014, 1589575317326256715, 1256266953356618611, 5852474666329482281, 8236254411035780100 + +vfloat64m8_t var_31 = __riscv_vle64_v_f64m8(var_85, 11); +// 6.9071744526170175e-155, 6.6691704148362785e-152, -1.0394464537775981e+40, 1.803751188554954e-89, 9.34508116044192e+260, -3.6558900666657e+164, 2.604906894646101e-287, -3.1445758471145765e+281, -2.4962431291505274e+176, 3.927729333541973e-104, nan + +__riscv_vsetvl_e64m8(16); +vuint64m8_t var_32 = __riscv_vle64_v_u64m8(var_84, 16); +// 1922947498486410857, 16951704142057129556, 5388344212325078882, 5448258397625405342, 1703194961276899101, 9646419556518517367, 16273654145082032307, 3551281066422685306, 10669730802081923878, 8008712173776472922, 5606540849143552077, 17565367472452138214, 2648738666890881870, 2998195017278264134, 2065211952219847096, 18169511136733880014 + +vfloat64m8_t var_33 = __riscv_vle64_v_f64m8(var_83, 16); +// -9.134636827727053e+255, -4.659469567024577e+142, 1.0034462709138033e+247, -3.902670263958087e-230, -6.56557059752003e-65, -5.895455415968474e+236, 3.3600664624367966e+293, 1.4195485286653068e+72, -1.937018094571547e-25, 1.8421677350513206e+120, 4.847550088368645e-41, 1.6301853792973474e-08, 2.5465086384920936e-32, 1.9803645707206568e+151, 1.6672588912213468e+241, 1.405831311328661e+218 + +__riscv_vsetvl_e64m8(6); +vuint64m8_t var_34 = __riscv_vle64_v_u64m8(var_82, 6); +// 12379964670789626889, 13436296814432206489, 4659013173841538396, 6196494238874966981, 6730617828857168898, 8296127193014163030 + +vfloat64m8_t var_35 = __riscv_vle64_v_f64m8(var_81, 6); +// 1.682091154120208e+88, 7.99321150819077e+290, 4.0167944017799746e+272, -8.857511628261053e-169, -1.950836146289716e+122, 5.48735852433986e-35 + +__riscv_vsetvl_e64m8(1); +vuint64m8_t var_36 = __riscv_vle64_v_u64m8(var_80, 1); +// 5797432571859372123 + +vfloat64m8_t var_37 = __riscv_vle64_v_f64m8(var_79, 1); +// -5.466899617959982e-54 + +__riscv_vsetvl_e64m8(2); +vint64m8_t var_40 = __riscv_vle64_v_i64m8(var_78, 2); +// 2849001835972176893, -2276289870088551842 + +vint8m1_t var_41 = __riscv_vle8_v_i8m1(var_77, 2); +// -108, -85 + +vint64m8_t var_42 = __riscv_vle64_v_i64m8(var_76, 2); +// -3392684395881840317, -432674178100072972 + +vint64m8_t var_43 = __riscv_vle64_v_i64m8(var_75, 2); +// -2471443589070945772, -1223946683744760999 + +__riscv_vsetvl_e64m8(7); +vuint64m8_t var_44 = __riscv_vle64_v_u64m8(var_74, 7); +// 7116734975071460602, 12441625220002408740, 2786654427366964938, 13829764222335973050, 4762436333200299360, 11395394244577961796, 8944665256461003018 + +vfloat64m8_t var_45 = __riscv_vle64_v_f64m8(var_73, 7); +// -6.47474704450738e+141, -2.917920547847776e-65, -2.776118718553634e-17, 2.6072597653252422e+209, -3.815411605227875e-56, 5.58278810533562e+234, 3.2124591426633125e-229 + +__riscv_vsetvl_e64m8(8); +vuint64m8_t var_46 = __riscv_vle64_v_u64m8(var_72, 8); +// 2155812772479464600, 3170612777771403051, 1681134711641298423, 8156897225395734044, 17350593003963396555, 15651252092822179957, 8877172929823018199, 10633166244594888701 + +vfloat64m8_t var_47 = __riscv_vle64_v_f64m8(var_71, 8); +// -2.4163244305828842e-91, -6.630856606830876e-95, 2.655056358903447e+204, -2.004208317953279e+72, 8.498977317699981e+272, 1.0600734757558945e+94, 8.875460424589357e-169, 4.3577672186230927e+207 + +__riscv_vsetvl_e32m4(2); +vuint32m4_t var_48 = __riscv_vle32_v_u32m4(var_70, 2); +// 2502819275, 3673473517 + +vuint32m4_t var_50 = __riscv_vle32_v_u32m4(var_69, 2); +// 1873404000, 3357537829 + +vuint32m4_t var_51 = __riscv_vle32_v_u32m4(var_68, 2); +// 2249156032, 2604756913 + +__riscv_vsetvl_e64m8(5); +vuint64m8_t var_52 = __riscv_vle64_v_u64m8(var_67, 5); +// 11686681238268631633, 17217089646841358934, 4917608144621004608, 2800347682848664045, 13139172270140052590 + +vfloat64m8_t var_53 = __riscv_vle64_v_f64m8(var_66, 5); +// 1.8840860783382415e-26, 5.516797633442999e-177, 53506266743.450485, 1.0334573093152597e+177, 1.3131484076683424e+250 + +__riscv_vsetvl_e64m8(2); +vuint64m8_t var_54 = __riscv_vle64_v_u64m8(var_65, 2); +// 3413955448782123771, 5770915057685053022 + +vfloat32m4_t var_55 = __riscv_vle32_v_f32m4(var_64, 2); +// -2.4948187278321463e+38, -1.470137934347422e-30 + +vfloat64m8_t var_56 = __riscv_vle64_v_f64m8(var_63, 2); +// 3.9093685536053063e-253, 2.5384472749053234e-132 + +__riscv_vsetvl_e64m8(1); +vfloat64m8_t var_57 = __riscv_vle64_v_f64m8(var_62, 1); +// -2.2953290459445205e+93 + +__riscv_vsetvl_e8mf2(2); +vbool16_t var_20 = __riscv_vmsleu_vv_u8mf2_b16(var_23, var_24, 2); +// 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +uint32_t var_18 = __riscv_vmv_x_s_u32m2_u32(var_25); +// 264712479 + +__riscv_vsetvl_e64m8(7); +__riscv_vse64_v_u64m8(var_100, var_26, 7); +__riscv_vsoxei64_v_f64m8(var_99, var_96, var_27, 7); +__riscv_vsetvl_e64m8(8); +__riscv_vse64_v_u64m8(var_105, var_28, 8); +__riscv_vsoxei64_v_f64m8(var_104, var_101, var_29, 8); +__riscv_vsetvl_e64m8(11); +__riscv_vse64_v_u64m8(var_110, var_30, 11); +__riscv_vsoxei64_v_f64m8(var_109, var_106, var_31, 11); +__riscv_vsetvl_e64m8(16); +__riscv_vse64_v_u64m8(var_115, var_32, 16); +__riscv_vsoxei64_v_f64m8(var_114, var_111, var_33, 16); +__riscv_vsetvl_e64m8(6); +__riscv_vse64_v_u64m8(var_120, var_34, 6); +__riscv_vsoxei64_v_f64m8(var_119, var_116, var_35, 6); +__riscv_vsetvl_e64m8(1); +__riscv_vse64_v_u64m8(var_125, var_36, 1); +__riscv_vsoxei64_v_f64m8(var_124, var_121, var_37, 1); +__riscv_vsetvl_e8m1(2); +vbool8_t var_39 = __riscv_vmsgt_vx_i8m1_b8(var_41, var_59, 2); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vbool8_t var_38 = __riscv_vmsge_vv_i64m8_b8(var_42, var_43, 2); +// 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e64m8(7); +__riscv_vse64_v_u64m8(var_130, var_44, 7); +__riscv_vsoxei64_v_f64m8(var_129, var_126, var_45, 7); +__riscv_vsetvl_e64m8(8); +__riscv_vse64_v_u64m8(var_135, var_46, 8); +__riscv_vsoxei64_v_f64m8(var_134, var_131, var_47, 8); +__riscv_vsetvl_e32m4(2); +vfloat64m8_t var_6 = __riscv_vfwcvt_f_xu_v_f64m8(var_48, 2); +// 2502819275.0, 3673473517.0 + +vbool8_t var_49 = __riscv_vmsbc_vx_u32m4_b8(var_51, var_58, 2); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +__riscv_vsetvl_e64m8(5); +__riscv_vse64_v_u64m8(var_140, var_52, 5); +__riscv_vsoxei64_v_f64m8(var_139, var_136, var_53, 5); +__riscv_vsetvl_e64m8(1); +__riscv_vsoxei64_v_f64m8(var_143, var_141, var_57, 1); +__riscv_vsetvl_e32m2(2); +vuint32m2_t var_19 = __riscv_vdivu_vx_u32m2_mu(var_20, var_21, var_22, var_60, 2); +// 0, 929472872 + +if(!check(var_100, var_183, var_184)) {cerr << "check 182 fails" << endl; return_value = 1;} +if(!check(var_99, var_180, var_181)) {cerr << "check 179 fails" << endl; return_value = 1;} +if(!check(var_105, var_186, var_187)) {cerr << "check 185 fails" << endl; return_value = 1;} +if(!check(var_104, var_177, var_178)) {cerr << "check 176 fails" << endl; return_value = 1;} +if(!check(var_110, var_189, var_190)) {cerr << "check 188 fails" << endl; return_value = 1;} +if(!check(var_109, var_174, var_175)) {cerr << "check 173 fails" << endl; return_value = 1;} +if(!check(var_115, var_192, var_193)) {cerr << "check 191 fails" << endl; return_value = 1;} +if(!check(var_114, var_171, var_172)) {cerr << "check 170 fails" << endl; return_value = 1;} +if(!check(var_120, var_195, var_196)) {cerr << "check 194 fails" << endl; return_value = 1;} +if(!check(var_119, var_168, var_169)) {cerr << "check 167 fails" << endl; return_value = 1;} +if(!check(var_125, var_198, var_199)) {cerr << "check 197 fails" << endl; return_value = 1;} +if(!check(var_124, var_165, var_166)) {cerr << "check 164 fails" << endl; return_value = 1;} +__riscv_vsetvl_e64m8(2); +vbool8_t var_10 = __riscv_vmslt_vx_i64m8_b8_mu(var_38, var_39, var_40, var_61, 2); +// 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +if(!check(var_130, var_201, var_202)) {cerr << "check 200 fails" << endl; return_value = 1;} +if(!check(var_129, var_162, var_163)) {cerr << "check 161 fails" << endl; return_value = 1;} +if(!check(var_135, var_204, var_205)) {cerr << "check 203 fails" << endl; return_value = 1;} +if(!check(var_134, var_159, var_160)) {cerr << "check 158 fails" << endl; return_value = 1;} +if(!check(var_140, var_207, var_208)) {cerr << "check 206 fails" << endl; return_value = 1;} +if(!check(var_139, var_156, var_157)) {cerr << "check 155 fails" << endl; return_value = 1;} +if(!check(var_143, var_153, var_154)) {cerr << "check 152 fails" << endl; return_value = 1;} +__riscv_vsetvl_e32m2(2); +vuint32m2_t var_13 = __riscv_vmaxu_vx_u32m2(var_19, var_18, 2); +// 264712479, 929472872 + +uint32_t var_7 = __riscv_vmv_x_s_u32m2_u32(var_13); +// 264712479 + +__riscv_vsetvl_e32m4(2); +vbool8_t var_5 = __riscv_vmsleu_vx_u32m4_b8_mu(var_10, var_49, var_50, var_7, 2); +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +vuint64m8_t var_3 = __riscv_vfwcvt_xu_f_v_u64m8_mu(var_5, var_54, var_55, 2); +// 3413955448782123771, 5770915057685053022 + +vfloat64m8_t var_2 = __riscv_vfmul_vv_f64m8_mu(var_5, var_6, var_6, var_56, 2); +// 2502819275.0, 3673473517.0 + +__riscv_vse64_v_u64m8(var_148, var_3, 2); +__riscv_vsoxei64_v_f64m8(var_147, var_144, var_2, 2); +if(!check(var_148, var_210, var_211)) {cerr << "check 209 fails" << endl; return_value = 1;} +if(!check(var_147, var_150, var_151)) {cerr << "check 149 fails" << endl; return_value = 1;} +if (return_value) + __builtin_abort (); +return return_value; +}